To estimate short- and long-term costs of inpatient hospitalization in Sweden for major diabetes mellitus-related events. Costs were estimated using administrative hospital data from the Swedish National Board of Health and Welfare, which is linked to the Swedish National Diabetes Register. Data were available for 179 749 patients with diabetes in Sweden from 1998 to 2003 (mean and median duration of 6 years' follow-up). Costing of inpatient admissions was based on Nordic diagnosis-related groups (NordDRG). Multiple regression analysis (linear and generalizing estimating equation models) was used to estimate inpatient care costs controlling for age, sex and co-morbidities. The data on hospitalizations were converted to costs (euro) using 2003 exchange rates. The average annual costs (linear model) associated with inpatient admissions for a 60-year-old male in the year the first event first occurred were as follows: euro6488 (95% CI 5034, 8354) for diabetic coma; euro6850 (95% CI 6514, 7204) for heart failure; euro7853 (95% CI 7559, 8144) for non-fatal stroke; euro8121 (95% CI 7104, 9128) for peripheral circulatory complications; euro8736 (95% CI 8474, 9001) for non-fatal myocardial infarction (MI); euro10 360 (95% CI 10 085, 10 643) for ischaemic heart disease; euro11 411 (95% CI 10 298, 12 654) for renal failure; and euro14 949 (95% CI 13 849, 16 551) for amputation. On average, the costs were higher when co-morbidity was accounted for (e.g. MI with co-morbidity was twice as costly as MI alone). Average hospital inpatient costs associated with common diabetes-related events can be estimated using panel data regression methods. These could assist in modelling of long-term costs of diabetes and in evaluating the cost effectiveness of improving care.