Postoperative ileus (POI) is a significant complication after loop ileostomy closure given both its frequency and impact on the patient. The purpose of this study was to develop and externally validate a prediction model for POI after loop ileostomy closure. The model was developed and validated according to the TRIPOD checklist for prediction model development and validation. The development cohort included consecutive patients who underwent loop ileostomy closure in two teaching hospitals in Montreal, Canada. Candidate variables considered for inclusion in the model were chosen a priori based on subject knowledge. The final prediction model, which modelled the 30-day cumulative incidence of POI using logistic regression, was selected using the highest area under the receiver operating characteristic curve (AUC) criterion. Model calibration was assessed using the Hosmer-Lemeshow goodness-of-fit test. The model was then validated externally in an independent cohort of similar patients from the University of British Columbia. The development cohort included 531 patients, in whom the incidence of POI was 16·8 per cent. The final model included five variables: age, ASA fitness grade, underlying pathology/treatment, interval between ileostomy creation and closure, and duration of surgery for ileostomy closure (AUC 0·68, 95 per cent c.i. 0·61 to 0·74). The model demonstrated good calibration (P= 0·142). The validation cohort consisted of 216 patients, and the incidence of POI was 15·7 per cent. On external validation, the model maintained good discrimination (AUC 0·72, 0·63 to 0·81) and calibration (P= 0·538). A prediction model was developed for POI after loop ileostomy closure and included five variables. The model maintained good performance on external validation.