Ever sit and bask in the warm glow of the sun through a window on a winter’s day while dreaming of summer and hoping to get a little sun-kissed? We’ve all done it.

A sunshiny day can do wonders for your mood, even when you’re cooped up inside. But you can have too much of a good thing when it comes to the sun’s rays.

Read on to learn about just how much of the sun’s effects — good and bad — you can get through a window.

It’s unlikely, but it really depends on the window you happen to be sitting by and for how long, as well as the strength of the sun’s rays.

According to the American Cancer Society, typical home, office, and car windows block most UVB rays but a smaller amount of UVA rays.

Ordinary glass, which you still find in a lot of older homes, offers less protection than newer windows, which are thicker, double- or triple-paned, or coated with a UV filter.

When it comes to cars, windshields — which are made from laminated glass for safety reasons — filter out a lot more UV light than side windows and sunroofs. Those are made from tempered glass.

Both UVA and UVB can damage the skin, but they do it differently:

  • UVA penetrates the deeper layers of the skin, triggering cells called melanocytes to produce melanin, the brown pigment that gives skin a tanned appearance. It also causes wrinkling and premature aging, and some skin cancers.
  • UVB penetrates the cells in the top layers of the skin, causing sunburn. UVB is also responsible for most skin cancers.

If you spend a long time sitting by a window that gets direct sunlight when the sun is particularly strong, you might be able to get a slight tan from the UVA that gets through the glass.

Glistening golden tans aside, keep in mind that UVA also causes sunspots and wrinkles. Worse, it can also affect the blood vessels and nerves beneath the skin and damage your DNA and immune system.

Yep, you can still get a sunburn through a window. But again, it depends on the type of window you’re sitting by and other factors, like the time of day and strength of the sun.

Sunburn is more likely with longer exposure to the sun on days when the UV index is high. UV rays tend to be most intense midday — usually from around 10 a.m. to 4 p.m.

When it comes to UV rays and sunburn, what’s outside a window matters, too.

UV rays can bounce off certain surfaces and increase your exposure. Surfaces known to do this are water, sand, and snow.

Basically, if you have a sweet view, chances of sunburn are higher if you sit there long enough on a sunny day.

Sorry, but no. Vitamin D — aka the sunshine vitamin — is made when your skin is exposed to UVB rays, which most windows block out.

Without getting too technical, the gist is that your skin absorbs UVB and converts cholesterol in your skin to vitamin D.

If you want to get vitamin D from sunshine so you can reap all its benefits, the best way is to expose your skin to direct sunlight.

The more skin the better, according to experts, who recommend exposing at least a third of your skin (think shorts and a tank top) to sunlight for 10 to 30 minutes three times per week.

If you have darker skin, you need to spend a lot more time in the sun to produce the same amount of vitamin D as someone with lighter skin — anywhere from 30 minutes to 3 hours longer.

This is because darker skin has more melanin, which reduces the amount of UVB light absorbed by your skin.

But make sure you still apply plenty of sunscreen. Darker skin can still sunburn, and even develop skin cancer. (Don’t worry, you’ll still get enough rays to trigger vitamin D production with sunscreen.)

You can also eat more foods rich in vitamin D.

Yep! Like we already mentioned, UV rays do come through car windows, especially side windows and sunroofs. People who spend a lot of time in the car — especially drivers — have a higher risk for developing skin cancer.

There’s even a name for it: In Australia, it’s referred to as “cabbie cancers” because people who spend all day in their car are more susceptible.

According to the Skin Cancer Foundation, melanoma and nonmelanoma skin cancers are more common on the left side of the body in the United States — the side of the car where drivers sit.

Windows filter out some — but not all — of the rays that result in tans and burns.

While you could theoretically get a slight tan if you spent all of your days in a bright window, it’s not very practical. A spray tan is a better way to go if you really want the glow.

Adrienne Santos-Longhurst is a Canada-based freelance writer and author who has written extensively on all things health and lifestyle for more than a decade. When she’s not holed up in her writing shed researching an article or off interviewing health professionals, she can be found frolicking around her beach town with husband and dogs in tow, or splashing about the lake trying to master the stand-up paddle board.