To estimate medication costs in individuals with diagnosed diabetes, undetected diabetes, impaired glucose regulation and normal blood glucose values in a population-based sample by age and sex.Using the KORA F4 follow-up survey, conducted in 2006-2008 (n=2611, age 40-82 years), we identified individuals' glucose tolerance status by means of an oral glucose tolerance test. We assessed all medications taken regularly, calculated age-sex specific medication costs and estimated cost ratios for total, total without antihyperglycemic drugs, and cardiovascular medication, using multiple 2-part regression models.Compared to individuals with normal glucose values, costs were increased in known diabetes, undetected diabetes and impaired glucose regulation, which was more pronounced in participants aged 40-59 years than in those aged 60-82 years (cost ratios for all medications: 40-59 years: 2.85; 95%-confidence interval: 1.78-4.54, 2.00; 1.22-3.29 and 1.53; 1.12-2.09; 60-82 years: 2.04; 1.71-2.43, 1.17; 0.90-1.51 and 1.09; 0.94-1.28). Compared to individuals with diagnosed diabetes, costs were significantly lower among individuals with impaired glucose regulation across all age and sex strata, also when antihyperglycemic medication was excluded (40-59 years: 0.60; 0.36-0.98, 60-82 years: 0.74; 0.60-0.90; men: 0.72; 0.56-0.93; women: 0.72; 0.54-0.96).We could quantify age- and sex-specific medication costs and cost ratios in individuals with diagnosed diabetes, undetected diabetes and impaired glucose regulation compared to those with normal glucose values, using data of a population-based sample, with oral glucose tolerance test-based identification of diabetes states. These results may help to validly estimate cost-effectiveness of screening and early treatment or prevention of diabetes.