Summary Four machine learning models were developed and compared to predict the risk of a future major osteoporotic fracture (MOF), defined as hip, wrist, spine and humerus fractures, in patients with a prior fracture. We developed a user-friendly tool for risk calculation of subsequent MOF in osteopenia patients, using the best performing model. Introduction Major osteoporotic fractures (MOFs), defined as hip, wrist, spine and humerus fractures, can have serious consequences regarding morbidity and mortality. Machine learning provides new opportunities for fracture prediction and may aid in targeting preventive interventions to patients at risk of MOF. The primary objective is to develop and compare several models, capable of predicting the risk of MOF as a function of time in patients seen at the fracture and osteoporosis outpatient clinic (FOclinic) after sustaining a fracture. Methods Patients aged > 50 years visiting an FO-clinic were included in this retrospective study. We compared discriminative ability (concordance index) for predicting the risk on MOF with a Cox regression, random survival forests (RSF) and an artificial neural network (ANN)-DeepSurv model. Missing data was imputed using multiple imputations by chained equations (MICE) or RSF’s imputation function. Analyses were performed for the total cohort and a subset of osteopenia patients without vertebral fracture. Results A total of 7578 patients were included, 805 (11%) patients sustained a subsequent MOF. The highest concordance-index in the total dataset was 0.697 (0.664–0.730) for Cox regression; no significant difference was determined between the models. In the osteopenia subset, Cox regression outperformed RSF (p = 0.043 and p = 0.023) and ANN-DeepSurv (p = 0.043) with a cindex of 0.625 (0.562–0.689). Cox regression was used to develop a MOF risk calculator on this subset. Conclusion We show that predicting the risk of MOF in patients who already sustained a fracture can be done with adequate discriminative performance. We developed a user-friendly tool for risk calculation of subsequent MOF in patients with osteopenia.