Particle density (ρs) and bulk density (ρb) are key factors in the calculation of total soil porosity. However, direct measurements of ρs and ρb are labour‐intensive, time‐consuming, and sometimes impractical. Pedotransfer functions (PTFs) provide alternative methods for indirect estimation of ρs and ρb. In this paper, the accuracy of typical 12 ρs and 9 ρb PTFs was evaluated using easily measurable soil properties (sand, silt, clay, and soil organic matter (SOM) content) from granitic residual soils collected from six study areas in subtropical China, and the accuracy of PTFs constructed based on multiple linear stepwise regression (MSR) and machine‐learned algorithms (backpropagation neural network, k‐nearest neighbour algorithms, random forests, support vector machines, and gradient boosted decision trees) was compared to determine the accuracy of PTFs. The results show that typical PTFs have poor accuracy (R2adjusted < 0.020) and are not applicable to the indirect estimation of ρs and ρb in granitic residual soils. The PTFs constructed by machine learning algorithms all performed better than MSR, with the highest estimation accuracy of the PTFs constructed by the random forest algorithm, with R2adjusted values of 0.923 and 0.933 for the ρs and ρb PTFs, respectively, and root‐mean‐square error of 0.020 g·cm−3 and 0.023 g·cm−3, respectively. Compared with MSR, the random forest algorithm has greater accuracy and eliminates the restriction of PTFs on predictors, which provides support for understanding the changing rules of ρs and ρb in granite residual soils in subtropical regions, evaluating soil quality and improving soil structure.