NutriSeek

Is vitamin D from food as effective as sunlight?

General nutrition researchAnswered by NutriSeek AI · November 19, 2026

Yes, vitamin D from food raises your blood levels, and it works as well as the vitamin D your skin makes. The difference is in how reliable each source is. Sunlight's contribution varies a lot with season, latitude, skin tone and sunscreen, while food gives a steadier but usually smaller amount.

Same vitamin, different routes

Your skin makes vitamin D3 when UVB rays hit it. Animal foods such as fish and eggs contain D3 too, and some foods and supplements contain D2, a plant- and fungi-derived form. Your body converts all of these into the same storage form, which is what a blood test measures.

Research generally suggests D3 raises blood levels somewhat more effectively than D2, though the evidence on the size of the gap is mixed. Either way, food-based vitamin D does count toward your levels.

What food can provide

Here is what the USDA data show, per 100 g (the Atlantic farmed salmon and egg entries are raw; the sardines are canned in oil, drained, with bone):

Food Vitamin D per 100 g
Farmed Atlantic salmon, raw 11 µg
Sardines, canned in oil 4.8 µg
Whole egg, raw 2 µg
White mushrooms, raw 0.2 µg

A 3 oz (85 g) portion of salmon works out to roughly 9 µg. Sardines and eggs give less, and standard white mushrooms contribute almost nothing. Some mushrooms are exposed to UV light and contain much more, but that isn't what this USDA entry covers, so check the label.

For context, adult recommendations in the US are typically around 15 µg (600 IU) a day, rising to 20 µg (800 IU) for older adults. These figures are widely used, though some countries set them differently. Most people would need fatty fish regularly to reach that from food alone.

Why sunlight is harder to compare

Sun exposure can produce a lot of vitamin D, but the amount is unpredictable:

  • Season and latitude: In winter at higher latitudes, the sun is too low for much UVB to reach the skin.
  • Skin tone: Darker skin has more melanin, which reduces vitamin D production, so it generally takes longer exposure to make the same amount.
  • Age: Skin makes less vitamin D as we get older.
  • Sunscreen and clothing: Both reduce production, though real-world sunscreen use is rarely perfect.

Skin also regulates itself: it stops making more once it has produced enough, so you can't overdose from sunlight. That safety feature doesn't apply to supplements. Sun exposure carries its own skin-cancer risk, so it's not a free source.

Practical takeaways

  • Food and sunlight both work, and many people use a mix.
  • If you live far from the equator, spend most of your time indoors, have darker skin, or are older, food alone may not be enough in winter.
  • Supplements are a common way to fill gaps. Because high doses can cause harm over time, it's worth asking a doctor, pharmacist or registered dietitian before starting one, especially if you're pregnant or have a medical condition. A simple blood test can show whether your levels are low.

Further reading from the NIH

Ask next

More in this topic

Food Facts & Comparisons

Foods in this answer

Full nutrition facts