What Is the Sunshine Vitamin? Vitamin D Explained

The sunshine vitamin is vitamin D, a nutrient your body produces when ultraviolet B (UVB) rays from sunlight hit your skin. It earned this nickname because, unlike almost every other vitamin, you don’t need to get it from food. Your skin can manufacture it on its own, given enough sun exposure. Vitamin D plays a central role in bone health, immune function, and mood regulation, and roughly one billion people worldwide don’t get enough of it.

How Your Skin Makes Vitamin D

Your skin contains a cholesterol compound called 7-dehydrocholesterol. When UVB rays penetrate the outer layers of skin, they convert this compound into a precursor form of vitamin D3. That precursor then travels to the liver and kidneys, where it’s converted into the active hormone your body actually uses. This active form influences the expression of more than 300 genes.

The process is remarkably efficient in the right conditions. Exposing bare arms and legs to midday sun (between 10 a.m. and 3 p.m.) for 5 to 30 minutes, twice a week, can be enough to meet your vitamin D needs. But that range is wide for a reason: skin pigmentation, season, latitude, and age all change the equation. Melanin, the pigment that darkens skin, competes with 7-dehydrocholesterol for UV absorption. People with dark skin may need up to ten times longer in the sun to produce the same amount of vitamin D as someone with fair skin.

Why Winter and Location Matter

Geography puts a hard limit on vitamin D production. In the northern hemisphere, UVB rays are too weak from roughly October through March at higher latitudes. During those months, spending the entire day outdoors won’t guarantee adequate vitamin D levels because the sun’s angle filters out the specific wavelengths your skin needs. This is a major reason vitamin D deficiency spikes in winter, even among people who spend time outside regularly.

Sunscreen, clothing, window glass, and cloud cover all block UVB as well. Glass filters out nearly all UVB radiation, so sitting in a sunny office or car doesn’t contribute to vitamin D production. These environmental barriers help explain why deficiency is so common even in relatively sunny regions.

What Vitamin D Does in Your Body

The most well-known role of vitamin D is helping your body absorb calcium. Without adequate vitamin D, your intestines absorb only a fraction of the calcium you eat, which over time weakens bones and raises the risk of fractures and conditions like osteoporosis. This is why vitamin D and calcium are so often discussed together.

Its role in immunity is less familiar but equally important. Immune cells, including T cells and B cells, carry vitamin D receptors and can even activate vitamin D precursors on their own. Vitamin D helps calibrate the immune response: it promotes regulatory immune cells that prevent the system from overreacting, while dampening the inflammatory signals linked to autoimmune conditions. It essentially acts as a moderator, helping your immune system respond to real threats without attacking your own tissues.

Vitamin D also influences brain chemistry. It activates the gene responsible for producing tryptophan hydroxylase 2, an enzyme that converts the amino acid tryptophan into serotonin in the brain. Serotonin is a key neurotransmitter involved in mood, sleep, and social behavior. Interestingly, vitamin D appears to simultaneously suppress serotonin production in the gut, where excess serotonin can promote inflammation. This dual action helps explain the well-documented link between low vitamin D levels and depression, particularly seasonal depression that worsens in winter months when sun exposure drops.

Signs of Deficiency

Vitamin D deficiency often develops without obvious symptoms, which is part of what makes it so widespread. When symptoms do appear, they tend to be vague: persistent fatigue, muscle weakness, bone pain, and a general sense of not feeling well. In more severe cases, deficiency leads to softening of the bones in adults (osteomalacia) and rickets in children.

A blood test measuring 25-hydroxyvitamin D is the standard way to check your levels. According to Mayo Clinic Laboratories, the ranges break down as follows:

  • Below 10 ng/mL: severe deficiency
  • 10 to 19 ng/mL: mild to moderate deficiency
  • 20 to 50 ng/mL: optimal levels
  • 51 to 80 ng/mL: increased risk of excess calcium in urine
  • Above 80 ng/mL: toxicity possible

People at higher risk for deficiency include those with dark skin, older adults (the skin’s production capacity declines with age), people who live at northern latitudes, those who spend little time outdoors, and anyone who covers most of their skin for religious or cultural reasons.

Food Sources of Vitamin D

Very few foods naturally contain significant vitamin D, which is another reason sunlight is so central. The richest natural sources are fatty fish and fish liver oils. Per serving, the top food sources are:

  • Cod liver oil (1 tablespoon): 1,360 IU
  • Rainbow trout, farmed and cooked (3 ounces): 645 IU
  • Sockeye salmon, cooked (3 ounces): 570 IU
  • White mushrooms exposed to UV light (½ cup): 366 IU
  • Sardines, canned (2 sardines): 46 IU

Mushrooms are the only notable plant source, and only when they’ve been exposed to UV light, either from sunlight or commercial UV treatment. Many grocery stores now sell UV-treated mushrooms labeled with their vitamin D content. Beyond whole foods, milk, orange juice, and many cereals in the U.S. are routinely fortified with vitamin D, which helps close the gap for people who don’t eat much fish.

Supplements and Safe Limits

For people who can’t get enough through sunlight or food, vitamin D supplements are widely available in two forms: D2 (ergocalciferol, plant-derived) and D3 (cholecalciferol, the same form your skin makes). D3 is generally more effective at raising and maintaining blood levels. Most adults need 600 to 800 IU daily, though people with confirmed deficiency often take higher doses temporarily under medical guidance.

Unlike water-soluble vitamins, vitamin D is fat-soluble, meaning your body stores it in fat tissue rather than flushing out the excess. This makes toxicity possible with very high supplemental doses over time. You cannot overdose on vitamin D from sun exposure alone, because your skin self-regulates production. Toxicity from supplements causes a dangerous buildup of calcium in the blood, leading to nausea, kidney problems, and in extreme cases, cardiac issues. Blood levels above 80 ng/mL enter the toxicity range, but this typically only happens with sustained intake well above normal recommendations.

Getting Enough Without Overdoing Sun Exposure

The practical challenge with vitamin D is balancing skin cancer risk against the need for UVB exposure. The 5-to-30-minute window for bare skin in midday sun, twice a week, is a reasonable starting point for most people during months when UVB is strong enough. You don’t need to tan or burn. For fair-skinned individuals, just a few minutes before applying sunscreen can be enough. For those with darker skin, the window shifts toward the longer end of that range.

During winter months at higher latitudes, when UVB production drops to near zero, a combination of vitamin D-rich foods and supplementation becomes the only reliable strategy. This is especially relevant for people living in the northern United States, Canada, the UK, Scandinavia, and similar latitudes, where six months of limited UVB exposure can gradually deplete stored vitamin D if it isn’t replaced through diet or supplements.