Kaplan–Meier Plot Explained: Survival Curves, Log-Rank Test and Interpretation

Updated November 7, 2026 · StatFAS Guides · Reading time about 8 minutes

Researchers meet the Kaplan–Meier plot in papers on genomics, medicine and biology, yet many readers struggle to read the Kaplan–Meier plot correctly. This guide explains the Kaplan–Meier plot, shows when the Kaplan–Meier plot helps, lists the points that matter for interpretation, and gives working routes to build the Kaplan–Meier plot in SPSS, R, Python and online.

On this page
  1. What is a Kaplan–Meier plot?
  2. When should you use a Kaplan–Meier plot?
  3. Why use a Kaplan–Meier plot?
  4. How to interpret a Kaplan–Meier plot
  5. Common mistakes
  6. How to make a Kaplan–Meier plot in SPSS, R and Python
  7. The easy way: make a Kaplan–Meier plot on statfas.com
  8. How to report the results in APA 7
  9. Frequently asked questions

What is a Kaplan–Meier plot?

A Kaplan–Meier plot draws the probability of staying free of an event (death, relapse, failure, germination, flowering, machine breakdown) as a function of time. The curve is a staircase: the line stays flat while time passes and drops at each time an event occurs.

Small vertical ticks usually mark censored observations, which are participants or units whose follow-up ended before an event was observed. Handling censoring correctly is the main reason the Kaplan–Meier plot replaces simple percentages.

When should you use a Kaplan–Meier plot?

Why use a Kaplan–Meier plot?

How to interpret a Kaplan–Meier plot

These are the key points for reading the Kaplan–Meier plot correctly:

Common mistakes with the Kaplan–Meier plot

Make a Kaplan–Meier plot now
Upload or paste data and get the Kaplan–Meier plot, the statistics and an APA 7 write-up in seconds.
Open the free Kaplan–Meier Survival Plot Maker

How to make a Kaplan–Meier plot in SPSS, R and Python

Full scripts are in the step-by-step Kaplan–Meier Survival Curve Tutorial: SPSS, R, Python and Free Online Tool. The key commands are shown here.

SPSS

SPSS handles Kaplan–Meier analysis well. Use Analyze > Survival > Kaplan-Meier for curves, medians and the log-rank test, and Analyze > Survival > Cox Regression for the hazard ratio.

KM Time BY Group /STATUS=Event(1) /PLOT SURVIVAL /TEST LOGRANK.

R

The survival package fits the curves, the log-rank test and the Cox model; the survminer package draws the Kaplan–Meier plot with a risk table.

fit <- survfit(Surv(Time, Event) ~ Group, data = d)
ggsurvplot(fit, data = d, pval = TRUE, risk.table = TRUE)

Python

The lifelines package provides the Kaplan–Meier estimator, the log-rank test and the Cox model, and draws the number-at-risk table.

KaplanMeierFitter().fit(d.Time, d.Event).plot_survival_function()
multivariate_logrank_test(df.Time, df.Group, df.Event)

The easy way: make a Kaplan–Meier plot on statfas.com

The free Kaplan–Meier Survival Plot Maker on statfas.com runs the required statistics, draws a publication-ready figure and writes the interpretation in APA 7 style. No installation and no coding are needed:

  1. Open the tool. Go to the StatFAS Kaplan–Meier Survival Plot Maker.
  2. Add data. Click Load example data to see the layout, then paste or upload Time, Event and Group columns.
  3. Check settings. Confirm the event coding (1 = event or 0 = event), the time unit and whether to show confidence bands.
  4. Read the results. The tool draws the Kaplan–Meier curves with censor marks and a number-at-risk table, and calculates medians with 95% CI, the log-rank test and the Cox hazard ratio for two groups.
  5. Download. Download the PNG or SVG, or a Word file with the figure, the tables and the APA 7 interpretation.

How to report the results in APA 7

An example results paragraph for the Kaplan–Meier plot:

Median survival was 18.0 months (95% CI [14.7, 24.3]) in the control group and 27.9 months (95% CI [20.3, NR]) in the treatment group. A log-rank test indicated that survival differed significantly between groups, χ²(1) = 6.65, p = .010. The hazard of the event in the treatment group relative to the control group was HR = 0.55 (95% CI [0.35, 0.87]; Figure 1).

Adapt the numbers to the data, state thresholds before the analysis, and cite the software used.

Frequently asked questions

What does a Kaplan–Meier plot show?

A Kaplan–Meier plot shows the estimated probability of remaining event-free over time for one or more groups, with censored observations marked on the curve.

What is censoring?

Censoring means that the event was not observed for a participant, for example because follow-up ended or the participant was lost. The Kaplan–Meier method uses the time observed without counting an event.

How do I compare two Kaplan–Meier curves?

Use the log-rank test for the global comparison and a Cox proportional-hazards model for a hazard ratio with a confidence interval.

What is median survival?

Median survival is the first time at which the estimated survival probability falls to 0.5 or below. If the curve never reaches 0.5, the median is not reached (NR).

Related guides

Kaplan–Meier Survival Curve Tutorial: SPSS, R, Python and Free Online ToolVolcano Plot Explained: Meaning, Uses and Interpretation (R, Python, SPSS)Clustered Heatmap Explained: Hierarchical Clustering, Dendrograms and InterpretationFree tool: Kaplan–Meier Survival Plot Maker

How to cite this page: StatFAS. (2026, November 7). Kaplan–Meier Plot Explained: Survival Curves, Log-Rank Test and Interpretation. https://statfas.com/blogs/kaplan-meier-plot-explained-survival-curves-log-rank