Editverse Free Calculator

Kaplan-Meier Survival Calculator

Estimate survival over time from data with censoring — with the Kaplan-Meier curve, median survival, and the reproducible R command. Read a full interpretation guide below. Validated against R 4.3.3.

In Simple Words

The Kaplan-Meier estimator charts the probability of “surviving” past each point in time, where the event can be death, relapse, device failure, or any one-time outcome. Its key strength is handling censoring: subjects who leave the study early or have not had the event by the end still contribute the time they were observed, rather than being discarded.

The result is a step-down curve: each step marks a time when an event occurred, and the curve’s height is the estimated probability of remaining event-free up to that moment. Reading off the time where the curve crosses 50% gives the median survival. To compare two groups’ curves, the log-rank test asks whether they differ more than chance would allow.

When to Use Kaplan-Meier

Use it for time-to-event data, especially when follow-up is incomplete — the defining feature of survival studies. It answers questions like how long patients remain progression-free, or how two treatments compare on time to an outcome. Pair the curve with the log-rank test for group comparison and report the number at risk beneath the plot.

Kaplan-Meier describes survival and compares groups, but it cannot adjust for other variables. To estimate the effect of a treatment while controlling for confounders, fit a Cox proportional-hazards model and report the hazard ratio with its 95% confidence interval. Check the proportional-hazards assumption before relying on a single hazard ratio. Not sure survival analysis is what you need? Our interactive Test Selector can help.

Kaplan-Meier Survival Survival curves and log-rank test · validated vs R 4.3.3
User guide

When to use. Estimate survival probability over time from censored time-to-event data, and compare groups with the log-rank test.

Assumptions. Censoring is non-informative; survival times are measured from a common origin.

Common mistakes. Do not treat censored subjects as event-free at the end: the method already accounts for them.

Worked example

Click Load example data above, then Run Analysis to see a fully worked result with figure, formula and interpretation for this test.

References
  1. Kaplan EL, Meier P. Nonparametric estimation from incomplete observations. J Am Stat Assoc. 1958;53:457-481.

Worked Examples

Example 1 — Reading median survival

Enter event times with a status flag (1 = event, 0 = censored). The curve steps down at each event and stays flat between them. Where it first drops to 0.5 is the median survival time. If the curve never reaches 0.5 within follow-up, the median is “not reached” — report that rather than extrapolating.

Example 2 — Comparing two groups

With a treatment and a control arm, two curves are plotted together and the log-rank test compares them across the whole follow-up. A small p-value indicates the survival experience differs; pair it with a hazard ratio from a Cox model to quantify the size of the difference.

Assumptions to Check

Non-informative censoring. The reason a subject is censored must be unrelated to their prognosis. If sicker patients drop out preferentially, the estimate is biased.

Consistent event definition and start time. Everyone should be followed from a comparable origin (e.g., diagnosis or randomisation) with the same event definition.

Proportional hazards for the log-rank test. The log-rank test is most powerful when the hazard ratio is roughly constant over time. Strongly crossing curves violate this and call for alternatives.

Common Mistakes

Ignoring censoring

Treating censored subjects as event-free or dropping them entirely biases survival estimates. The Kaplan-Meier method exists precisely to use their partial information correctly.

Over-reading the curve’s tail

As follow-up lengthens, few subjects remain at risk and the curve becomes unstable. Wide steps at the right end are uncertain; always show the number at risk.

Using log-rank when curves cross

Crossing survival curves violate proportional hazards and can make the log-rank test miss a real difference. Consider a Renyi or weighted test instead.

Reporting only a p-value

The log-rank p-value shows whether groups differ, not by how much. Add a hazard ratio with its confidence interval for magnitude.

Frequently Asked Questions

What does censoring mean?

A censored observation is one where the event had not occurred by the time the subject was last observed — due to study end or loss to follow-up. They still contribute the time they were at risk.

What is the difference between Kaplan-Meier and Cox regression?

Kaplan-Meier estimates and compares survival curves but cannot adjust for covariates. Cox regression models the hazard while adjusting for other variables and yields a hazard ratio.

What is the log-rank test?

It is a non-parametric test that compares the entire survival experience of two or more groups, weighting events across all time points.

Does the result match SPSS, R, and Stata?

Yes. The calculator uses the standard product-limit estimator from the survival package and shows the exact R command so you can reproduce it.

References

  1. Rich JT, Neely JG, Paniello RC, et al. A practical guide to understanding Kaplan-Meier curves. Otolaryngol Head Neck Surg. 2010;143(3):331–336. PMID 20723767.
  2. Dey T, Mukherjee A, Chakraborty S. A practical overview and reporting strategies for statistical analysis of survival studies. Chest. 2020;158(1S):S39–S48. PMID 32658651.
  3. Kaplan EL, Meier P. Nonparametric estimation from incomplete observations. J Am Stat Assoc. 1958;53(282):457–481.

Need This Analysis Done for Your Manuscript?

Our PhD biostatisticians run your survival analyses, fit Cox models, check proportional hazards, and deliver publication-ready Kaplan-Meier figures with reproducible R output.

Get Expert Statistical Help