Vitamin D is called the sunshine vitamin because your body produces it when your skin is hit by ultraviolet B (UVB) radiation. Unlike most vitamins, you cannot get enough from food alone unless you eat oily fish every day or drink heavily fortified milk.
Despite the sun-drenched planet, deficiency is common. Roughly 1 billion people worldwide have insufficient vitamin D levels. The causes are simple: people spend more time indoors than ever, and when they go outside, they wear sunscreen to prevent skin cancer.
The real challenge is balancing two real health priorities: getting enough sun for vitamin D production without raising your skin cancer risk. The right answer depends on skin type, latitude, time of year, and time of day.
How Your Body Makes Vitamin D from Sunlight
When UVB rays hit your skin, they trigger a chemical reaction that converts a cholesterol compound in your skin into previtamin D3. This is then transformed into vitamin D3 (cholecalciferol) by body heat. From there, your liver and kidneys convert it into the active form (calcitriol) that your body actually uses.
Several factors affect how efficiently this process works:
Skin type: people with darker skin have more melanin, which acts as natural sunscreen. This means darker-skinned individuals need more sun exposure to produce the same amount of vitamin D as lighter-skinned individuals. Someone with very light skin might need 10 to 15 minutes of midday sun, while someone with very dark skin might need 30 to 60 minutes.
Latitude: above 37 degrees north (roughly above San Francisco, Athens, or Seoul), the sun is too low in the sky during winter months for UVB rays to reach the surface effectively. From roughly November through February at these latitudes, you cannot produce meaningful vitamin D from sunlight regardless of how long you stay outside.
Time of day: UVB intensity peaks between 10 AM and 3 PM. Early morning and late afternoon sun, while pleasant, produces minimal vitamin D.
Sunscreen: SPF 30 sunscreen blocks about 97% of UVB rays. While essential for skin cancer prevention, it also blocks most vitamin D production. This is why brief unprotected exposure before applying sunscreen is often recommended.
The BMI Calculator is relevant here because vitamin D is fat-soluble. People with higher body fat percentages tend to have lower circulating vitamin D levels because the vitamin gets sequestered in fat tissue.
Recommended Vitamin D Levels and Intake
Medical organizations recommend maintaining a blood level of 25-hydroxyvitamin D (25(OH)D) between 20 and 50 ng/mL (50 to 125 nmol/L). Below 20 ng/mL is considered deficient, and below 12 ng/mL is severely deficient.
Daily intake recommendations vary by organization:
- US Institute of Medicine: 600 IU (15 mcg) for adults, 800 IU (20 mcg) for those over 70
- Endocrine Society: 1,500 to 2,000 IU (37.5 to 50 mcg) for adults at risk of deficiency
- Many researchers: 1,000 to 4,000 IU (25 to 100 mcg) for optimal levels
The upper tolerable limit is generally set at 4,000 IU (100 mcg) per day, though toxicity is rare below 10,000 IU. Vitamin D toxicity causes dangerously high calcium levels and can damage kidneys, but it requires sustained very high doses.
Age affects vitamin D needs and production. Older adults produce vitamin D less efficiently from sunlight (roughly 75% less at age 70 compared to age 20) and are more likely to spend time indoors. Use the Age Calculator to determine exact age, which helps in estimating appropriate supplementation levels.

Signs of Vitamin D Deficiency
Vitamin D deficiency develops gradually, and symptoms are often vague enough to be attributed to other causes. Common signs include:
Fatigue and low energy: feeling tired despite adequate sleep is one of the most common complaints. Vitamin D plays a role in mitochondrial function and energy production.
Bone and muscle pain: vitamin D is critical for calcium absorption. Deficiency leads to softened bones (osteomalacia in adults, rickets in children) and muscle weakness. Vague aches and pains, especially in the lower back, hips, and legs, can be a sign.
Frequent illness: vitamin D supports immune function. People who are deficient get sick more often and take longer to recover from respiratory infections.
Mood changes: there is a strong association between low vitamin D and depression, seasonal affective disorder (SAD), and general mood disturbances. The mechanism is not fully understood, but vitamin D receptors are found throughout the brain.
Slow wound healing: vitamin D is involved in the inflammatory response and new skin formation. Wounds that heal unusually slowly may indicate deficiency.
Hair loss: severe deficiency has been linked to hair loss, particularly alopecia areata (patchy hair loss). This is more common in women.
The only reliable way to know your vitamin D status is a blood test (25-hydroxyvitamin D). Symptoms alone are not specific enough for diagnosis because they overlap with dozens of other conditions.
Food Sources of Vitamin D
Very few foods naturally contain significant amounts of vitamin D. The best dietary sources are:
Oily fish: salmon (600 to 1,000 IU per serving), mackerel (400 IU), sardines (300 IU), and trout (600 IU). Wild-caught fish typically contain more than farmed fish.
Cod liver oil: one tablespoon provides about 1,360 IU, making it one of the most concentrated food sources. The taste is challenging for most people.
Egg yolks: about 40 IU per yolk. You would need to eat many eggs daily to meet your requirements from this source alone.
Fortified foods: many countries fortify milk, orange juice, and breakfast cereals with vitamin D. Fortified milk typically contains 100 IU per cup.
Mushrooms exposed to UV light: certain mushrooms (maitake, UV-exposed button mushrooms) can contain significant vitamin D2. Check the label, as not all mushrooms are UV-treated.
Getting adequate vitamin D from food alone is difficult for most people. A typical Western diet provides 150 to 300 IU per day, well below the recommended 600 to 2,000 IU. This is why supplementation or sun exposure is necessary for most people.
When tracking nutritional intake, the Unit Converter helps translate between micrograms (mcg) and International Units (IU). The conversion is: 1 mcg of vitamin D = 40 IU.
Very few foods naturally contain significant amounts of vitamin D.
Supplementation Guidelines
For people who cannot get adequate sun exposure (northern latitudes, indoor lifestyles, dark skin, elderly), vitamin D supplements are the most reliable solution.
Vitamin D3 vs D2: vitamin D3 (cholecalciferol) is more effective at raising blood levels than vitamin D2 (ergocalciferol). D3 is the form your body makes from sunlight and is the preferred supplement form.
Dosing: most adults benefit from 1,000 to 2,000 IU daily. If you are deficient (confirmed by blood test), your doctor may prescribe higher initial doses (5,000 to 50,000 IU weekly) to restore levels, followed by a maintenance dose.
Absorption: vitamin D is fat-soluble, so take it with a meal that contains some fat for best absorption. Studies show absorption increases by 50% when taken with a fat-containing meal versus an empty stomach.
Timing: there is no strong evidence favoring morning versus evening dosing. Some people report sleep disruption when taking vitamin D at night, but this is anecdotal. Take it whenever you will remember consistently.
Monitoring: if supplementing above 2,000 IU daily, get your blood levels checked every 6 to 12 months to avoid over-supplementation. Target a 25(OH)D level of 30 to 50 ng/mL.
Cofactors: vitamin D works in concert with vitamin K2 (directs calcium to bones rather than arteries) and magnesium (required for vitamin D activation). Many health professionals recommend supplementing all three together.

FAQ
Can you get vitamin D through a window?
No. Glass blocks UVB rays, which are the specific wavelengths needed for vitamin D production. UVA rays pass through glass and can cause skin aging, but they do not trigger vitamin D synthesis. You need direct, unfiltered sunlight on your skin.
How long should I spend in the sun for vitamin D?
It depends on your skin type, location, and time of year. As a general guideline, 10 to 30 minutes of midday sun on your face, arms, and legs (without sunscreen) two to three times per week is enough for most light-skinned individuals in temperate climates during summer. Darker-skinned individuals need 2 to 3 times longer.
Can I get too much vitamin D from sunlight?
No. Your body self-regulates vitamin D production from sunlight. Once enough previtamin D3 is produced, additional UV exposure degrades it rather than producing more. Toxicity only occurs from supplementation, not from sun exposure.
Should I take vitamin D supplements year-round?
If you live above 37 degrees latitude, supplementation during winter months (November through March) is recommended for most people because UVB intensity is insufficient for vitamin D production. Whether you need supplements during summer depends on your sun exposure habits and skin type.
### Can you get vitamin D through a window.
Free Health Calculators: BMI, Calories, Water Intake
Health calculators for BMI, daily calories, water intake, and sleep cycles. Free tools that give you real numbers to work with instead of guesses.
Sleep Calculator: Find Your Ideal Bedtime
Use a sleep calculator to find your ideal bedtime from sleep cycles. Learn how 90-minute cycles work, why waking mid-cycle makes you groggy, and how to fix it.
Heart Rate Zones: Calculate Your Target Training Zones
Calculate target heart rate zones for training. Apply the Karvonen formula, set zone-based training intensities, and get more from each cardio workout.
