Objectives: In the SPRINT trial, 18% of patients with a tibial shaft fracture (TSF) treated with intramedullary nailing (IMN) had one or more unplanned subsequent surgical procedures. It is... Show moreObjectives: In the SPRINT trial, 18% of patients with a tibial shaft fracture (TSF) treated with intramedullary nailing (IMN) had one or more unplanned subsequent surgical procedures. It is clinically relevant for surgeon and patient to anticipate unplanned secondary procedures, other than operations that can be readily expected such as reconstructive procedures for soft tissue defects. Therefore, the objective of this study was to develop a machine learning (ML) prediction model using the SPRINT data that can give individual patients and their care team an estimate of their particular probability of an unplanned second surgery. Methods: Patients from the SPRINT trial with unilateral TSFs were randomly divided into a training set (80%) and test set (20%). Five ML algorithms were trained in recognizing patterns associated with subsequent surgery in the training set based on a subset of variables identified by random forest algorithms. Performance of each ML algorithm was evaluated and compared based on (1) area under the ROC curve, (2) calibration slope and intercept, and (3) the Brier score. Results: Total data set comprised 1198 patients, of whom 214 patients (18%) underwent subsequent surgery. Seven variables were used to train ML algorithms: (1) Gustilo-Anderson classification, (2) Tscherne classification, (3) fracture location, (4) fracture gap, (5) polytrauma, (6) injury mechanism, and (7) OTA/AO classification. The best-performing ML algorithm had an area under the ROC curve, calibration slope, calibration intercept, and the Brier score of 0.766, 0.954, -0.002, and 0.120 in the training set and 0.773, 0.922, 0, and 0.119 in the test set, respectively. Conclusions: An ML algorithm was developed to predict the probability of subsequent surgery after IMN for TSFs. This ML algorithm may assist surgeons to inform patients about the probability of subsequent surgery and might help to identify patients who need a different perioperative plan or a more intensive approach. Show less