INTRODUCTION: Childhood circumstances impact senior health, prompting the introduction of machine learning methods to assess their individual and collective contributions to senior health. METHODS: Using health and retirement study (HRS) and China Health and Retirement Longitudinal Study (CHARLS), we analyzed 2,434 American and 5,612 Chinese participants aged 60 and above. Conditional inference trees and forests were employed to estimate the influence of childhood circumstances on self-rated health (SRH). RESULTS: The conventional method estimated higher inequality of opportunity (IOP) values in both China (0.039, accounting for 22.67% of the total Gini coefficient 0.172) and the US (0.067, accounting for 35.08% of the total Gini coefficient 0.191). In contrast, the conditional inference tree yielded lower estimates (China: 0.022, accounting for 12.79% of 0.172; US: 0.044, accounting for 23.04% of 0.191), as did the forest (China: 0.035, accounting for 20.35% of 0.172; US: 0.054, accounting for 28.27% of 0.191). Childhood health, financial status, and regional differences were key determinants of senior health. The conditional inference forest consistently outperformed others in predictive accuracy, as demonstrated by lower out-of-sample mean squared error (MSE). DISCUSSION: The findings emphasize the need for early-life interventions to promote health equity in aging populations. Machine learning showcases the potential in identifying contributing factors.