Background Several international guidelines recommend the consumption of two servings of fruits and three servings of vegetables per day, but their intake is thought to be low worldwide. We aimed to determine the extent to which such low intake is related to availability and affordability. Methods We assessed fruit and vegetable consumption using data from country-specific, validated semi-quantitative food frequency questionnaires in the Prospective Urban Rural Epidemiology (PURE) study, which enrolled participants from communities in 18 countries between Jan 1, 2003, and Dec 31, 2013. We documented household income data from participants in these communities; we also recorded the diversity and non-sale prices of fruits and vegetables from grocery stores and market places between Jan 1, 2009, and Dec 31, 2013. We determined the cost of fruits and vegetables relative to income per household member. Linear random effects models, adjusting for the clustering of households within communities, were used to assess mean fruit and vegetable intake by their relative cost. Findings Of 143 305 participants who reported plausible energy intake in the food frequency questionnaire, mean fruit and vegetable intake was 3·76 servings (95% CI 3·66–3·86) per day. Mean daily consumption was 2·14 servings (1·93–2·36) in low-income countries (LICs), 3·17 servings (2·99–3·35) in lower-middle-income countries (LMICs), 4·31 servings (4·09–4·53) in upper-middle-income countries (UMICs), and 5·42 servings (5·13–5·71) in high-income countries (HICs). In 130 402 participants who had household income data available, the cost of two servings of fruits and three servings of vegetables per day per individual accounted for 51·97% (95% CI 46·06–57·88) of household income in LICs, 18·10% (14·53–21·68) in LMICs, 15·87% (11·51–20·23) in UMICs, and 1·85% (−3·90 to 7·59) in HICs (ptrend=0·0001). In all regions, a higher percentage of income to meet the guidelines was required in rural areas than in urban areas (p<0·0001 for each pairwise comparison). Fruit and vegetable consumption among individuals decreased as the relative cost increased (ptrend=0·00040). Interpretation The consumption of fruit and vegetables is low worldwide, particularly in LICs, and this is associated with low affordability. Policies worldwide should enhance the availability and affordability of fruits and vegetables. Funding Population Health Research Institute, the Canadian Institutes of Health Research, Heart and Stroke Foundation of Ontario, AstraZeneca (Canada), Sanofi-Aventis (France and Canada), Boehringer Ingelheim (Germany and Canada), Servier, GlaxoSmithKline, Novartis, King Pharma, and national or local organisations in participating countries.