Food is only part of the story. Your skin makes vitamin D directly from ultraviolet B (UVB) radiation in sunlight, and for many people in many seasons, that is the largest single contributor to their vitamin D status.
How It Works
When UVB light hits bare skin, it converts a cholesterol-derived compound called 7-dehydrocholesterol into pre-vitamin D3, which is then refined into the active hormone form in your liver and kidneys. The process is fast and remarkably efficient — a short, comfortable amount of summer-afternoon sun on your face, arms, and legs can produce several thousand IU of vitamin D in a single sitting, particularly in lighter-skinned individuals.
What Reduces It
Several common factors quietly lower how much vitamin D your skin can make: latitude (the further from the equator you live, the weaker the UVB), season (winter sun is too oblique for vitamin D production in much of the continental U.S.), time of day (midday is when UVB is strongest), cloud cover, smog, age (older skin produces less), darker skin tone (more melanin means more UVB is absorbed before it reaches the conversion site), and sunscreen, which by design blocks UVB.
The UK's National Health Service notes that from about late March or early April to the end of September, the majority of people should be able to make all the vitamin D they need from sunlight on their skin. The same broad pattern holds for most of the U.S., though it shifts with latitude.
The Sunscreen Question
This part can feel like a contradiction, so it is worth handling carefully. Ultraviolet radiation is the primary risk factor for skin cancer, and dermatologists are unified in recommending daily sunscreen on exposed skin. Sunscreen does reduce vitamin D synthesis, but the realistic trade-off is generally accepted as worth it — skin cancer is the bigger long-term risk for most people. Short, incidental sun exposure on your face and arms during ordinary daily activity tends to produce meaningful vitamin D without meaningfully increasing skin cancer risk; deliberately seeking long, unprotected midday sun does the opposite.
Tanning beds are not a safe shortcut to vitamin D. They use UV in a way that is associated with increased skin cancer risk, and any vitamin D production they offer can be achieved more safely through food, brief incidental sunlight, or a regular supplement.