How Does the Sun Help Your Body Make Vitamin D?

The sun doesn’t actually contain vitamin D. Instead, ultraviolet B (UVB) rays from sunlight trigger a chemical reaction in your skin that starts a multi-step production process involving your liver and kidneys. Your body essentially manufactures its own vitamin D using sunlight as the catalyst, which is why vitamin D is often called the “sunshine vitamin.”

What Happens in Your Skin

Your skin cells contain a cholesterol compound called 7-dehydrocholesterol, sitting in the upper layers of the epidermis. When UVB rays hit these molecules, the energy breaks open part of the molecule’s ring structure, converting it into a precursor called pre-vitamin D3. This initial reaction happens relatively quickly during sun exposure.

Once pre-vitamin D3 forms, your body heat triggers a second change. The molecule slowly rearranges itself into vitamin D3 (cholecalciferol) through a process called thermal isomerization. At this point, vitamin D3 enters your bloodstream, but it’s still inactive. It can’t do anything useful for your bones or immune system yet.

How Your Liver and Kidneys Activate It

Vitamin D3 travels through the blood to your liver, where enzymes add a chemical group to it, turning it into a form called 25-hydroxyvitamin D. This is the form doctors measure when they check your vitamin D levels with a blood test. The liver is the primary, and possibly only, source of this circulating form.

From the liver, 25-hydroxyvitamin D moves to your kidneys for the final activation step. A specific enzyme converts it into the fully active hormone form: 1,25-dihydroxyvitamin D. This is the version your body actually uses to regulate calcium absorption, support bone health, and carry out immune functions. Your kidneys tightly regulate this conversion based on signals from parathyroid hormone and calcium and phosphate levels in the blood, so your body only activates as much as it needs.

How Much Sun Exposure You Need

When the UV Index is 3 or above, which is typical during summer months in most temperate regions, most people can maintain adequate vitamin D levels by spending just a few minutes outdoors on most days of the week. The UV Index needs to reach at least 3 for your skin to produce meaningful amounts of vitamin D.

The amount of skin you expose matters. Arms and legs uncovered during a short midday walk provide significantly more surface area than just your face and hands. The time of day matters too: UVB intensity peaks between roughly 10 a.m. and 3 p.m., making midday sun the most efficient window for vitamin D production.

Why Some People Make Less

Several factors reduce your skin’s ability to produce vitamin D, sometimes dramatically.

Skin tone: Melanin, the pigment that gives skin its color, absorbs some UVB before it can reach the cholesterol molecules that start the vitamin D process. However, the effect is smaller than many people assume. Research comparing the palest skin types to the darkest found that melanin reduces vitamin D production by a factor of only about 1.3 to 1.4. Darker-skinned individuals do need somewhat more sun exposure, but the difference is modest, not the five- or tenfold gap sometimes claimed.

Age: Older skin contains less of the precursor cholesterol compound. A study comparing skin samples from people in their teens with those in their late 70s and early 80s found that aging can decrease the skin’s capacity to produce vitamin D by more than twofold. This is one reason vitamin D deficiency is common in older adults even when they spend time outdoors.

Window glass: Glass absorbs all UVB radiation. Sitting in a sunny room or driving with the windows up will not produce any vitamin D in your skin, no matter how warm the sunlight feels. The same is true for plexiglass and plastic barriers. You need direct, unfiltered outdoor sunlight.

Geography and Season

The angle of the sun determines how much UVB actually reaches the ground. During winter at higher latitudes, sunlight travels through more atmosphere, and the UVB component gets filtered out before it reaches your skin. At latitudes above 50 degrees (think London, northern Germany, most of Canada, and southern Alaska), virtually no vitamin D is produced during winter and spring regardless of skin type. Even on clear days, the sun angle is simply too low.

People living in these regions often rely entirely on food sources and supplements during the colder months. This seasonal gap in production is a major reason why vitamin D deficiency tends to peak in late winter and early spring across northern countries.

What Healthy Vitamin D Levels Look Like

Doctors measure vitamin D status through a blood test for 25-hydroxyvitamin D, the form your liver produces. The National Academies of Sciences, Engineering, and Medicine defines the ranges as follows:

  • Below 12 ng/mL (30 nmol/L): Deficiency, associated with rickets in children and softened bones (osteomalacia) in adults
  • 12 to 19 ng/mL (30 to 49 nmol/L): Generally considered inadequate for bone and overall health
  • 20 ng/mL (50 nmol/L) or above: Sufficient for most people
  • Above 50 ng/mL (125 nmol/L): Potentially harmful, with higher levels linked to adverse effects

More is not better with vitamin D. Blood levels in the 30 to 48 ng/mL range have been associated with increased rates of all-cause mortality, certain cancers, cardiovascular events, and fractures in older adults. Toxicity, though rare, typically occurs at levels above 150 ng/mL and causes dangerously high calcium in the blood. This level of toxicity is essentially impossible to achieve through sun exposure alone, since your skin has a built-in regulation mechanism that breaks down excess pre-vitamin D3 when you’ve had enough UVB. Toxicity comes from oversupplementing.

Your Body’s Built-In Safety Limit

One of the elegant features of sun-driven vitamin D production is that your body can’t overdose on it. Once your skin has produced a certain amount of pre-vitamin D3, continued UVB exposure starts converting it into inactive byproducts instead of more vitamin D. This is why prolonged sun exposure doesn’t keep raising your vitamin D levels indefinitely. The process is self-limiting, which makes sunlight a fundamentally different source than supplements, where no such feedback loop exists.