Your body can produce vitamin D when the skin is exposed to UVB rays,[1] so it stands to reason that sunscreen use may decrease vitamin D levels. Indeed, sunscreen can cause a drop in vitamin D production under laboratory testing conditions,[2][3] and this decrease is most notable if sunscreen is used consistently and properly (i.e., when using a broad-spectrum sunscreen and the right SPF, amount, and reapplication schedule).[4][5][6] Even so, it appears that most people need not worry about the effects of sunscreen alone on vitamin D levels.[7]
One important caveat — studies to date have generally been conducted on people with less skin pigmentation (i.e., those with Fitzpatrick skin types 1–3). A different result may be seen in those with Fitzpatrick skin types 4–6.
Generally speaking, 5 to 30 minutes of unprotected sun exposure to the hands, face, and arms at least three times a week between 11 a.m. and 3 p.m. may generally be enough to keep vitamin D levels out of the deficient range (<30 nmol/L or <12 ng/mL).[8][9] When the UV Index in your area is 3 or higher, people with Fitzpatrick skin types 1 or 2 should limit unprotected sun exposure to less than 10 minutes, skin types 3 or 4 to less than 15 minutes; and skin types 5 or 6 to less than 30 minutes.[10][11] You can check out the UV index forecast in your area here (https://www.epa.gov/enviro/uv-index-search).
Keep in mind that longer periods of unprotected sun exposure will not necessarily lead to higher vitamin D production because the UVB rays will eventually degrade vitamin D in your skin to an inactive state.[12] This actually helps protect your body against vitamin D toxicity. Additionally, UVB-induced vitamin D production can be influenced by many other factors, including:[13]
👴🏽 Age
🦵🏼 Amount of sun-exposed skin
💊 Certain medications
🎽 Clothing type
🏔 Elevation
🗺 Latitude
🏬 Living environment (e.g., urban, suburban, or rural)
🏭 Pollution
✋🏿 Skin pigmentation
📐 Solar angle
⏱ Sun exposure duration and frequency
📅 Time of year
🌦 Weather conditions
For these reasons, it is not advisable to completely forego sunscreen to increase vitamin D levels or rely on sun exposure as your main source of vitamin D. Rather, a more balanced approach would be to increase vitamin D through diet and supplementation, with some limited unprotected sun exposure added in.