Many important questions concern time until an event: how long patients survive after treatment, how long customers stay before cancelling, how long a machine runs before failing. These "time-to-event" data share an awkward feature: when the study ends, some subjects have not yet had the event. A patient still alive at the last follow-up, a customer who is still subscribed, a machine that is still running: their true times are unknown, only known to exceed some value. This is called censoring, and ordinary averages and proportions handle it badly. The Kaplan–Meier estimator is the standard method for estimating a survival curve while using the partial information from censored subjects correctly.
- What censoring is and why simple averages fail with it
- How to build a Kaplan–Meier curve by hand from a small dataset
- How to read median survival and attach a confidence interval
- The assumptions behind the method
Why Censoring Is a Problem
Suppose ten patients are followed for up to 12 months. Six die during follow-up at known times, and four are still alive when they leave the study or when the study ends. If you drop the four censored patients, you have discarded people who survived at least as long as they were observed, which pushes survival estimates down. If you count them as deaths, you do worse still. And if you simply report the fraction who died, the answer depends on how long the study happened to run. The Kaplan–Meier method instead lets each censored patient contribute exactly what is known: they were at risk, and survived, up to the moment they left.
The Method
The estimator multiplies together survival probabilities calculated at each time when at least one event occurs. At an event time t, with nₜ subjects still at risk (not yet had the event or been censored) and dₜ events, the chance of surviving that moment is (nₜ − dₜ) ÷ nₜ. The overall survival estimate is the running product:
This is chained conditional probability, the same logic as multiplying along the branches of a probability tree: to be alive at month 8, a patient must have survived month 2, and then month 3 given that, and so on. Censoring times never trigger a step in the curve, but they reduce the number at risk for all later steps.
Worked Example
Problem: Ten patients are followed, with these times in months. An asterisk marks a censored observation (alive at last contact):
| Patient | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Time (months) | 2 | 3 | 3* | 5 | 6* | 7 | 8 | 9* | 11 | 12* |
The event times are 2, 3, 5, 7, 8, and 11. At each, count the subjects at risk (those with observed time at least t, so someone censored at the same time as an event counts as still at risk at that moment), then update the estimate:
| Time t | At risk nₜ | Deaths dₜ | 1 − dₜ ÷ nₜ | Survival Ŝ(t) |
|---|---|---|---|---|
| 2 | 10 | 1 | 0.9000 | 0.900 |
| 3 | 9 | 1 | 0.8889 | 0.800 |
| 5 | 7 | 1 | 0.8571 | 0.686 |
| 7 | 5 | 1 | 0.8000 | 0.549 |
| 8 | 4 | 1 | 0.7500 | 0.411 |
| 11 | 2 | 1 | 0.5000 | 0.206 |
Work through the mechanics: at month 2, all 10 are at risk and one dies, so Ŝ = 0.9. At month 3, one patient has died and 9 remain at risk (the patient censored at 3 is still counted), and one dies: Ŝ = 0.9 × 8/9 = 0.800. Between months 3 and 5, patient 3 leaves censored, so at month 5 only 7 remain (patients 4 to 10). The estimate becomes 0.8 × 6/7 = 0.686. Each censored patient (at 3, 6, and 9) silently shrinks the at-risk count for later steps without causing a drop in the curve.
The estimated curve is a step function: flat between event times, dropping at each event. It starts at 1.0 at time zero and falls to about 0.206 at month 11.
Reading the Curve
Survival at a given time: the estimated probability of surviving past 7 months is 0.549, or roughly 55%.
Median survival: the first time the curve drops to 0.5 or below. Ŝ is 0.549 at month 7 and 0.411 at month 8, so the estimated median survival is 8 months. Unlike the mean, the median is well defined even when many subjects are still alive at the end of the study, which is one reason survival is usually summarized by it. Compare this with simply dropping the four censored patients: the remaining six all died, and the estimate would say nobody survives past 11 months, plainly too pessimistic.
Uncertainty: the standard error comes from Greenwood's formula, Ŝ(t) × √[Σ dᵢ ÷ (nᵢ(nᵢ − dᵢ))]. At month 8 it works out to about 0.176, so a rough 95% interval is 0.411 ± 1.96 × 0.176, or about 0.07 to 0.76. With only ten patients, the curve is imprecise: the interval spans from nearly nothing to three in four surviving. Survival curves from small studies should be read with that width in mind, as discussed generally in confidence intervals. Software typically uses a transformed interval that stays between 0 and 1, which behaves better near the extremes.
Comparing Two Groups
A typical study draws one Kaplan–Meier curve per group, such as treatment and control, and asks whether they differ. The standard test is the log-rank test, which compares the observed and expected number of events in each group at every event time, in the spirit of a chi-square comparison. Curves that separate early and stay apart suggest a real difference, while curves that cross warrant caution because a single p-value can hide a change in the pattern over time.
Assumptions
- Non-informative censoring. Censored subjects should be no more or less likely to have the event than those who stay under observation. If patients drop out because they are getting sicker, the method overestimates survival.
- Consistent survival over enrolment time. Patients entering early and late in the study should have the same survival prospects.
- Exact, well-defined event times. The event and the clock's start point must be clear and consistent for all subjects.
Relation to Parametric Models
The Kaplan–Meier curve makes no assumption about the shape of survival. Parametric alternatives assume a specific distribution, such as the exponential distribution (a constant hazard) or the Weibull distribution (a hazard that rises or falls over time), and fit it by maximum likelihood, where censored subjects contribute the probability of surviving beyond their observed time. Kaplan–Meier is the usual first look, and it is often used to check whether a parametric shape is reasonable.
Real-World Uses
Clinical trials: survival and time-to-relapse curves are the standard way to report treatment outcomes in cancer and cardiovascular research.
Customer analytics: a subscription business can estimate how long customers stay, treating current customers as censored, and compare retention across sign-up channels.
Reliability engineering: time to failure for components, where units still working at the end of a test are censored observations.
Common Mistakes
Treating censored observations as events. This biases survival estimates downward. A censored subject has not had the event yet.
Discarding censored subjects. The method exists so they can be kept. Removing them throws away real information and also biases the estimate.
Over-reading the tail. At late times, few subjects remain at risk, so the curve is driven by a handful of people and its uncertainty is large. A curve's last drop can rest on a single patient.
Reporting mean survival. When many subjects are censored, the mean is undefined or misleading. Report the median and the survival probability at chosen times.
What does censoring mean?
Why does the curve not drop at a censoring time?
Is the Kaplan–Meier curve the same as a proportion surviving?
What if the curve never reaches 0.5?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals →