Second, ordinary window glass blocks these useful wavelengths, which are in the ultraviolet-B range.

Third, even if the window were wide open to the sunlight, the angle at which the sun’s rays hit the planet in northern latitudes in the winter means that it is hard, if not impossible, for many Northerners to get enough winter sunshine to meet their vitamin D requirements, even with prolonged exposure.

While the useful wavelengths are blocked by window glass, ultraviolet-A wavelengths associated with skin cancer easily pass through the glass. It has even been suggested that fair-skinned indoor workers may show a higher risk of melanoma for this reason.

Luckily, a vitamin D deficit can be made up through some foods (especially oily fish), fortified foods and supplements.

The most valuable ultraviolet-B wavelengths of sunlight, 290 to 320 nanometers, are plentiful in summer. Because of the skin cancer risks associated with all ultraviolet radiation, getting vitamin D through sunbathing is a balancing act.