Vitamin D is not actually absorbed from sunlight. Your skin manufactures it. When ultraviolet B rays strike a cholesterol-related compound sitting in your outer skin layers, they kick off a chain of chemical reactions that ultimately produces a molecule your liver and kidneys convert into the hormone your body uses. The process is more like a small factory line than a sponge soaking up nutrients, and a surprising number of variables determine how efficiently that factory runs on any given day.
The Chemical Reaction in Your Skin
The raw material is a molecule called 7-dehydrocholesterol, a form of cholesterol that lives in the membranes of cells in your epidermis. When UVB photons in a narrow wavelength band (roughly 295 to 315 nanometers) penetrate the outer layers of skin, they break open one of the carbon rings in 7-dehydrocholesterol, creating a new molecule called previtamin D3.1PubMed. The photoproduction of 1 alpha,25-dihydroxyvitamin D3 in skin: an approach to the therapy of vitamin-D-resistant syndromes That first step is purely photochemical: it needs light energy and cannot happen in the dark.
What follows is driven by body heat rather than sunlight. Previtamin D3, trapped in its specific shape within the cell membrane, slowly rearranges itself into vitamin D3 (cholecalciferol) through a temperature-dependent process that takes hours to days.2PubMed. Evolutionary importance for the membrane enhancement of the production of vitamin D3 in the skin of poikilothermic animals The membrane itself plays a role: it holds previtamin D3 in the right configuration so the thermal conversion happens much faster than it would if the molecule were floating freely in solution. Once formed, vitamin D3 is picked up by a binding protein in the blood and carried into the circulation.1PubMed. The photoproduction of 1 alpha,25-dihydroxyvitamin D3 in skin: an approach to the therapy of vitamin-D-resistant syndromes
From Skin to Active Hormone
Vitamin D3 leaving the skin is not yet the active hormone. It travels first to the liver, where an enzyme adds a hydroxyl group to create 25-hydroxyvitamin D3, commonly written as 25(OH)D. This is the form doctors measure in blood tests to check your vitamin D status. From the liver, 25(OH)D travels to the kidneys, where a second hydroxylation produces 1,25-dihydroxyvitamin D (calcitriol), the biologically active form that regulates calcium absorption, bone metabolism, and immune function.3JAMA Pediatrics. Reemerging Nutritional Rickets: A Historical Perspective So the sunlight-dependent step is really just the first domino: UVB triggers previtamin D3 production, body heat converts it to vitamin D3, and your organs do the rest.
A Built-In Safety Brake
One of the clever features of this system is that prolonged sun exposure does not cause vitamin D to pile up indefinitely. Previtamin D3 and vitamin D3 themselves absorb UVB, and continued irradiation converts them into biologically inactive photoproducts.4PubMed Central. Sunlight and Vitamin D: A global perspective for health This means the skin reaches a plateau of vitamin D3 production fairly quickly during a single sun session. Spending all day at the beach does not give you ten times more vitamin D than a short exposure; after a certain point, the same UV energy that created vitamin D starts breaking it down. This self-regulating mechanism is one reason vitamin D toxicity from sun exposure alone has never been documented, though the UV damage to DNA accumulates with no such ceiling.5PubMed. Nucleotide Excision Repair and Vitamin D–Relevance for Skin Cancer Therapy
The Narrow UVB Window
Not all ultraviolet light triggers vitamin D synthesis. UVA, which makes up the overwhelming majority of UV radiation reaching the ground, does essentially nothing for vitamin D production. Only UVB in the approximate range of 295 to 315 nm does the job, and the most efficient wavelengths cluster near 297 nm.6PubMed Central. Long-term ultraviolet B irradiation at 297 nm with light-emitting diode improves bone health via vitamin D regulation A study testing polychromatic UV spectra on 75 healthy volunteers found that the traditional action spectrum for previtamin D3 (derived from lab samples outside the body) needed to be shifted slightly toward shorter wavelengths to match what actually happened in living people.7PubMed Central. A revised action spectrum for vitamin D synthesis by suberythemal UV radiation exposure in humans in vivo This matters for public-health calculations that try to balance the cancer risk of UV exposure against the vitamin D benefit: the numbers researchers have been using for decades may not quite match how skin behaves in real life.
The narrowness of this wavelength window explains why so many environmental factors can shut down vitamin D synthesis. Anything that selectively filters out UVB, whether glass, ozone, smog, clouds, or clothing, reduces or eliminates production even when plenty of visible light and UVA are getting through.
Why Latitude, Season, and Time of Day Matter
The angle at which sunlight hits the atmosphere determines how much UVB reaches the ground. When the sun is low on the horizon, its rays must travel through a thicker slice of atmosphere, and UVB wavelengths are preferentially absorbed along the way. This is why vitamin D production is heavily dependent on where you live, what time of year it is, and what time of day you step outside.
In tropical and subtropical locations (below about 35° latitude), measurable vitamin D synthesis occurs year-round, though production in winter months can drop dramatically compared to summer. A study comparing two Brazilian cities, one near the equator and one at 23°S, found that winter conversion was over 50 percent lower at the more southerly site.8PubMed. Sun-induced production of vitamin D(3) throughout 1 year in tropical and subtropical regions: relationship with latitude, cloudiness, UV-B exposure and solar zenith angle Move farther from the equator and the problem gets worse. Modeling work in the Mediterranean basin estimated that blood levels of 25(OH)D fall by roughly 4 nmol/L for every degree of latitude you move toward the poles.9Scientific Reports. UV index-based model for predicting synthesis of (pre-)vitamin D3 in the mediterranean basin At latitudes above about 50° (think London, Vancouver, or northern Germany), there are months in winter when UVB at the surface is essentially zero, making cutaneous vitamin D production impossible no matter how long you stay outside.
Time of day matters for the same reason. Midday sun, when UVB is at its peak, is the most efficient window for vitamin D synthesis. Early morning and late afternoon sun may feel warm and bright but carry very little UVB.
Skin Tone and Melanin
It is widely stated that darker skin needs dramatically more sun exposure to produce the same amount of vitamin D. The reality, according to controlled human studies, is more nuanced than that. Melanin does absorb UVB and thereby slows vitamin D3 production, but the effect is smaller than many sources suggest. A study that compared the lightest and darkest skin types (Fitzpatrick types II and VI) under the same sub-sunburn UVB dose found melanin inhibition factors of only about 1.3 to 1.4, meaning the darkest skin made roughly 70 to 75 percent as much vitamin D as the lightest skin under identical conditions.10Journal of Investigative Dermatology. Melanin has a Small Inhibitory Effect on Cutaneous Vitamin D Synthesis: A Comparison of Extreme Phenotypes
That is a real difference, and the researchers noted it could be enough to help explain population-level disparities in vitamin D status. But it is a far cry from the tenfold differences sometimes cited in popular health advice. The larger issue for people with darker skin may be behavioral and geographic: populations with deep pigmentation who live at high latitudes face the double challenge of melanin’s modest filtering effect and winter months with almost no usable UVB. The small per-exposure deficit compounds across an entire season of low sunlight.
Aging and the Shrinking Precursor Pool
Age works against vitamin D synthesis in a straightforward way: older skin contains less of the raw material. Research examining skin samples from people aged 8 to 92 found an age-dependent decline in epidermal concentrations of 7-dehydrocholesterol, the precursor molecule that UVB converts to previtamin D3.11PubMed Central. Aging decreases the capacity of human skin to produce vitamin D3 With less starting material available, the same amount of sun exposure produces less vitamin D in an older person than in a younger one. This is one reason why vitamin D supplementation is commonly recommended for older adults, even those who spend time outdoors.
The Sunscreen Debate
Sunscreen is designed to block UVB, so in theory it should crush vitamin D production. And in the lab, it does: controlled experiments using artificial UV sources show that sunscreen substantially reduces the amount of vitamin D3 the skin produces.12PubMed. The effect of sunscreen on vitamin D: a review But real-world field trials tell a different story. When researchers gave people sunscreen (with moderate SPF, around 16) to use daily and measured their blood vitamin D over time, they found no meaningful drop compared to non-users.12PubMed. The effect of sunscreen on vitamin D: a review
The likely explanation is that nobody applies sunscreen perfectly. People miss spots, apply too thin a layer, reapply late, and still get incidental UV exposure on uncovered skin throughout the day. The gap between lab conditions and everyday use is large enough that regular sunscreen application does not appear to cause vitamin D deficiency in practice. This finding undercuts the common argument that sunscreen use should be limited to preserve vitamin D. The skin cancer risk from unprotected UV exposure is concrete and well-documented; the vitamin D risk from wearing sunscreen appears to be largely theoretical.
Air Pollution as a Hidden Filter
Less discussed but increasingly studied is the role of air pollution in blocking the UVB that reaches your skin. Particulate matter, ground-level ozone, sulfur dioxide, and other pollutants absorb and scatter UVB radiation before it reaches the surface.13PubMed Central. Relationship between Air Pollution and Serum Vitamin D Levels: A Systematic Review and Meta-Analysis A systematic review concluded that nearly all available studies agree: air pollution reduces vitamin D levels by cutting UVB exposure, with tropospheric ozone and particulate matter acting as independent risk factors for deficiency.14Food and Chemical Toxicology. The impact of air pollutants, UV exposure and geographic location on vitamin D deficiency
This helps explain an observation that keeps surfacing in research: children and adults in urban areas tend to have lower vitamin D levels than their rural counterparts, even at the same latitude. A multi-center study of adolescents found that urban children had lower vitamin D concentrations and less effective sun exposure than rural children.15Cureus. Relationship Between Sunlight Exposure, Erythemal Dose, and Vitamin D Concentrations in Adolescents: A Cross-Sectional, Multi-center Study Living in a smoggy city may quietly undermine your skin’s ability to produce vitamin D, even if you spend time outside.
How Sun Exposure Compares to Supplements
Given all the variables that influence cutaneous synthesis, a reasonable question is whether sun exposure is even an efficient way to get vitamin D. A randomized clinical trial comparing sun exposure to oral vitamin D3 supplements in young adults found that oral supplementation was substantially more effective. After eight weeks, the supplement group saw their 25(OH)D levels rise by about 8.5 ng/mL more than placebo, while the sun exposure group gained only about 2.2 ng/mL more than placebo.16PubMed. Effect of sun exposure versus oral vitamin D supplementation on serum 25-hydroxyvitamin D concentrations in young adults: A randomized clinical trial By the end of the trial, over half of the supplement group had reached sufficient vitamin D levels, compared to about 12 percent in the sun exposure group.
This does not mean sun exposure is worthless for vitamin D. It means that casual, everyday outdoor time, particularly in less-than-ideal UV conditions, often does not produce enough to meaningfully move the needle on blood levels. If your goal is reliably correcting or preventing a deficiency, supplements provide a controlled dose that bypasses all the atmospheric, geographic, and skin-related variables. Sun exposure remains a contributor for people who get regular outdoor time in conditions where UVB is strong, but it is unreliable as a sole strategy.
Why Human Skin Color Tracks Vitamin D Geography
The relationship between UV radiation, vitamin D, and skin runs deep enough to have shaped human evolution. The vitamin D-folate hypothesis proposes that human skin pigmentation evolved as a balancing act between two UV-sensitive nutrients. Folate, a B vitamin critical for DNA repair and fetal development, breaks down when exposed to UV radiation. Vitamin D, as described above, requires UV to be synthesized. In equatorial Africa, where UV exposure is intense year-round, deeply pigmented skin evolved to protect folate stores from degradation.17PubMed Central. The vitamin D-folate hypothesis in human vascular health
As human populations migrated toward higher latitudes, where UV exposure drops and shows strong seasonal variation, the selective pressure flipped. Now the threat was insufficient vitamin D synthesis during long, dark winters. Lighter skin, which lets more UVB through, became advantageous. The hypothesis suggests that depigmentation evolved in these populations to allow adequate vitamin D production under reduced sunlight.18PubMed Central. The Vitamin D−Folate Hypothesis as an Evolutionary Model for Skin Pigmentation: An Update and Integration of Current Ideas Skin color, in this view, is an evolutionary thermostat calibrated to the UV environment: dark enough to guard folate where the sun is strong, light enough to enable vitamin D synthesis where the sun is weak.
Novel Photoproducts From UV Exposure
The story of what UV light does to 7-dehydrocholesterol in the skin does not end with vitamin D3. Researchers have identified additional metabolic pathways in which enzymes in the skin act on 7-dehydrocholesterol to produce entirely different families of steroid-like molecules. When UVB then hits these enzymatic products, it generates a range of novel secosteroids, some of which have distinct biological activity of their own.19PubMed Central. Novel vitamin D photoproducts and their precursors in the skin The full scope of what these molecules do is still being mapped out, but their existence suggests that sunlight’s interaction with skin chemistry is richer than the textbook “UVB makes vitamin D” story implies. The skin appears to be a more active endocrine organ than it was given credit for, using UV radiation as a trigger for several parallel chemical processes, not just one.