We all know that too much exposure to sunlight can cause skin cancer, but not enough sunlight can cause Vitamin D deficiency and weak bones.
What about sun exposure through a window?
The sun emits UVA, UVB, and UVC rays. Most UVC rays are filtered out by the earth’s atmosphere. Windows filter out about 97% of UVB rays, but do not filter out all UVA rays. So you can still tan through a window! Sitting next to a window is like wearing SPF 30 sunscreen, as many rays do get filtered out, but you can still get tan with long enough exposure.
One interesting study found that 74% of patients with skin cancer had tumors on their left sides, which is the window side of cars in North America! Modern cars now have a plastic layer bonded between two layers of glass, and block out all UVB and 80% of UVA rays, making sunburn less likely.
What about vitamin D? Vitamin D is produced in our skin by UVB rays. But glass windows block this out. That means that you would get little, if any, Vitamin D from sitting by a window.