BackgroundTotal shoulder arthroplasty (TSA) has evolved from requiring extended inpatient hospital stays to favoring same-day discharges, influenced by improved surgical techniques, patient optimization, and the risks associated with inpatient stays. The removal of TSA from Medicare's inpatient-only list in 2021 underscores this shift. However, the need for accurate prediction of post-TSA admission remains, as hospital admissions are costly and linked to increased morbidity and mortality. Machine learning algorithms offer potential advantages over traditional predictive models by identifying complex, nonlinear relationships. This study aimed to demonstrate and compare the performance of commonly used machine learning algorithms to predict overnight hospital stay (OHS) admission. MethodsThis study used data from the American College of Surgeons National Quality Improvement Program 2021 database to analyze patients who underwent primary, elective TSA. Patients were divided into short hospital stay of 0-1 days and OHS of >1 day cohorts. Machine learning models, including Random Forest, Artificial Neural Network (ANN), Gradient Boosted Tree, Naïve Bayes, and Support Vector Machine, were trained and validated to predict OHS. The models' predictive capacities were compared using the area under the receiver operating characteristics curve, calibration, and decision curve analysis. ResultsOut of 5811 patients analyzed, 926 (15.9%) were discharged on the same day. The ANN model demonstrated the highest area under the receiver operating characteristics curve (0.811), indicating superior predictive ability. Important variables influencing OHS predictions included operative time, body mass index, functional status, and patient demographics, such as age, race, and home support. Machine learning models showed better predictive performance than multivariate logistic regression. ConclusionMachine learning models, particularly the ANN model, outperform traditional regression methods in predicting post-TSA admission, highlighting their utility in optimizing patient selection for outpatient surgery. These models identify important variables associated with increased risk of OHS, aiding in preoperative planning and patient counseling. Integrating machine learning into clinical practice may enhance surgical outcomes and patient satisfaction while reducing health-care costs.