Despite a rising rate of serious medical complications after shoulder replacement surgery, there are no prediction models in widespread use to guide surgeons in identifying patients at high risk and to provide patients with personalised risk estimates to support shared decision making. Our aim was to develop and externally validate a prediction model for serious adverse events within 90 days of primary shoulder replacement surgery. Linked data from the National Joint Registry, National Health Service Hospital Episode Statistics Admitted Patient Care of England, and Civil Registration Mortality databases and Danish Shoulder Arthroplasty Registry and National Patient Register were used for our modelling study. Patients aged 18-100 years who had a primary shoulder replacement between April 1, 2012, and Oct 2, 2020, in England, and April 1, 2012, and Oct 2, 2018, in Denmark, were included. We developed a multivariable logistic regression model using the English dataset to predict the risk of 90-day serious adverse events, which were defined as medical complications requiring admission to hospital and all-cause death. We undertook internal validation using bootstrapping, and internal-external cross-validation across different geographical regions of England. The English model was externally validated on the Danish dataset. Data for 40 631 patients undergoing primary shoulder replacement (mean age 72·5 years [SD 9·9]; 28 709 [70·7%] women and 11 922 [29·3%] men) were used for model development, of whom 2270 (5·6%) had a 90-day serious adverse event. On internal validation, the model had a C-statistic of 0·717 (95% CI 0·707-0·728) and was well calibrated. Internal-external cross-validation showed consistent model performance across all regions in England. Upon external validation on the Danish dataset (n=6653; mean age 70·5 years [SD 10·3]; 4503 [67·7%] women and 2150 [32·3%] men), the model had a C-statistic of 0·750 (95% CI 0·723-0·776). Decision curve analysis showed clinical utility, with net benefit across all risk thresholds. This externally validated prediction model uses commonly available clinical variables to accurately predict the risk of serious medical complications after primary shoulder replacement surgery. The model is generalisable and applicable to most patients in need of a shoulder replacement. Its use offers support to clinicians and could inform and empower patients in the shared decision-making process. National Institute for Health and Care Research and the Department of Orthopaedic Surgery, Herlev and Gentofte Hospital, Denmark.