BackgroundWith the steady rise in health care expenditures, the examination of factors that may influence the costs of care has garnered much attention. Although machine learning models have previously been applied in health economics, their application within cardiac surgery remains limited. We evaluated several machine learning algorithms to model hospitalization costs for coronary artery bypass grafting. MethodsAll adult hospitalizations for isolated coronary artery bypass grafting were identified in the 2016 to 2020 Nationwide Readmissions Database. Machine learning models were trained to predict expenditures and compared with traditional linear regression. Given the significance of postoperative length of stay, we additionally developed models excluding postoperative length of stay to uncover other drivers of costs. To facilitate comparison, machine learning classification models were also trained to predict patients in the highest decile of costs. Significant factors associated with high cost were identified using SHapley Additive exPlanations beeswarm plots. ResultsAmong 444,740 hospitalizations included for analysis, the median cost of hospitalization in coronary artery bypass grafting patients was $43,103. eXtreme Gradient Boosting most accurately predicted hospitalization costs, with R2 = 0.519 over the validation set. The top predictive features in the eXtreme Gradient Boosting model included elective procedure status, prolonged mechanical ventilation, new-onset respiratory failure or myocardial infarction, and postoperative length of stay. After removing postoperative length of stay, eXtreme Gradient Boosting remained the most accurate model (R2 = 0.38). Prolonged ventilation, respiratory failure, and elective status remained important predictive parameters. ConclusionMachine learning models appear to accurately model total hospitalization costs for coronary artery bypass grafting. Future work is warranted to uncover other drivers of costs and improve the value of care in cardiac surgery.