BackgroundAlthough bariatric surgery is an effective treatment for type 2 diabetes (T2D) in patients with morbid obesity, further studies are needed to evaluate factors influencing the chance of achieving diabetes remission. The objective of the present study was to investigate the association between T2D duration and the chance of achieving remission of T2D after bariatric surgery.Methods and findingsWe conducted a nationwide register-based cohort study including all adult patients with T2D and BMI ≥ 35 kg/m2 who received primary bariatric surgery in Sweden between 2007 and 2015 identified through the Scandinavian Obesity Surgery Registry. The main outcome was remission of T2D, defined as being free from diabetes medication or as complete remission (HbA1c < 42 mmol/mol without medication). In all, 8,546 patients with T2D were included. Mean age was 47.8 ± 10.1 years, mean BMI was 42.2 ± 5.8 kg/m2, 5,277 (61.7%) were women, and mean HbA1c was 58.9 ± 17.4 mmol/mol. The proportion of patients free from diabetes medication 2 years after surgery was 76.6% (n = 6,499), and 69.9% at 5 years (n = 3,765). The chance of being free from T2D medication was less in patients with longer preoperative duration of diabetes both at 2 years (odds ratio [OR] 0.80/year, 95% CI 0.79–0.81, p < 0.001) and 5 years after surgery (OR 0.76/year, 95% CI 0.75–0.78, p < 0.001). Complete remission of T2D was achieved in 58.2% (n = 2,090) at 2 years, and 46.6% at 5 years (n = 681). The chance of achieving complete remission correlated negatively with the duration of diabetes (adjusted OR 0.87/year, 95% CI 0.85–0.89, p < 0.001), insulin treatment (adjusted OR 0.25, 95% CI 0.20–0.31, p < 0.001), age (adjusted OR 0.94/year, 95% CI 0.93–0.95, p < 0.001), and HbA1c at baseline (adjusted OR 0.98/mmol/mol, 95% CI 0.97–0.98, p < 0.001), but was greater among males (adjusted OR 1.57, 95% CI 1.29–1.90, p < 0.001) and patients with higher BMI at baseline (adjusted OR 1.07/kg/m2, 95% CI 1.05–1.09, p < 0.001). The main limitations of the study lie in its retrospective nature and the low availability of HbA1c values at long-term follow-up.ConclusionsIn this study, we found that remission of T2D after bariatric surgery was inversely associated with duration of diabetes and was highest among patients with recent onset and those without insulin treatment.