About 60% of patients with type 2 diabetes achieve remission after Roux-en-Y gastric bypass (RYGB) surgery. No accurate method is available to preoperatively predict the probability of remission. Our goal was to develop a way to predict probability of diabetes remission after RYGB surgery on the basis of preoperative clinical criteria. In a retrospective cohort study, we identified individuals with type 2 diabetes for whom electronic medical records were available from a primary cohort of 2300 patients who underwent RYGB surgery at the Geisinger Health System (Danville, PA, USA) between Jan 1, 2004, and Feb 15, 2011. Partial and complete remission were defined according to the American Diabetes Association criteria. We examined 259 clinical variables for our algorithm and used multiple logistic regression models to identify independent predictors of early remission (beginning within first 2 months after surgery and lasting at least 12 months) or late remission (beginning more than 2 months after surgery and lasting at least 12 months). We assessed a final Cox regression model with a consistent subset of variables that predicted remission, and used the resulting hazard ratios (HRs) to guide creation of a weighting system to produce a score (DiaRem) to predict probability of diabetes remission within 5 years. We assessed the validity of the DiaRem score with data from two additional cohorts. Electronic medical records were available for 690 patients in the primary cohort, of whom 463 (63%) had achieved partial or complete remission. Four preoperative clinical variables were included in the final Cox regression model: insulin use, age, HbA1c concentration, and type of antidiabetic drugs. We developed a DiaRem score that ranges from 0 to 22, with the greatest weight given to insulin use before surgery (adding ten to the score; HR 5·90, 95% CI 4·41–7·90; p<0·0001). Kaplan-Meier analysis showed that 88% (95% CI 83–92%) of patients who scored 0–2, 64% (58–71%) of those who scored 3–7, 23% (13–33%) of those who scored 8–12, 11% (6–16%) of those who scored 13–17, and 2% (0–5%) of those who scored 18–22 achieved early remission (partial or complete). As in the primary cohort, the proportion of patients achieving remission in the replication cohorts was highest for the lowest scores, and lowest for the highest scores. The DiaRem score is a novel preoperative method to predict the probability of remission of type 2 diabetes after RYGB surgery. Geisinger Health System and the US National Institutes of Health.