Home / Tools

Calculate a hazard ratio from a published Kaplan–Meier curve

Updated 2026-11-03 · TrialCurve

Best method: reconstruct pseudo-IPD from the KM curve and its numbers-at-risk table (Guyot 2012), then fit a Cox model. This gives a hazard ratio with a 95% CI that typically lands within a few percent of the printed value (our own benchmark, not peer reviewed). If you only have summary statistics, the Tierney et al. (2007) methods below estimate the log HR and its variance from a CI, a p-value or event counts.

From a figure

From patient-level or reconstructed data

Have reconstructed or real IPD already? Paste CSV rows as arm,time,event (event 1 = event, 0 = censored).

From reported statistics

Paste what the paper prints, one row per study.

From a CI, SE(ln HR) = [ln(upper) − ln(lower)] / (2 × 1.96). From a p-value and events at 1:1, V = events / 4, O−E = ± z√V with z from p/2, and ln HR = (O−E) / V (Parmar 1998; Tierney 2007).

Methods compared

MethodNeedsAccuracy
Cox model on reconstructed IPD (Guyot)KM curve + at-risk tableBest; HR typically within a few percent
Tierney / Parmar indirect estimatesReported p-value and events, CI, or O−E and VGood when the needed statistics are reported
Parmar's curve-reading methodSurvival read at intervals + censoring assumptionsModerate; sensitive to assumptions
Median ratio shortcut (HR ≈ mediancontrol/mediantreatment)Two mediansRough; only under exponential survival

Check proportional hazards

A single HR summarises the curves well only if the hazards are roughly proportional. With reconstructed IPD you can inspect log(−log S) plots or Schoenfeld residuals. When curves cross or separate late, as often happens with immunotherapy, report RMST differences or time-varying HRs as well. Try the RMST calculator.

How to interpret the result

See hazard ratio interpretation for what HR 0.75 or 1.3 means, and what a hazard ratio is not.

FAQ

Can I calculate a hazard ratio from medians alone?

Only approximately, and only if survival is roughly exponential in both arms: HR ≈ median(control) / median(treatment). Prefer reconstructed IPD or the Tierney methods.

Which arm is the reference?

By convention, the control arm. The calculator here compares the second arm in your data against the first, and the API lets you name the reference arm.

Have a KM figure from a paper? Get its data in a minute.

Upload a figure