Background:Estimating body composition is relevant in diabetes disease management, such as drug administration and risk assessment of morbidity/mortality. It is unclear how machine learning algorithms could improve easily obtainable body muscle and fat estimates. The objective was to develop and validate machine learning algorithms (neural networks) for precise prediction of body composition based on anthropometric and demographic data.Methods:Cross-sectional cohort study of 18 430 adults and children from the US population. Participants were examined with whole-body dual X-ray absorptiometry (DXA) scans, anthropometric assessment, and answered a demographic questionnaire. The primary outcomes were predicted total lean body mass (predLBM), total body fat mass (predFM), and trunk fat mass (predTFM) compared with reference values from DXA scans.Results:Participants were randomly partitioned into 70% training (12 901) data and 30% validation (5529) data. The prediction model for predLBM compared with lean body mass measured by DXA (DXALBM) had a Pearson’s correlation coefficient of R = 0.99 with a standard error of estimate (SEE) = 1.88 kg (P predFM compared with fat mass measured by DXA (DXAFM) had a Pearson’s coefficient of R = 0.98 with a SEE = 1.91 kg (P predTFM compared with DXA measured trunk fat mass (DXAFM) had a Pearson’s coefficient of R = 0.98 with a SEE = 1.13 kg (P Conclusions:In this study, neural network models based on anthropometric and demographic data could precisely predict body muscle and fat composition. Precise body estimations are relevant in a broad range of clinical diabetes applications, prevention, and epidemiological research.