Your skin makes vitamin D from a sunlight-triggered reaction

Sunlight supplies energy, not vitamin D. When ultraviolet B (UVB) rays reach exposed skin, they interact with a cholesterol-related molecule called 7-dehydrocholesterol. The reaction turns it into previtamin D₃, which then rearranges with the help of the skin’s warmth into vitamin D₃.

That D₃ is not yet the fully active form the body uses. It travels to the liver, where it is converted into a storage form, and then to the kidneys, where it can be converted into active vitamin D. The active form helps the body absorb calcium and maintain healthy bones.

Why the same sun does not make the same amount for everyone

The process depends on how much UVB actually reaches the skin. Time of day, season, latitude, cloud cover, clothing, and sunscreen can all affect exposure; window glass blocks most UVB, so sitting in a sunny room generally does not trigger the same skin production. Skin pigmentation also matters: melanin absorbs UV, so darker skin typically needs more UVB exposure to produce a similar amount.

More exposure is not a simple way to make more vitamin D indefinitely. The skin also breaks down some of the newly made compounds, while ultraviolet radiation can damage skin and raise the risk of skin cancer. Sunlight starts the process, but the body’s later steps—and the limits of safe exposure—determine what that process means for health.