The study aimed to estimate vitamin D intake and plasma/serum 25-hydroxyvitamin D (25(OH)D) concentrations, investigate determinants of 25(OH)D concentrations and compare two 25(OH)D assays. We conducted two nationwide cross-sectional studies in Sweden with 206 school children aged 10–12 years and 1797 adults aged 18–80 years (n 268 provided blood samples). A web-based dietary record was used to assess dietary intake. Plasma/serum 25(OH)D was analysed by liquid chromatography-mass spectrometry (LC-MS) and immunoassay in adults and LC-MS/MS in children. Most participants reported a vitamin D intake below the average requirement (AR), 16 % of children and 33 % of adults met the AR (7⋅5 μg). In adults, plasma 25(OH)D below 30 and 50 nmol/l were found in 1 and 18 % of participants during the summer period and in 9 and 40 % of participants during the winter period, respectively. In children, serum 25(OH)D below 30 and 50 nmol/l were found in 5 and 42 % of participants (samples collected March–May), respectively. Higher 25(OH)D concentrations were associated with the summer season, vacations in sunny locations (adults), and dietary intake of vitamin D and use of vitamin D supplements, while lower concentrations were associated with a higher BMI and an origin outside of Europe. Concentrations of 25(OH)D were lower using the immunoassay than with the LC-MS assay, but associations with dietary factors and seasonal variability were similar. In conclusion, vitamin D intake was lower than the AR, especially in children. The 25(OH)D concentrations were low in many participants, but few participants had a concentration below 30 nmol/l.