A transparent, source-cited estimate of your all-cause mortality hazard from modifiable lifestyle factors, and the rough biological-age gap it implies.
▶️ Live demo
Set eleven levers — cardiorespiratory fitness, activity, smoking, BMI, sleep, grip strength, diet, social connection, alcohol — and see your modeled hazard multiplier, a biological-age delta, and a ranking of which levers move you most.
⚠️ Population associations from observational cohorts — not causation, not a diagnosis, not medical advice. For curiosity, not clinical decisions.
Each factor contributes a published Cox hazard ratio (central estimate + 95% CI in hazard_ratios.json, with the source study). The model sums log-hazards and converts to an age-equivalent via a Gompertz mortality doubling time of ~8 years.
The honest part is the overlap shrinkage. Naively multiplying nine hazard ratios assumes they're independent — they aren't (fit people also tend to be lean, active non-smokers), so the raw product explodes to absurd values (a worst-case profile would read as +47 "biological years"). We therefore apply a 0.60 shrinkage to the summed log-hazard and cap the delta, anchoring the best-vs-worst spread to what joint-behaviour cohort studies actually observe (~10–14 years). This is the same trap — treating correlated predictors as independent — that quietly corrupts risk models in practice.
| Profile | Modeled hazard | Bio-age delta |
|---|---|---|
| Reference adult | 1.00× | 0.0 yrs |
| All-healthy levers | 0.68× | −4.4 yrs |
| All-risk levers | 11.7× | +20 yrs (capped) |
The biggest single levers are cardiorespiratory fitness and smoking — consistent with the epidemiology.
A forest plot of each lever's highest-risk level with its 95% CI — cardiorespiratory fitness and smoking carry the widest, largest effects. The live demo now reports a biological-age range (propagating these CIs), not just a point estimate.
pytest checks that the reference profile is neutral, healthy < reference < risky, the CI range brackets the point estimate, and every factor carries a citation. GitHub Actions runs it on every push.
hazard_ratios.json— the HR table with CIs and citations (Mandsager 2018, Arem 2015, Jha 2013, Global BMI Collaboration 2016, Cappuccio 2010, Leong 2015/PURE, Holt-Lunstad 2010, GBD Alcohol 2018).model.py— the compute (standard library only).index.html— the in-browser calculator; its math reproducesmodel.pyexactly.
python model.py # prints reference / healthy / risky profiles + top levers
python build_demo.py