How the Sun Actually Gives You Vitamin D

Your skin manufactures vitamin D when ultraviolet B rays from the sun hit a cholesterol compound sitting in your outer skin layers. This triggers a chain of chemical conversions that moves through your liver and kidneys before producing the active form of vitamin D your body actually uses. The process is elegant but surprisingly easy to disrupt: window glass, sunscreen, geography, and even the time of year can shut it down entirely.

The Chemical Reaction in Your Skin

Your body prepares for vitamin D production before you ever step outside. Cholesterol from food gets converted in your gut into a precursor molecule called 7-dehydrocholesterol, which is then transported to your skin, concentrating in the epidermis (your outermost layer). This molecule is essentially a vitamin D precursor waiting for a trigger.

That trigger is UVB radiation, specifically wavelengths between 270 and 300 nanometers. When these rays penetrate your skin and strike 7-dehydrocholesterol, the energy breaks open a chemical bond in the molecule, reshaping it into what’s called pre-vitamin D3. Body heat then slowly converts pre-vitamin D3 into vitamin D3 (cholecalciferol). This is the form that enters your bloodstream, but it’s not yet active. Think of it as a raw material that needs two more rounds of processing.

How Your Liver and Kidneys Finish the Job

Vitamin D3 from your skin travels through the blood to your liver, where enzymes add a chemical group to create a storage form. This intermediate circulates in your blood and is what doctors measure when they check your vitamin D levels.

The final activation happens in your kidneys, where another enzyme modifies the molecule one more time into calcitriol, the fully active hormone. Calcitriol is what regulates calcium absorption in your gut, supports bone mineralization, and influences immune function. Without both of these organ-level processing steps, the vitamin D your skin produces can’t do its job. This is one reason people with kidney disease often develop vitamin D deficiency regardless of how much sun they get.

How Much Sun Exposure You Actually Need

The amount of sun needed is far less than most people assume. Exposing your face, arms, and hands for about 5 minutes of midday summer sun (in a location like Boston) is enough for lighter-skinned individuals to produce a day’s worth of vitamin D. More broadly, getting that same skin area into the sun two to three times a week, for just long enough that your skin begins to turn slightly pink, covers your needs without requiring prolonged exposure.

When the UV index is 3 or above, a few minutes of exposure on most days is sufficient. When it drops below 3, you need longer: roughly two to three hours of cumulative weekly exposure to the face, arms, and hands to produce adequate vitamin D. You can check the UV index for your area in most weather apps.

Why You Can’t Make Vitamin D Through a Window

Standard window glass blocks virtually all UVB radiation. Glass is transparent to wavelengths longer than about 330 nanometers, but UVB rays that trigger vitamin D synthesis fall between 270 and 300 nanometers. Those wavelengths simply don’t pass through. You can get a suntan sitting by a window because UVA rays (which cause tanning and aging) do penetrate glass, but your skin won’t produce any vitamin D. The same applies to car windows. If you work indoors near a sunny window, that light isn’t contributing to your vitamin D levels.

What Sunscreen Does to the Process

Sunscreen works by absorbing or reflecting UV radiation before it reaches deeper skin layers, and that includes the UVB wavelengths responsible for vitamin D production. Applied at the recommended thickness (2 mg per square centimeter), a sunscreen with SPF 30 can reduce vitamin D production by as much as 99%.

In practice, though, most people apply sunscreen far thinner than that. One study using half the recommended application found that about 22% of normal vitamin D production still occurred. So real-world sunscreen use likely reduces vitamin D synthesis significantly without eliminating it completely. This is one reason dermatologists don’t consider sunscreen a major cause of deficiency for most people, even though it does reduce production in a dose-dependent way.

Geography and Season Matter More Than You Think

If you live north of about 37 degrees latitude (roughly the line running through Los Angeles, Richmond, Virginia, and southern Spain), UVB rays during winter are too weak for meaningful vitamin D synthesis. From roughly November through March, the sun sits so low in the sky that the atmosphere filters out most UVB before it reaches the ground. During these months, your body relies on stored vitamin D, dietary sources, or supplements.

This geographic limitation affects a huge portion of the population in the United States, Canada, the UK, and northern Europe. It also explains why vitamin D deficiency follows a seasonal pattern, with blood levels dipping lowest in late winter and peaking in late summer.

Does Skin Color Affect Vitamin D Production?

The conventional wisdom has long been that darker skin requires significantly more sun exposure to produce the same amount of vitamin D, because melanin absorbs UVB radiation and competes with the precursor molecule for those photons. While melanin does absorb UVB, the relationship turns out to be more nuanced than originally thought.

A controlled study published in the Journal of Investigative Dermatology found that after standardized UVB exposure, the increase in blood vitamin D levels was not significantly correlated with skin pigmentation. Instead, the two strongest predictors were baseline vitamin D level (people who started lower gained more) and total cholesterol level (since the precursor molecule is derived from cholesterol). This doesn’t mean melanin plays zero role, but it suggests that other factors, particularly how much sun you’ve been getting recently and your starting vitamin D status, may matter more than skin tone alone.

Does Aging Reduce Your Skin’s Capacity?

A widely cited 1985 study found that elderly skin produced about half as much pre-vitamin D as young skin when exposed to the same UVB dose, and attributed this to lower concentrations of the precursor molecule. That finding shaped decades of recommendations suggesting older adults need more sun or higher supplement doses.

However, more recent research has challenged this. A comparative study of healthy older and younger adults found no significant difference in the skin concentration of the vitamin D precursor between groups (0.22 versus 0.25 micrograms per milligram). The earlier study used surgical skin specimens from patients aged 8 to 92, while the newer work measured precursor levels in healthy, living volunteers. The practical takeaway: aging may not impair skin vitamin D production as dramatically as once believed, though older adults still tend to have lower vitamin D levels overall, likely because they spend less time outdoors and may have reduced dietary intake.