← Back to calculator

How the Longtime Calculator works

The longevity calculator turns your profile inputs into a population-level estimate of life expectancy, biological age, healthspan, and relative mortality risk. It is designed for exploration and education, not diagnosis or medical advice.

Overview

Every estimate follows the same four steps:

  1. Choose a peer baseline from your age, sex, and country: a model life table for average-risk people in that group.
  2. Assign a hazard ratio (HR) to each input. An HR of 1.0 means “similar mortality risk to peers”; below 1 is protective, above 1 is elevated.
  3. Combine HRs into one overall risk multiplier for your profile, with separate handling for nutrition vs. other lifestyle factors.
  4. Apply that multiplier to the baseline mortality curve to estimate remaining years, then derive biological age, healthspan, and peer comparisons.

Step 1: Baseline peer group

We build country- and sex-specific annual mortality curves calibrated to national life-table remaining years around age 40. Each curve blends three components by age:

  • Early-life mortality (infant and childhood)
  • Accident mortality (highest roughly ages 15 to 35)
  • Exponential senescence at older ages

Supported countries include Australia, Canada, Germany, Spain, France, Hong Kong, Israel, Italy, Japan, New Zealand, Portugal, Singapore, Taiwan, the United Kingdom, and the United States.

From your current age, we sum expected remaining years of life at average peer risk (multiplier = 1.0). That baseline, plus your age, is the reference for “vs peers” on the results panel.

Step 2: Hazard ratios by input

Each slider, toggle, or optional lab value maps to a conservative hazard ratio drawn from epidemiological literature. Where studies overlap (for example sleep duration and sleep consistency, or exercise minutes and daily steps), we use modest HRs on purpose.

Body

  • BMI (from height and weight): tiered HRs from underweight through obesity III, based on the Global BMI Mortality Collaboration.
  • Blood pressure, blood sugar (HbA1c), LDL cholesterol: optional tiered HRs applied only when you enter a value. Blank fields are skipped entirely.

Lifestyle

  • Sleep hours: U-shaped association; roughly 6 to 8 hours/night is lowest risk.
  • Sleep consistency: consistent, variable, or irregular schedule tiers.
  • Exercise: minutes per week, with strongest benefit above ~150 min/week.
  • Daily steps: separate tier from structured exercise; benefit increases toward ~10k+ steps.
  • Smoking: never, former, or current; pack-years adjust former and current tiers. Pack-years are ignored when status is “never.”
  • Alcohol: drinks per week, with lowest risk at light intake and rising risk at heavy intake.

Environment & mindset

  • Air quality: good, moderate, or poor (proxy for long-term PM₂.₅ exposure).
  • Financial security: comfortable, manageable, or insecure.
  • Social connection: UI maps to a 1 to 5 scale (low / moderate / good).
  • Stress: UI maps to a 1 to 5 scale (low / moderate / high chronic stress).

Nutrition

Twelve food groups are modeled with piecewise-linear dose-response curves from Schwingshackl et al., 2017. For each group, grams per day (millilitres for sugary drinks) are interpolated between published anchor points to yield a relative risk for that food alone:

  • Whole grains (g/day)
  • Vegetables (g/day)
  • Fruit (g/day)
  • Nuts (g/day)
  • Legumes (g/day)
  • Fish (g/day)
  • Red meat (g/day)
  • Processed meat (g/day)
  • Sugary drinks (ml/day)
  • Eggs (g/day)
  • Dairy (g/day)
  • Refined grains (g/day)

Individual food HRs are capped between 0.70× and 1.60× before aggregation. Diet presets on the calculator are illustrative daily patterns, not clinical meal plans, that set all twelve sliders at once.

Step 3: Combining factors

Naively multiplying twenty-plus hazard ratios would collapse almost every profile to an unrealistic “best case.” Instead we combine in two layers:

Nutrition layer

nutritionRisk = exp( mean(ln foodHRs) × 1.35 )

The geometric mean of the twelve food HRs is amplified slightly (× 1.35 on the log scale) so diet changes move the headline estimate without double-counting every food as fully independent.

Lifestyle layer

lifestyleRisk = exp( sum(ln otherHRs) × 0.7 )

BMI, sleep, exercise, steps, smoking, alcohol, environment, mindset, and optional biometrics are dampened (× 0.7 on the log scale) because several pairs partially overlap in real epidemiology.

Overall risk multiplier

risk = clamp( nutritionRisk × lifestyleRisk , 0.58 , 2.4 )

The final multiplier is bounded so estimates stay plausible. Values below 1.0 mean lower mortality risk than peers; above 1.0 mean higher risk.

Step 4: Life expectancy

Starting at your current age, we walk the country/sex mortality table year by year. At each age a, the annual death probability is adjusted by your risk multiplier:

qadj(a) = 1 − (1 − qbaseline(a))risk

We accumulate survival-weighted years until the table ends. Adding that to your age gives estimated life expectancy. The “vs peers” delta is the difference from the same calculation at risk = 1.0.

Biological age

Biological age answers: “How old would an average-risk peer need to be to have the same remaining life expectancy as me?” We binary-search ages on the baseline (risk = 1.0) curve until remaining years match your profile’s remaining years at your actual risk multiplier.

If your combined risk is lower than peers, biological age falls below your chronological age, and vice versa. Because this is a curve lookup, small input changes may move biological age in roughly one-year steps.

Healthspan

Healthspan is a simplified “years in relatively good health” estimate, not a clinical disability measure. We subtract a morbidity tail from estimated life expectancy:

healthspan ≈ lifeExpectancy − 9 × risk0.25

Higher overall risk lengthens the implied morbidity window. The result is clamped so it never falls below a few years after your current age or above your total life expectancy.

Mortality risk dial & peer rank

  • Mortality risk (× vs peers): your combined risk multiplier, shown on the gauge. 1.0× is “like peers”; lower is better.
  • Peer rank: derived from a log-normal distribution of HRs centered at 1.0. It approximates what share of peers with similar demographics you might outlive given your multiplier, for example “Top 25%” or “Bottom 10%.”

Top protectors & top risks

For each factor, we recompute life expectancy with that single factor removed (using the same aggregation rules as the headline estimate) and report the year difference. Factors are ranked by absolute impact; the five lowest HRs appear under protectors and the five highest under risks.

The nutrition breakdown chart shows each food group’s standalone relative risk from the dose-response curves, useful for spotting which foods drive diet risk, independent of the combined nutrition layer above.

What we store in your browser

Profile inputs are saved in session storage so refreshes keep your settings during the same browser session. Nothing is sent to a Longtime server for calculation; all math runs locally in your browser.

Important limitations

  • Population averages, not personalized medicine. Your genetics, medical history, and care access matter.
  • Factors are partly correlated in real life; dampening reduces but does not remove overlap.
  • Optional labs can overlap with BMI, diet, and exercise signals already in the model.
  • Country baselines are models fitted to life-table data, not year-by-year official tables.
  • Diet presets and sliders describe typical intake patterns, not exact meals or supplement stacks.
  • Clamps and rounding prevent extreme outputs but also cap how much any one change can move the estimate.

References