This research investigates the determinants of government healthcare expenditure in high-income and upper-middle-income countries by exploring economic, demographic, and political influences. By analyzing data from 1990 to 2019 from 28 high-income and 42 upper-middle-income nations, this study employs Bayesian model averaging, the generalized method of moments, and regression discontinuity design. The results reveal that government healthcare spending positively correlates with the previous year's expenditure in both income groups. Additionally, the impact of education on spending differs, while it is positively significant in high-income countries, it is not significant in upper-middle-income countries. The proportion of elderly individuals positively influences healthcare spending in high-income countries but inconsistently influences healthcare spending in upper-middle-income countries. Urbanization significantly impacts spending in upper-middle-income nations. The positive association between industrial employment and spending suggests greater healthcare needs in such areas. Efforts to curb corruption positively affect spending differently for each income group. Out-of-pocket expenses negatively impact spending in both groups, though positively in high-income countries alone. The influence of the young population varies, being negative in high-income countries but positive in upper-middle-income countries. Logistic and probit regression models identify key determinants, including gross domestic product (GDP) per capita, elderly population proportion, out-of-pocket expenses, and corruption control measures in high-income countries. Policymakers can use these findings to tailor strategies, optimize healthcare spending, and ensure equitable access across income levels.