Can You Get Vitamin D Through a Window?

As shocking as it is when you really think about it, most Americans spend approximately 90 percent of their time indoors [1] — and it’s not a stretch to assume that the situation in many other countries is similar. 
Do you have the good luck of being surrounded by lots of beautiful, large windows that let in lots of sunlight at home or at work? That might impact your mood positively, but if you’re health conscious and concerned about vitamin D, you may also wonder if you can get the “sunshine vitamin” through a window. 

The TLDR Version: Can You Get Vitamin D Through a Window?

  • Vitamin D is a fat-soluble vitamin that is essential for strong bones, healthy nerves and muscles, and a robust immune system. 
  • The human body makes vitamin D in response to direct exposure to the sun’s UVB rays, but you can also get it from certain foods and from supplements. 
  • Glass windows block UVB rays. Therefore, you unfortunately can’t get vitamin D through a window. 
  • Many other factors, including altitude, skin tone, air pollution, and seasonal sunlight fluctuations, also impact your ability to make vitamin D from sunlight. 

What Is Vitamin D? Why Is It So Important?

Vitamin D, frequently called the “sunshine vitamin,” is a fat-soluble vitamin mainly known for its role in keeping your bones strong and healthy. Besides making sure that your body can properly absorb the calcium you get through your diet or supplements, vitamin D also helps with proper muscle function, nerve signaling, and heart and blood vessel health. Finally, vitamin D is one of many micronutrients you need for a strong immune system capable of fighting bacteria and viruses effectively. [2]
Vitamin D comes in two forms, vitamin D2 and vitamin D3. Vitamin D2, also called ergocalciferol, is found in plants and fungi that have been exposed to UV light. Vitamin D3 is found in some animal sources (liver meats, egg yolks, and some fatty fish), and your skin also makes it when you enjoy direct sun exposure. 
Without getting too technical, these two forms of vitamin D don’t just come from different sources. They also have different chemical structures. While the liver and kidneys convert both of them into 25-hydroxyvitamin D, a form your body can use, vitamin D3 does this more effectively. [3]

What Happens if You Don’t Get Enough Vitamin D? 

Severe vitamin D deficiencies in growing children can cause rickets, a condition characterized by bent, incorrectly growing bones, joint deformities, bone pain, and weak muscles. Thankfully, this condition is rare in the modern world — in large part because so many foods are now routinely fortified with vitamin D. 
Adults who don’t get enough vitamin D may experience chronic fatigue, bone pain, weak and aching muscles, mood swings, and depression. Those who are more severely deficient have a bigger risk of developing osteoporosis, where your bones lose mass and become brittle, significantly increasing the risk of fractures. [2, 3]
Not good! If vitamin D is on your radar and you want to take steps to ensure you’re getting enough, you’re on the right track in your mission to be as healthy as possible. While a blood test can determine if you are vitamin D deficient, doctors don’t often order this test. Instead, they base recommendations about supplementation on your risk factors and lifestyle. 

Can You Get Vitamin D From Sun Through Windows?

This one’s simple — no. You’re not the only person to have asked this question. Lots of research has gone into determining the correct answer. It turns out that glass windows completely block UVB rays, and you cannot get vitamin D through a window. [4]
The fact that glass windows block UVB rays is good news when you’re trying to prevent sunburn and are serious about reducing your risk of skin cancer [5], but it can pose a challenge for people who are worried about their vitamin D levels. 
So, can you receive vitamin D through windows if they are open? This question hasn’t been the topic of extensive scientific investigations, but it’s still important. Theoretically? Yes. In practice? Not so much. Let’s consider some possible scenarios here:
  • If you sit in front of a typical casement window, which opens inward or outward with a handle, some of the glass will usually still be in the path between you and the UVB rays your skin needs to make vitamin D. 
  • Sliding windows don’t pose this problem, making the odds that you’ll get some vitamin D through an open window slightly better. 
  • No matter what kind of window you have, you’re still in a building — and buildings have ceilings and roofs. As such, UVB rays are still blocked from the top down. 
  • Open skylights are a slightly different scenario. If UVB rays can effectively reach you through an open skylight (without parts of the glass blocking their path), you may have a way to increase your vitamin D levels through sun exposure while indoors. 
The bottom line? You can’t get vitamin D through a closed window, and open windows usually aren’t much better. Going outdoors is the only reliable way to get vitamin D from sunlight. Even if you get out there and “touch grass,” however, you have some other factors to consider.

What Else Prevents Vitamin D Absorption?

Even if you spend much of your typical day outside (let’s say you’re a landscape gardener, for example), you may not be able to get all the vitamin D you need for optimal health from the sun. That’s because several other factors impact how well your skin can produce vitamin D from sun exposure. 

Age

The skin’s ability to make vitamin D gradually reduces with age, and adults over 50 have a bigger risk of becoming deficient. [6] That’s unfortunate, because taking proactive steps to maintain excellent bone health also becomes more important around this time. It’s no surprise that doctors often advise older adults to start taking vitamin D supplements. 

Blocking Sunlight Exposure

Increasing public awareness of the risk of skin cancer has made sunscreen very popular. Unfortunately, sunscreen that blocks UVB rays also prevents your skin from making vitamin D. Clothing, including a hat, also gets in the way. The more skin you cover, the less vitamin D you will get from sunlight.

Dark Skin Tones

You’ve probably heard that more melanin makes it harder for the skin to absorb UV rays and make vitamin D. This explains why it’s common for people with dark skin tones to have lower vitamin D levels, but that’s not the end of the story. These lower vitamin D levels don’t translate to a higher risk of osteoporosis, research has shown [7].

Obesity

Being overweight or obese doesn’t impact your skin’s ability to make vitamin D when it is exposed to sunlight, but the fact that vitamin D is fat-soluble means less is available to the body when someone has more fat stores. This explains why overweight and obese people may be advised to take a little extra vitamin D. [3]

Your Region

People living at high altitudes or in very northern regions far from the equator get less vitamin D when they spend time outside in the sun. Getting enough vitamin D becomes even more challenging during the winter, when polar regions get very little to no sunlight at all. Supplementation becomes crucial in these cases, whether through dedicated supplements or fortified foods.

How Much Vitamin D Do You Need?

As you saw from the brief exploration of factors that impact how well you can make vitamin D when you’re exposed to sunlight and how well your body can use the vitamin D you get from any source, there are some individual differences. 
However, general guidelines issued by the Office of Dietary Supplements and many other organizations give you a great general idea. Most people should shoot for 15 mcg (600 IU) per day. That includes everyone aged one to 70, including during pregnancy and while breastfeeding. 
Babies in their first year of life need around 10 mcg (400 IU) of vitamin D. While formula is fortified with vitamin D, breast milk does not provide enough on its own, so nursing babies should get supplements of 10 mcg (400 IU) per day. 
We’ve already seen that your ability to make vitamin D goes down as you age, and this is why people over 70 need a little more — 20 mcg (800 IU) per day. [2]

What Are the Best Food Sources of Vitamin D?

You came here for a simple answer to a simple question — can you get vitamin D through a window? Now that you know you can’t, you may wonder if you’re getting enough. That’s especially true if you spend most of your day indoors, even if that beautiful sunny window makes you feel like you’re almost outside. 
Many people get enough vitamin D through their diet, and sometimes without even trying. The best food sources of organic vitamin D include [8]:
  • Fatty fish, including salmon, mackerel, sardines, and tuna. 
  • Cod liver oil and other fish liver oils.
  • Egg yolks. 
  • Cow milk, because it’s almost always fortified with vitamin D.
  • Orange juice, breakfast cereals, and other fortified foods.
  • UV-exposed mushrooms (vitamin D2). 
  • Liver meats like beef liver. (Enjoy in moderation because of its high vitamin A content!)
As you can see, the list of excellent food sources of vitamin D isn’t nearly as long as it is with many other vitamins! Efforts to fortify common convenience foods explain why many people get plenty of vitamin D, even if they don’t spend much time outside, but this isn’t true for everyone.

Who Benefits From Taking Vitamin D Supplements? 

If you have been assuming that sunlight through windows gives you all the vitamin D you need until now, you may wonder if you would benefit from taking a supplement. It’s best to discuss that question with your primary care doctor, who understands your needs and lifestyle — but we can take a quick look at the groups of people who are most likely to benefit from vitamin D supplementation. 
  • Breastfed babies, because breast milk contains little vitamin D (and, unlike formula, isn’t fortified with it). 
  • Older adults, over 50 and especially over 70. 
  • People with darker skin tones. 
  • Anyone who doesn’t get much sun exposure. This may include people who don’t go outside very often, people who do shift work, people who cover nearly all of their skin while outside, and people who always wear sunscreen while outside. It also includes people living in polar regions, especially during the winter.
  • Obese people and those with conditions that limit fat absorption, including celiac disease and irritable bowel syndrome. The same applies to people who have had gastric bypass surgery.
  • Vegetarians and (even more so) vegans, who get less vitamin D through their daily diets. (Vitamin D2 supplements, which are entirely plant-based, are available!)
Research suggests that over 40 percent of Americans are deficient in Vitamin D [9], and if you recognize yourself on this list, it’s time to take action. Taking vitamin D supplements is a convenient way to ensure you consistently get the vitamin D your body needs to be healthy.

(How) Can I Make Sure I Get Enough Vitamin D Through Sunlight?

That depends on where you live. However, in many countries, spending 10 to 30 minutes outdoors wearing shorts and a tank top around midday, when UVB rays are strongest [10], is more than enough to give you all the vitamin D you need for the day. This scenario presumes that you’re not wearing sunscreen.
The further away you live from the equator, the lower your odds of getting enough vitamin D from sunlight — even if you’re on the right side of that window you asked about. 
Sources:
  1. https://www.epa.gov/report-environment/indoor-air-quality
  2. https://ods.od.nih.gov/factsheets/VitaminD-Consumer/
  3. https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/
  4. https://pubmed.ncbi.nlm.nih.gov/24494042/
  5. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3460660/
  6. https://pubmed.ncbi.nlm.nih.gov/32727044/
  7. https://pubmed.ncbi.nlm.nih.gov/30044889/
  8. https://newsinhealth.nih.gov/2023/04/digging-into-vitamin-d
  9. https://pubmed.ncbi.nlm.nih.gov/21310306/
  10. https://pubmed.ncbi.nlm.nih.gov/20072137/