Aim This cross-sectional study used a large nationwide claims data set to assess the excess medical costs of people with type 2 diabetes according to age group in 2015. Methods Data from 291 709 people with diabetes and 291 709 age- and sex-matched controls were analysed. Total costs (expressed as 2015 euros) of outpatient and inpatient services, medication, rehabilitation, and the provision of aids and appliances were examined. Overall and age-stratified excess costs of people with diabetes were estimated using gamma regression with a log-link. Results Overall, the estimated total direct costs of a person with type 2 diabetes are approximately double those of a person without diabetes: euro4727 vs. euro2196, respectively. Absolute excess costs were approximately the same in all age groups (around euro2500), however, relative excess costs of persons with diabetes were much higher in younger (similar to 334% for < 50 years) than in older age groups (similar to 156% for >= 80 years). Regional costs, both absolute and excess, partly differed from the national level. Conclusions This study complements and updates previous studies on the excess medical costs of people with diabetes in Germany. The results indicate the importance of preventing the development of type 2 diabetes, especially in younger age groups. Longitudinal and regional studies examining changes in prevalence and the development of excess costs in groups with different types of diabetes, and according to age, would be of interest to validate our findings and better understand the avoidable burden of having diabetes.