Home / Tools

Median survival calculator

Updated 2026-11-03 · TrialCurve

Median survival is the time at which the Kaplan–Meier curve first falls below 50%. Paste your data below to get the median for each group with its 95% confidence interval. If the curve never falls below 50%, the median is "not reached".

Paste one row per patient as arm,time,event (event 1 = event, 0 = censored), or load the example.

How to calculate median survival from a Kaplan–Meier curve

Take 10 patients with times 2, 3+, 4, 5, 6+, 7, 9, 11, 12+, 14 (+ means censored). At each event the estimate steps down: 0.90, 0.79, 0.68, 0.54, 0.41. It first falls below 0.5 at time 9, so the median is 9. In R:

library(survival)
d <- data.frame(time  = c(2, 3, 4, 5, 6, 7, 9, 11, 12, 14),
                event = c(1, 0, 1, 1, 0, 1, 1, 1, 0, 1))
survfit(Surv(time, event) ~ 1, data = d)   # median 9

How the median and its CI are calculated

The median is the first event time at which the estimate falls below 0.5. If it sits exactly at 0.5, it is the midpoint to the next step, as in R and SAS. The 95% confidence interval comes from the pointwise confidence limits of the curve: its lower end is where the lower limit crosses 0.5, and its upper end is where the upper limit does. The limits use Greenwood's variance on the log(−log) scale, which is the SAS default (R's default uses the log scale, so results can differ, mainly in small samples).

Why the upper limit is often "not reached"

When few patients remain at risk, the curve's upper confidence limit may never fall below 50% within follow-up. That is common and correct: the data cannot rule out a longer median.

Median survival from a published figure

Read where the curve crosses 50%, or better, reconstruct the patient-level data and compute it here with a confidence interval. On 250 medians printed on figures from 96 papers, TrialCurve came within 10% on 94% (our own benchmark, not peer reviewed).

FAQ

What does 'median not reached' mean?

The Kaplan–Meier curve stayed above 50% for the whole follow-up, so the median survival time is longer than the follow-up and cannot be estimated yet.

Is median survival the same as mean survival?

No. The mean is usually not estimable with censored data; restricted mean survival time (RMST) is its well-defined counterpart. See the RMST calculator.

Why do R and SAS give different confidence intervals?

They transform the survival estimate differently before building the interval: R uses the log scale by default and SAS the log(−log) scale.

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

Upload a figure