Particle density (rho(s)) and bulk density (rho(b)) are key factors in the calculation of total soil porosity. However, direct measurements of rho(s) and rho(b) are labour-intensive, time-consuming, and sometimes impractical. Pedotransfer functions (PTFs) provide alternative methods for indirect estimation of rho(s )and rho(b). In this paper, the accuracy of typical 12 rho(s) and 9 rho(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 (R-adjusted(2) < 0.020) and are not applicable to the indirect estimation of rho(s) and rho(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 R-adjusted(2) values of 0.923 and 0.933 for the rho(s) and rho(b) PTFs, respectively, and root-mean-square error of 0.020 g<middle dot>cm(-3) and 0.023 g<middle dot>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 rho(s) and rho(b) in granite residual soils in subtropical regions, evaluating soil quality and improving soil structure.