Vitamin D Needs Calculator Formula

Understand the math behind the vitamin d needs calculator. Each variable explained with a worked example.

Formulas Used

Recommended Vitamin D

vitamin_d_iu = round(base_iu * sun_exposure * (weight_lbs / 150))

In Micrograms

vitamin_d_mcg = round(base_iu * sun_exposure * (weight_lbs / 150)) / 40

Variables

VariableDescriptionDefault
ageAge(years)35
weight_lbsBody Weight(lbs)170
sun_exposureWeekly Sun Exposure1
base_iuDerived value= age <= 70 ? 600 : 800calculated

How It Works

Vitamin D Requirement Estimation

Vitamin D requirements vary by age, body weight, and sun exposure. The RDA is 600 IU for ages 1-70 and 800 IU for those over 70.

Adjusted Formula

Vitamin D (IU) = Base IU x Sun Factor x (Weight / 150)

This adjusts the base RDA for body size and sun exposure, since vitamin D is produced in the skin when exposed to sunlight.

Worked Example

A 35-year-old, 170 lbs, with moderate sun exposure.

age = 35weight_lbs = 170sun_exposure = 1
  1. 01Base IU (age <= 70) = 600
  2. 02Adjusted = 600 x 1.0 x (170 / 150)
  3. 03= 600 x 1.133 = 680 IU/day
  4. 04In mcg = 680 / 40 = 17.0 mcg

Ready to run the numbers?

Open Vitamin D Needs Calculator