Background: The Centers for Medicare and Medicaid Services removed total hip arthroplasty (THA) from the inpatient-only list. This has created significant confusion regarding which patients qualify for an inpatient designation. The purpose of this study is to develop and validate a novel predictive tool for preoperatively objectively determining “outpatient” vs “inpatient” status for THA in the Medicare population. Methods: A cohort of Medicare patients undergoing primary THA between January 2017 and September 2019 was retrospectively reviewed. A machine learning model was trained using 80% of the THA patients, and the remaining 20% was used for testing the model performance in terms of accuracy and the average area under the receiver operating characteristic curve. Feature importance was obtained for each feature used in the model. Results: One thousand ninety-one patients had outpatient stays, and 318 qualified for inpatient designation. Significant associations were demonstrated between inpatient designations and the following: higher BMI, increased patient age, better preoperative functional scores, higher American Society of Anesthesiologist Physical Status Classification, higher Modified Frailty Index, higher Charlson Comorbidity Index, female gender, and numerous comorbidities. The XGBoost model for predicting an inpatient or outpatient stay was 78.7% accurate with the area under the receiver operating characteristic curve to be 81.5%. Conclusions: Using readily available key baseline characteristics, functional scores and comorbidities, this machine-learning model accurately predicts an “outpatient” or “inpatient” stay after THA in the Medicare population. BMI, age, functional scores, and American Society of Anesthesiologist Physical Status Classification had the highest influence on this predictive model.