Background: There is a scarcity of studies evaluating the relationship between food costs and adherence to different food patterns and obesity. Methods: This was a dynamic cohort of Spanish university graduates (n=17 197 for the cross-sectional baseline assessment and n=11 195 for the prospective follow-up analyses). Mean age was 38.6 (SD 12.2) years, and 60% of participants were women. A 136-item food frequency questionnaire previously validated in Spain was used. Principal component analysis (PCA) was used to derive dietary patterns. Average cost of food was calculated from official Spanish government data. Self-reported weight was previously validated in the cohort. Body weight was assessed both at baseline and during follow-up. Results: PCA identified two dietary patterns, designated as western and Mediterranean. Participants with the highest scores on the western dietary pattern (fifth quintile vs first quintile) spent less money (-€0.64 (-$0.80) per 1000 kcal (95% CI -€0.68 to -€0.61, p for trend <0.001)) on their daily food costs, whereas the opposite was true for the Mediterranean dietary pattern (+€0.71 (+$0.90) (95% CI +€0.67 to +€0.74, p for trend <0.001). After adjusting for dietary pattern scores and other potential confounders, higher daily food costs were significantly associated with greater weight gain. Conclusions: These data suggest that a Mediterranean dietary pattern is more expensive to follow than a western dietary pattern. This economic barrier should be considered when counselling patients about following a healthy diet because cost may be a prohibitive factor.