How OPSIN estimates vitamin D & light

Our engine, our assumptions, our error bars — in the open.
Everything here is a modeled estimate, not a measurement. OPSIN calculates likely values from published photobiology and your inputs. Real vitamin D synthesis varies a lot between people (roughly ±30–50%). Treat every number as a guide, and confirm your actual status with a blood test (25-hydroxy-vitamin-D) interpreted by a clinician.

1. We start with real UV, not a guess

OPSIN reads the cloud-adjusted UV Index for your exact location and time from a public forecast service (Open-Meteo), which already accounts for latitude, season, time of day, elevation and cloud cover. We deliberately use the cloud-adjusted value and never re-apply cloud on top of it — a common double-counting bug that makes cloudy days read far too low elsewhere.

2. Vitamin D synthesis — a saturating, not linear, response

Skin doesn't make vitamin D in proportion to UV forever. The response saturates: doubling the UV does not double synthesis. OPSIN models this with a saturating (Michaelis–Menten) UV term and scales it by the factors that actually matter:

The engine is anchored to a single, published reference point: for Fitzpatrick III skin, 25% of the body exposed, strong midday sun (UV Index 8), the model produces about 1,000 IU in ~7.6 minutes. At that anchor, other well-known references (D-Minder's rate, Holick's quarter-MED rule) reconcile within about 10%. We do not tune away the residual disagreement between sources — it's real (published estimates span ~1.7× across studies), and we resolve it per person through blood-test calibration instead.

3. The plateau — why "safe" and "optimized" arrive together

Cutaneous vitamin D production self-limits: once you approach roughly one minimal-erythemal-dose (the threshold where skin reddening begins), synthesis flattens and then stops, while further UV only adds burn risk. Because a daily target (~1,000–2,000 IU on partial skin) is a small fraction of that ceiling, you reach your vitamin D goal at a sub-burn dose. This is why OPSIN never tells you to stop for safety while claiming you've barely started — the same physics governs both. On weak-UV days when the sun physically can't get you there, OPSIN says so and suggests a supplement top-up rather than nudging you toward a sunburn.

4. Burn safety

Separately, OPSIN estimates your time-to-burn from your skin type and the current UV (via the erythemal/MED model), and sets your "safe sun" window at 80% of that threshold. It can't see your actual skin, sweat, sunscreen reapplication, or UV reflected off snow, water or sand — so it's a guide, not a guarantee. Always use sun protection and your own judgment.

5. The Vitamin D Balance Sheet & your estimated blood level

Your daily intake (sun + supplements + diet) is tracked against a personalized target. OPSIN also models your blood 25(OH)D level over time using standard pharmacokinetics — a one-compartment model with the vitamin's ~15-day half-life, so today's level reflects the last several weeks of intake, not just today. This is a modeled estimate shown with a confidence band.

Then you calibrate it. When you log a real blood-test result, OPSIN anchors the estimate to your measured value; log a second and it fits how efficiently your body responds, tightening the band. The more you test, the more personal — and honest — it gets.

6. Circadian light

For your body clock, the signal that matters is bright light to the eye (melanopic illuminance), anchored to the Brown et al. 2022 consensus (bright by day, dim in the evening, dark at night). On the web app this is estimated from sun position and your logged time outdoors and marked "estimated"; the iOS app measures it directly with the camera-based light meter. We never use UV as a stand-in for circadian light — they're different things.

7. The honest accuracy envelope

We show these bands on purpose. False precision ("1,437 IU · 70.2%") would be dishonest; a banded estimate ("~1,400 IU, ±40%") is the truth, and logging a blood test is how you make it exact.

Sources

UV Index / SED / MED: McKenzie, Webb & Engelsen; CIE. Synthesis & plateau: Holick; Terushkin 2010 (JAAD); Sci Rep 2024 (PMC10861575). D:erythemal action-spectrum ratio: Webb (PMC3257661). Circadian light: Brown et al. 2022 (PLOS Biology); CIE S 026. Vitamin D trials context: the VITAL trial (no overall cancer/CVD reduction in non-deficient people). UV/weather data: Open-Meteo.