ABSTRACT: Bariatric surgery prevents and induces remission of type 2 diabetes in many patients. The effect of preoperative glucose status on long-term health-care costs is unknown. We aimed to assess health-care costs over 15 years for patients with obesity treated conventionally or with bariatric surgery and who had either euglycaemia, prediabetes, or type 2 diabetes before intervention.The Swedish Obese Subjects (SOS) study is a prospective study of adults who had bariatric surgery and contemporaneously matched controls who were treated conventionally (age 37-60 years; BMI of ?34 in men and ?38 in women) recruited from 25 Swedish surgical departments and 480 primary health-care centres. Exclusion criteria were identical for both study groups, and were previous gastric or bariatric surgery, recent malignancy or myocardial infarction, selected psychiatric disorders, and other contraindicating disorders to bariatric surgery. Conventional treatment ranged from no treatment to lifestyle intervention and behaviour modification. In this study, we retrieved prescription drug costs for the patients in the SOS study via questionnaires and the nationwide Swedish Prescribed Drug Register. We retrieved data for inpatient and outpatient visits from the Swedish National Patient Register. We followed up the sample linked to register data for up to 15 years. We adjusted mean differences for baseline characteristics. Analyses were by intention to treat. The SOS study is registered with ClinicalTrials.gov, number NCT01479452.Between Sept 1, 1987, and Jan 31, 2001, 2010 adults who had bariatric surgery and 2037 who were treated conventionally were enrolled into the SOS study. In this study, we followed up 4030 patients (2836 who were euglycaemic; 591 who had prediabetes; 603 who had diabetes). Drug costs did not differ between the surgery and conventional treatment groups in the euglycaemic subgroup (surgery US$10,511 vs conventional treatment $10,680; adjusted mean difference -$225 [95% CI -2080 to 1631]; p=0·812), but were lower in the surgery group in the prediabetes ($10,194 vs $13,186; -$3329 [-5722 to -937]; p=0·007) and diabetes ($14,346 vs $19,511; -$5487 [-7925 to -3049]; p<0·0001) subgroups than in the conventional treatment group. Compared with the conventional treatment group, we noted greater inpatient costs in the surgery group for the euglycaemic ($51,225 vs $25,313; $22,931 [19,001-26,861]; p<0·0001), prediabetes ($58,699 vs $32,861; $27,152 [18,736-35,568]; p<0·0001), and diabetes ($61,569 vs $47,569; 18,697 [9992-27,402]; p<0·0001) subgroups. We noted no differences in outpatient costs. Total health-care costs were higher in the surgery group in the euglycaemic ($71,059 vs $45,542; $22,390 [17,358-27,423]; p<0·0001) and prediabetes ($78,151 vs $54,864; $26,292 [16,738-35,845]; p<0·0001) subgroups than in the conventional treatment group, whereas we detected no difference between treatment groups in patients with diabetes ($88,572 vs $79,967; $9081 [-1419 to 19,581]; p=0·090).Total health-care costs were higher for patients with euglycaemia or prediabetes in the surgery group than in the conventional treatment group, but we detected no difference between the surgery and conventional treatment groups for patients with diabetes. Long-term health-care cost results support prioritisation of patients with obesity and type 2 diabetes for bariatric surgery.AFA Försäkring and Swedish Scientific Research Council.