Table of Contents
Key takeaways
Vitamin D is produced in the skin after exposure to UVB rays from the sun, making sunlight the original source for this essential nutrient.
Sunlight isn’t always sufficient for adequate vitamin D levels: Several factors, including geographical location, time of year, skin tone, age, clothing, glass windows, and sunscreen can significantly block UVB rays, reducing vitamin D production.
Balance is key for healthy sun exposure: Experts recommend not being “sun phobic,” while remaining mindful of potential overexposure and burning: Intentional, unprotected UV exposure is not routinely recommended as a strategy to maintain vitamin D because UV radiation increases skin cancer risk.
Several vitamin D alternatives exist like fortified foods, vitamin D3 supplements, and FDA-cleared UVB light therapy devices that don’t deliver UVA rays found in tanning beds.
Vitamin D deficiency can only be determined through the serum 25-hydroxyvitamin D blood test, also known as 25(OH)D. Symptoms like fatigue or muscle weakness are too nonspecific.
Introduction
As a fair-skinned woman with a family history of osteoporosis, figuring out the best way to get enough vitamin D from sunlight has been a challenge for most of my adult life. But I’ve known for a while that the sun alone wouldn’t be enough for me, the big clues being the need for daily sunscreen application (thanks to my Eastern European heritage) and a long-ago-prescribed daily vitamin D supplement.
The truth is, getting enough vitamin D from sunlight alone isn’t possible for many people, due to several blocking factors. But by the end of this article, you’ll understand how your skin makes vitamin D from sunlight, which blocking factors apply to you, and most importantly, you’ll have a clear picture of every reliable vitamin D alternative.
We’ll start with the overarching question: Do you get vitamin D from the sun?
Yes — Here's How Your Skin Makes Vitamin D From Sunlight
The first thing to understand about vitamin D and sunlight is that the sun itself doesn’t contain any vitamin D. Instead, there’s a complex connection between UVB rays and vitamin D: the latter is produced within the body from the sun’s rays.
According to a 2013 article in Dermato-endocrinology, when invisible UVB rays from the sun hit your epidermis, or outer layers of the skin, they convert a cholesterol compound (7-dehydrocholesterol) into previtamin D3.
Next, explains Debra Jaliman, MD, a board-certified dermatologist and clinical assistant professor at the Icahn School of Medicine at Mount Sinai in New York, the previtamin D3 is converted to vitamin D3 through your body heat. But this vitamin D3 “is inactive and must be converted two more times in the liver and kidney to the active form,” she says. The next step in the process is “the liver adds a hydroxyl group to make 25-hydroxyvitamin D. This is the form measured in blood [also known as 25(OH)D].” Finally, “the kidneys convert the 25(OH)D to the active form 1,25-dihydroxyvitamin D,” which is a more potent form of vitamin D your body actually uses (also known as calcitriol).
The UVB → D3 Pathway

How Much Sun Do You Actually Need?
There are a few ways to determine how much sun for vitamin D production that you need. Typical guidance includes anywhere from five to 30 minutes of sun exposure on the hands, face, neck, and arms in the summertime for people living in mid-latitudes like the Midwestern United States.
“About 5 to 30 minutes of uncovered skin, a few times per week, is enough in summer,” says Dr. Jaliman.
Since UVB peaks between 10 a.m. and p.m., this is usually the best time of day for vitamin D production and for scheduling a few minutes in the sun.
Another way to figure out a good time of day for sun exposure is the shadow rule: If your shadow is longer than your actual height — suggesting the sun is at a lower altitude — then it’s unlikely the UVB rays will be strong enough to trigger meaningful vitamin D production.
How Long Do You Need to Be Exposed to Sunlight to Make Vitamin D?
The honest answer? It depends.
“There really isn't one universal number,” says Patrick Tran, MD, FAAD, a board-certified dermatologist and Mohs micrographic surgeon. While he acknowledges generalized guidelines like the aforementioned five to 30 minutes of midday sun a few times a week, he also “wouldn't treat that like a prescription.”
That’s because, he continues, “five minutes of summer sun on fair skin in California is very different from five minutes on darker skin in New England in winter.”
There are six key factors — or blockers — that affect how much vitamin D you make from sunlight, which we’ll delve into in the next section:
Where you live and the time of year
Skin tone
Age
Sunscreen
Glass and windows
Clothing
6 Reasons the Sun May Not Give You Enough Vitamin D
In a perfect world, we’d all be able to get our daily dose of vitamin D from the sun. Unfortunately, there are several blockers to this goal that are beyond our control.
Where You Live and the Time of Year
If you live at a higher latitude (e.g., far away from the Equator), there’s much less opportunity for exposure to vitamin D-producing UVB light during the winter — even if it’s a sunny day — because of the sun’s low angle. People who live in cities like Boston, Chicago, Seattle, or London are unable to make sufficient amounts of vitamin D from approximately November through February.
However, UVB intensity increases dramatically, even at mid-latitudes, during the spring and summer months. Research, including a 2021 study published in The British Journal of Nutrition, has found that peak blood levels for 25(OH)D are more commonly observed in August and September (summertime), with far lower levels measured in March (wintertime).
Your Skin Tone
Melanin is a substance that not only absorbs UVB, but also plays a role in skin pigmentation. The more melanin in your skin, the darker your skin tone. Since people with darker skin tones absorb more UVB, they require more sun exposure than fair-skinned individuals to produce enough vitamin D.
One tool that clinicians use to determine possible production levels of vitamin D by skin tone is the Fitzpatrick scale. The Fitzpatrick scale rates the amount of pigment in your skin and how your skin reacts to the sun. People with Fitzpatrick skin types V (brown skin) and VI (black skin) will likely need additional sun exposure than people with Fitzpatrick skin types I-IV. In addition, those with Fitzpatrick skin types V and VI who also live in low-UV environments, such as northern latitudes, often exhibit lower vitamin D levels.
For individuals with higher melanin content living in northern latitudes, vitamin D production from sunlight may be substantially reduced.
Age
Your age is a significant factor in vitamin D production, with people aged 65 and over generating only one-fourth as much as people in their 20s.
This is primarily due to age-related changes in the skin. According to a 2022 paper published in Endocrine, the concentration of 7-dehydrocholesterol in the skin decreases by more than 50% between the ages of 20 and 80. The paper also reported an age-related reduction in vitamin D production of 13% per decade, with production at 70 years old half of what it was at 20 years old.
Sunscreen — Does It Block Vitamin D?
When it comes to the sunscreen and vitamin D question, the answer contains several nuances. Yes, sunscreen does reduce UVB transmission — SPF 15 blocks approximately 93% of UVB rays; SPF 30 blocks 97% of UVB rays — but physicians note that most people don’t apply sunscreen correctly or completely.
“People almost never apply sunscreen thickly or completely,” says Dr. Jaliman, “so enough UVB reaches the skin. Recommended sunscreen use has not been shown to cause vitamin D deficiency in healthy people.”
“There is a huge difference between sunscreen in a laboratory and sunscreen in real life,” observes Dr. Tran, who points to a 2025 study published in The British Journal of Dermatology, that provides a “more balanced answer.”
This study found that “routine” application of high SPF sunscreen does result in modestly lower vitamin D levels, as opposed to “discretionary” sunscreen use.
Glass and Windows
Unfortunately, many of our modern lifestyles make it much harder to access UVB from the sun, especially if you’re sitting in an office all day long — and bookending those days commuting in your car.
“Ordinary window glass blocks almost all of the UVB needed for vitamin D production,” says Dr. Tran. Even though you can feel the warmth and see the light “sitting beside a sunny office window,” it’s not equivalent to sitting outside. “You're not getting meaningful vitamin D [through a window],” he says.
This same issue follows us into our cars during our daily commutes to and from work, with UVB being “mostly blocked,” according to Dr. Tran. Also not helping? Potential UVA exposure.
The main difference between UVA and UVB rays is that UVA penetrates more deeply into the skin and can pass through window glass, while UVB is largely blocked by glass. Both UVA and UVB can damage the skin and contribute to skin cancer.
“You can potentially accumulate some photoaging exposure while driving without getting much of the UVB benefit for vitamin D,” says Dr. Tran. “That's also one reason we sometimes see more chronic sun damage on the side of the face that spends years facing a car window.”
Clothing
Clothing is another blocker of vitamin D production, confirms Dr. Jaliman, “because the fabric absorbs the UVB wavelengths needed to convert 7-dehydrocholesterol into previtamin D3. Only skin that is uncovered and exposed to sunlight makes vitamin D.”
Although clothing blocks UVB to different degrees, “depending on the fabric, weave, thickness, color, and whether it’s wet or dry,” says Dr. Tran, any covered areas “probably aren’t contributing much vitamin D production.”
This is another reason why he cautions against “blanket recommendations” like “everyone needs 10 minutes of sun”: “Ten minutes outside in shorts and a tank top is very different from ten minutes outside wearing pants, long sleeves, and a hat.”

Sun vs. Food vs. Supplements vs. UVB Light Therapy — The Honest Trade-offs
Since the six main blockers of sun exposure are, more often than not, out of our control, it’s worth examining alternatives for how to get vitamin D when sunlight isn’t reliable. The three main options (other than the sun) are food, supplements, and UVB light therapy, with each offering specific benefits — and trade-offs.
Read on for our thorough breakdown:
Comparison table: Sun vs. food vs. supplements vs. UVB light therapy
Source | Reliability | Works in winter or outdoors | UV exposure/vitamin D output |
Sun |
|
|
|
Food |
|
|
|
Supplements |
|
|
|
UVB light therapy |
|
|
|
The Skin-Cancer Trade-off
Several reputable sources — such as this Yale Medicine article — do argue that you don’t need daily sun exposure to produce healthy levels of vitamin D. This is because chronic UV overexposure remains a real skin-cancer risk.
But that doesn’t necessarily mean you should completely write off sunlight: This 2023 study published in Cureus asserts that sunlight is the primary method for boosting vitamin D levels, and that there are ways to increase UV exposure safely while keeping your skin protected.
Sun exposure is about balance and moderation, because it carries both risks and benefits.
“My advice is pretty simple,” says Dr. Tran: “You don't need to avoid the sun like a vampire, but you also don't need to intentionally roast yourself in it.” The goal, he continues, should be “smart sun behavior, not sun phobia.”
Dr. Tran’s practical approach to obtaining healthy sun exposure — while remaining mindful of skin cancer risks — is to avoid getting burned, wearing sunscreen “when you’re going to have meaningful exposure,” and wearing a hat or protective clothing “when it makes sense.”
If you are someone who has a history of skin cancer, photosensitivity, or very fair skin, however, the sun probably isn’t the right primary source of vitamin D for you.
Food Sources of Vitamin D
There are a few food sources that provide some vitamin D, but it can be difficult for some people to meet recommended vitamin D intake through naturally occurring food sources alone. The daily recommended amount of vitamin D, according to the National Institutes of Health, ranges from 600 to 800 IU (International Units) for adults.
These foods, according to Dr. Jaliman, include oily fish, egg yolks, milk, and certain mushrooms and fish liver oils. Below, she breaks down their vitamin D contributions:
Wild salmon (3.5 oz): ~600–1000 IU of vitamin D3. (“This is the best food source,” she says)
Canned salmon: (3.5 oz): approximately 300–600 IU
Farmed salmon: 100–250 IU
Canned sardines (3.5 oz): ~300 IU; mackerel: ~250 IU; tuna (3.6 oz): ~230 IU
Cod liver oil (1 tsp): ~400–1000 IU
Sun-dried shiitake mushrooms (3.5 oz): ~1600 IU (as D2); fresh shiitake ~100 IU
Egg yolk: ~20 IU each
Dr. Jaliman also notes that fortified foods “are the main way people get their vitamin D [from things they eat].” These can include milk, orange juice, yogurt, or breakfast cereal. But she warns, “the amounts are small”:
~100 IU per 8 oz of fortified milk, orange juice, or yogurt
~100 IU per serving of fortified cereal
Vitamin D Supplements
For individuals who do not obtain adequate vitamin D through diet or other sources, supplementation can help meet the recommended intake. And if you’re considering vitamin D supplements vs. sun to get your recommended daily intake, you’ll want to read on for the pros and cons.
The preferred form of vitamin D supplement is D3 (cholecalciferol): A 2011 study published in The Journal of Clinical Endocrinology and Metabolism found that D3 raises vitamin D levels 87% more effectively than equivalent doses of D2 (ergocalciferol), another form of supplemental vitamin D.
According to the National Institutes of Health, the recommended dietary allowances for vitamin D in most adults range from 600 to 800 IU. For reliable sufficiency, however, Dr. Jaliman says that daily supplement doses of 1000 to 2000 IU of D3 should be safe for most healthy adults. But if you’re specifically correcting a vitamin D deficiency, you may “temporarily require larger doses,” says Dr. Tran. Dosages in those cases should be determined by your healthcare provider.
It’s also important to keep in mind the limitations of vitamin D supplements. Follow-up 25(OH)D testing may be appropriate when treating documented vitamin D deficiency or in selected clinical situations. Jaliman also advises that people who are prone to kidney stones be “cautious” of vitamin D supplements, especially if taken with calcium. A 2011 study found higher indications of kidney stones among women taking both D3 and calcium supplements.
Finally, research suggests that vitamin D absorption may be reduced in people with malabsorptive gastrointestinal conditions or after bariatric surgery, and these individuals may require individualized dosing and monitoring.
UVB Light Therapy Devices
Phototherapy devices like the Solius Pro trigger the same skin synthesis pathway as sunlight, at wavelengths of 280-315nm.
Rest assured that UVB light therapy devices are not the same as tanning beds: Tanning beds emit primarily UVA rays, which do not support vitamin D production. Plus, UVA rays may be linked to melanoma and cause skin damage and aging.
UVB-specific devices, on the other hand, do not contain UVA, and deliver the wavelength that triggers vitamin D synthesis. Although UVB-specific devices avoid UVA exposure, UVB itself can cause erythema and DNA damage and contributes to skin cancer risk.
How Do You Know If You're Getting Enough?
Even though vitamin D is essential, it’s hard to know if you’re getting enough — mainly because mild vitamin D deficiency often causes no obvious symptoms, says Dr. Tran.
There are more significant vitamin D deficiency signs that you can monitor, but “you can’t reliably diagnose vitamin D deficiency” based on symptoms alone,” notes Dr. Tran.
The only way to know for certain is through a blood test, which we examine further below. Routine vitamin D screening is not recommended for all healthy individuals, but testing may be appropriate when there are clinical indications or risk factors for deficiency.
“I don't think every healthy person needs to constantly check their vitamin D level,” advises Dr. Tran. “Current guidelines do not recommend routine vitamin D screening for every otherwise healthy adult.”
What Are the Signs You Need Vitamin D?
Common signs of vitamin D deficiency can include:
Fatigue
Muscle weakness
Low energy
Vague aches
Joint pain
Because these symptoms are, according to Dr. Tran, “extremely nonspecific,” testing is the only reliable method to determine vitamin D deficiency.
Still, “more significant deficiency can contribute to muscle weakness, bone discomfort, decreased bone mineralization, and increased fracture risk,” he says. So if there’s a reason to check your levels, that blood test is called serum 25-hydroxyvitamin D, or 25(OH)D.
The 25(OH)D Blood Test and What the Numbers Mean
If you feel your vitamin D levels need to be checked, ask your healthcare provider for the
serum 25-hydroxyvitamin D [25(OH)D] test.
While the Food and Nutrition Board at the National Academies of Sciences, Engineering, and Medicine states that levels of 50 nmol/L (20 ng/mL) or more are sufficient for most people, Dr. Tran notes that “there’s some disagreement about the exact cutoff.” This is because, he says, “historically, many labs have called below 20 deficient, 20-29 insufficient, and 30 or above sufficient.”
Dr. Tran explains further that newer guidelines “have moved away from the idea that every healthy person needs to be above 30 ng/mL.”
In contrast, Dr. Holick, a longtime vitamin D researcher and former chair of the Endocrine Society's 2011 guidelines committee, argues the newer guideline overlooked association and observational research supporting broader health benefits, and maintains that levels of at least 30 ng/mL, with an optimal range of 40 to 60 ng/mL, are needed for maximum protective effects.
Depending on your test results, if your healthcare provider recommends a vitamin D treatment protocol Dr. Jaliman says the blood “should be retested after about 12 weeks of vitamin D supplements.”
The bottom line
There’s no doubt that sunlight is a cornerstone of how we get vitamin D — but it’s also impossible to ignore the blocking factors. Even though it’s unlikely most people can get enough vitamin D from sunlight alone, there are several alternatives available, whether it’s from fortified foods, supplements, or UVB light therapy like Solius.
Frequently asked questions (FAQs)
Do we get vitamin C or D from the sun?
We don’t get vitamin C from the sun, but UVB rays from the sun are integral to vitamin D production. When these rays hit your skin, they trigger vitamin D synthesis by converting a cholesterol compound (7-dehydrocholesterol) into previtamin D3. The previtamin D3 is then converted in the liver and kidneys to become the active form of vitamin D your body uses to absorb calcium and build strong bones.
Can you get vitamin D from the sun with sunscreen on?
Sunscreen reduces UVB transmission — SPF 15 blocks approximately 93% of UVB rays; SPF 30 blocks 97% of UVB rays — but physicians note that many people don’t apply sunscreen correctly or completely.
What's the best time of day to get vitamin D from the sun?
UVB availability is generally highest around midday; however, there is no universal recommendation for intentional unprotected sun exposure to obtain vitamin D, and UV-related skin damage risk also increases with greater UV exposure, so that shouldn’t be a green light to spend six hours in the sun with unprotected skin. Sun exposure still contains risk from UVA rays and it is difficult to determine how long you need to be in the sun for maximum UVB benefits for your skin tone.
Does sun through a window count?
No, sun through a window doesn’t count, unfortunately. Glass windows — whether they’re in an office building, your home, or your car — block almost all of the UVB needed for vitamin D production.
How long do I need to be in the sun to get vitamin D?
There isn’t one universal number that determines how long you need to be in the sun to get vitamin D. There are some generalized guidelines like five to 30 minutes of midday sun a few days a week, but those recommendations depend on the following six factors, or blockers:
Where you live and the time of year
Skin tone
Age
Sunscreen
Glass and windows
Clothing
Editorial Notes
This article is intended for general informational purposes and does not constitute medical advice. Consult a qualified healthcare provider before making changes to your supplement regimen or sun exposure practices, particularly if you have a medical condition or take medications that may affect vitamin D metabolism.






