This study examined the association between energy density (ED, g/kJ) and diet costs (\[euro]/day) in a sample of 494 German children and adolescents aged 4-18 years using 1100 3-day-weighed dietary records from the Dortmund Nutritional and Anthropometric Longitudinally Designed (DONALD) Study (open cohort study) and retail food prices of 341 empirically selected recorded food items including special brands. ED was negatively associated with diet costs (β=-0.20 kJ/g, P<0.0007) with a non-linear term (β=0.01 kJ/g*kJ/g, P=0.0440). Diet costs increased with age (β=0.32 yr, P<0.0001) with a negative non-linear term (β=-0.01 yr*yr; P<0.0001). In conclusion, the inverse association between diet costs and ED was more pronounced in the older than in the younger age groups and in low-ED diets than in high-ED diets. Higher % diet costs of fruit/vegetables could be compensated by lower % diet costs of meat/sausage to lower ED without increasing diet costs.