Introduction
A Kaplan-Meier (KM) plot is one of the most recognizable figures in clinical-trial reporting. It is used to display the estimated probability of remaining event-free over time when the outcome is time-to-event and some patients have not experienced the event by the time of analysis.
The apparent simplicity of the figure can be misleading. A good KM plot is not merely a survival curve with two colored lines. The figure should make the estimand, event definition, censoring convention, population, follow-up time, uncertainty, and treatment comparison understandable without forcing the reader to reconstruct the analysis from the methods section.
What Is a Kaplan-Meier Plot?
The Kaplan-Meier estimator is a product-limit estimator. At each distinct event time, the estimated probability of surviving beyond that time is updated according to the number of events and the number of patients at risk immediately before the event.
where nj is the number at risk just before event time tj, and dj is the number of events at that time.
The curve therefore changes at event times. A patient who is censored does not create a downward step; instead, that patient leaves the risk set for subsequent event times.
The Basic Anatomy of a Good KM Figure
| Component | Best-practice role |
|---|---|
| X-axis | Clearly defined time scale and clinically meaningful units. |
| Y-axis | Estimated survival probability, usually shown from 0 to 1 or 0% to 100%. |
| Curve | One step function per treatment group or analysis group. |
| Censoring marks | Show where observations were censored without implying an event. |
| Confidence interval | Communicate statistical uncertainty around the estimated curve when appropriate. |
| Numbers at risk | Show how much information remains at clinically relevant time points. |
| Legend | Identify groups using the same labels as the analysis and tables. |
| Event/analysis information | Clarify event definition, analysis population, and follow-up convention in the caption or footnote. |
An Actual Kaplan-Meier Plot
The following simulated example shows the essential components of a two-arm time-to-event display. The curves are illustrative rather than clinical-trial data.
The curves are simulated. Confidence bands are included to illustrate uncertainty; they are not intended to represent a particular trial's estimates.
Step 1: Define the Time-to-Event Endpoint Before Plotting
The most important KM best practice occurs before any graphics are created: define exactly what counts as an event and what time origin is being used.
Examples include:
- Overall survival: time from a prespecified origin to death from any cause.
- Progression-free survival: time from the prespecified origin to progression or death, according to the protocol-defined endpoint.
- Time to treatment failure: time from the origin to the first qualifying treatment-failure event.
- Time to a specific safety event: time from the relevant origin to the first occurrence of the specified event.
Step 2: Define the Time Origin
The x-axis is only interpretable when the time origin is known. Depending on the protocol, time zero may be randomization, first dose, surgery, diagnosis, or another prespecified milestone.
| Time origin | Example use | Key reporting point |
|---|---|---|
| Randomization | Many randomized efficacy endpoints | Supports an intention-to-treat treatment comparison when specified. |
| First dose | Some treatment-exposure analyses | State that time is measured from first dose. |
| Surgery | Post-operative recurrence endpoints | Make the surgical time point explicit. |
| Diagnosis | Disease-course studies | Be precise about diagnostic definition and date. |
Changing the time origin can change the analysis population, risk sets, and interpretation. It should therefore be an analysis decision, not a cosmetic plotting choice.
Step 3: Understand Censoring
Right censoring occurs when the event of interest has not been observed by the end of a patient's observed follow-up, or when the patient otherwise leaves observation according to the prespecified censoring rules.
For a conventional right-censored KM analysis, censoring generally means that the patient contributes information up to the censoring time and then leaves the risk set. It does not mean that the patient experienced the event.
Censoring marks are useful because they remind the reader that the flat portion of a curve does not necessarily mean every patient remained under observation.
Do Not Hide Censoring Marks
A common aesthetic mistake is to remove censoring marks because they make a figure look “busy.” This can make the tail of a curve appear more certain than it really is.
Censoring marks are especially important late in follow-up, when only a small number of patients may remain under observation. If the figure uses a confidence band and a numbers-at-risk table, the censoring marks can remain subtle, but they should generally remain identifiable.
Step 4: Show Numbers at Risk
The numbers-at-risk table is one of the most useful additions to a KM figure. It tells the reader how many patients remain in the risk set at selected time points.
In a real report, risk-table values should come directly from the analysis dataset and use the same population and censoring convention as the plotted curves.
Risk-table intervals should be chosen to balance readability and information. Common choices include monthly, quarterly, or clinically meaningful landmark times, depending on the follow-up duration.
Why the Tail of the Curve Needs Caution
A KM curve can continue far to the right even when very few patients remain at risk. A visually smooth tail does not mean that the estimate is based on a large amount of information.
For example, suppose a study begins with 400 patients but only 12 remain at risk near the end of follow-up. A small number of events or censoring times can materially change the estimated curve. The risk table makes this limitation immediately visible.
Step 5: Add Confidence Intervals When They Improve Interpretation
A KM estimate is uncertain. Confidence intervals can communicate that uncertainty directly on the figure.
For a publication or clinical study report, the decision to show confidence bands should be consistent with the statistical reporting strategy. If bands are shown, the figure legend or footnote should identify the confidence level and the method if required by the reporting standard.
Confidence intervals should not be mistaken for prediction intervals, and they should not be used as a visual substitute for a prespecified hypothesis test.
Median Survival: Useful, but Not Always Available
The median survival time is the time at which the estimated survival probability reaches 0.50. If the curve never falls to 0.50 during the observed analysis period, the median is not estimable from that analysis.
This leads to an important reporting distinction:
| Situation | Appropriate interpretation |
|---|---|
| Curve crosses 50% | Median can be estimated, subject to the analysis method and confidence interval. |
| Curve remains above 50% | Median is not reached / not estimable during the analysis. |
| Very sparse tail | Median may be statistically unstable; report the confidence interval and event information. |
Landmark Survival Estimates
Sometimes a fixed-time survival estimate is more informative than the median. Examples include survival at 6, 12, 24, or 36 months, depending on the disease and endpoint.
A good KM figure can complement the curve with a table or text reporting the estimated survival probability and confidence interval at prespecified landmarks.
The landmark line is illustrative. A production figure should use prespecified landmark times and report the corresponding estimates and confidence intervals.
Step 6: Choose the X-Axis Carefully
The x-axis should use units that match the clinical context. Days may be appropriate for short follow-up, whereas months or years may be easier to interpret for long-term survival.
Avoid unnecessary decimal precision. If follow-up is conventionally reported in months, labels such as 3, 6, 9, 12, 18, and 24 months are usually easier to read than a dense sequence of highly precise values.
At the same time, the underlying analysis should retain the appropriate event and censoring times. Simplifying the displayed tick labels must not imply that the statistical analysis was performed only at those landmarks.
Step 7: Use a Sensible Y-Axis
The y-axis is usually survival probability, expressed either from 0 to 1 or from 0% to 100%. Percentage labels are often intuitive for clinical audiences.
Unless there is a compelling reason to do otherwise, avoid an overly compressed y-axis that visually exaggerates small absolute differences. A truncated y-axis can make two curves appear dramatically separated when their absolute difference is modest.
Step 8: Keep Treatment Groups Visually Consistent
Treatment labels and visual encodings should remain consistent across the KM figure, efficacy tables, subgroup figures, and text. If “Placebo” is used in the tables, do not call the same group “Control” in the figure unless that distinction is intentional.
Color can distinguish treatment groups, but the figure should remain understandable when printed in grayscale or viewed by readers with color-vision deficiencies. Line style, labels, and ordering can provide additional redundancy.
When to Use Separate Panels
Separate panels can be useful when the figure contains many strata or when a single combined plot becomes difficult to read. Examples include panels by endpoint, disease cohort, or prespecified population.
When treatment groups are compared across panels, keep the scales and treatment ordering consistent unless there is a documented reason not to.
Subgroup KM Plots
Subgroup KM figures require additional caution. A visually different curve in a small subgroup is not evidence of a treatment effect in that subgroup unless the analysis was prespecified and appropriately estimated.
- State the subgroup definition clearly.
- Show the subgroup sample size.
- Be aware of sparse event counts.
- Use consistent time and probability scales across comparable panels.
- Do not infer interaction from separate within-subgroup p-values.
Step 9: Distinguish the Curve From the Statistical Comparison
Two curves can appear separated without the corresponding statistical comparison being significant, and curves can cross in ways that make a single hazard-ratio summary difficult to interpret.
The figure should therefore be treated as one part of the evidence package. Depending on the estimand and analysis plan, the associated report may include:
- Number of patients analyzed
- Number and percentage with events
- Median time-to-event and confidence interval, when estimable
- Landmark survival estimates, when prespecified
- Hazard ratio and confidence interval, when appropriate
- Prespecified hypothesis-test results
Crossing Curves
Crossing KM curves deserve special attention. The proportional-hazards assumption may be questionable when the treatment effect changes substantially over time, and a single hazard ratio may not summarize the treatment contrast adequately.
A KM figure can reveal the crossing pattern, but the figure does not determine which alternative analysis should be used. The appropriate approach depends on the estimand, trial design, timing of effects, censoring, and statistical analysis plan.
This example is conceptual and simulated. It demonstrates a visual pattern rather than prescribing a particular inferential method.
Competing Risks: Do Not Automatically Use a Standard KM Curve
When the event of interest can be precluded by a different event that prevents its occurrence, competing risks need to be considered. A conventional KM estimate treating competing events as ordinary censoring answers a different question from the cumulative incidence of the event in the presence of competing risks.
For example, if the endpoint is time to a specific cause of death, deaths from other causes are not necessarily equivalent to ordinary non-informative censoring for the clinical question of interest.
Delayed Entry and Left Truncation
Some studies have patients enter the risk set after the nominal start of the time scale. This is often called delayed entry or left truncation. The risk-set construction must account for the time at which each patient becomes observable and eligible for the analysis.
A simple KM plot generated without accounting for delayed entry can therefore be wrong even if the final figure looks polished.
Immortal Time and Time-Dependent Definitions
Another common source of bias occurs when exposure or treatment classification depends on information that becomes available after time zero. If a patient must survive long enough to be classified into a group, a naive KM comparison can introduce immortal-time bias.
The figure cannot fix an incorrectly defined analysis population. Treatment assignment, landmarking, time-dependent covariates, and other design choices must be handled in the analysis dataset before the plot is generated.
Do Not Smooth Kaplan-Meier Curves
A KM estimator is a step function. Smoothing it can obscure the actual estimator and make event timing less transparent.
If a smoothed survival or hazard display is desired for an exploratory purpose, it should be presented as a different analysis rather than as a cosmetically modified KM estimate.
Numbers at Risk vs. Patients Still Under Follow-Up
The number at risk is not simply “the number of patients still in the study.” It is the number contributing to the risk set under the specific survival analysis at that time.
Patients can leave the risk set because of an event or censoring. Consequently, the risk-table value should be interpreted in the context of the endpoint and censoring rules.
Example Interpretation
Suppose the treatment-A curve is 0.82 at 12 months and the treatment-B curve is 0.70. A careful interpretation is that the estimated event-free survival probability at 12 months is approximately 82% for treatment A and 70% for treatment B, under the analysis population and censoring rules used.
It would be inappropriate to conclude from those two percentages alone that treatment A “reduces risk by 12%.” The absolute survival difference is 12 percentage points; relative risk, hazard ratio, and other effect measures answer different questions.
Absolute Difference vs. Relative Effect
| Measure | What it describes |
|---|---|
| Survival probability | Estimated probability of remaining event-free at a specified time. |
| Absolute difference | Difference in survival probabilities between groups at a specified time. |
| Hazard ratio | Relative instantaneous event rate under the model assumptions and estimand. |
| Median survival | Time at which the estimated survival probability reaches 50%, if reached. |
Data Structure for a KM Plot
A minimal patient-level survival-analysis dataset generally contains an identifier, a time variable, an event indicator, and the grouping variable. Additional variables may define strata, analysis populations, or other prespecified factors.
| Variable | Description |
|---|---|
| USUBJID | Unique participant identifier |
| AVAL | Analysis time to event or censoring |
| EVENT | Event indicator, typically 1 for event and 0 for censored observation under the coding convention |
| TRT01P | Planned treatment group or equivalent analysis grouping variable |
| STRATUM | Optional stratification variable when applicable |
R Implementation
The survival package provides the core Kaplan-Meier estimator. The example below creates a standard two-group KM plot.
library(survival) library(survminer) fit <- survfit( Surv(AVAL, EVENT) ~ TRT01P, data = analysis ) ggsurvplot( fit, data = analysis, conf.int = TRUE, censor = TRUE, risk.table = TRUE, risk.table.height = 0.24, xlab = "Time from Randomization (months)", ylab = "Event-Free Survival Probability", break.time.by = 3, surv.scale = "percent", ggtheme = theme_classic() )
Adding Median Survival
ggsurvplot( fit, data = analysis, conf.int = TRUE, censor = TRUE, risk.table = TRUE, surv.median.line = "hv", xlab = "Time from Randomization (months)", ylab = "Overall Survival", ggtheme = theme_classic() )
Median lines can be useful for teaching or exploratory analysis, but they should not replace a clearly reported median estimate and confidence interval in the accompanying results.
Controlling the X-Axis in R
ggsurvplot( fit, data = analysis, conf.int = TRUE, risk.table = TRUE, break.time.by = 6, xlim = c(0, 36), xlab = "Months from Randomization", ylab = "Survival Probability" )
Use an explicit x-axis limit only when it is justified by the intended display. Always inspect whether observations or clinically relevant follow-up have been excluded from view.
Stratified Analyses
If the statistical analysis is stratified, do not assume that a visually stratified KM plot automatically reproduces the inferential analysis. The estimator, stratification, test, and model should be aligned with the prespecified analysis.
fit_strat <- survfit( Surv(AVAL, EVENT) ~ TRT01P, data = analysis, strata = analysis$STRATUM )
The exact implementation depends on the analysis specification and software workflow. The key requirement is that the plotted population and estimator match the analysis being reported.
Production Workflow
Common Mistakes
- Calling every curve “survival.” The endpoint should be named precisely.
- Omitting the numbers at risk. This hides how much information supports the tail of the curves.
- Removing censoring marks. The figure can then overstate the apparent continuity of observation.
- Reporting a median when 50% was never reached. Use “not reached” or the appropriate estimability language.
- Truncating the y-axis to exaggerate differences. The visual scale should support honest comparison.
- Using inconsistent time origins. A curve cannot be interpreted without knowing what time zero means.
- Ignoring competing risks. A standard KM estimator may not answer the desired cumulative-incidence question.
- Overinterpreting subgroup curves. Visual differences do not establish interaction.
- Assuming the plot proves a treatment effect. The figure is not a substitute for the prespecified inferential analysis.
- Failing to validate the risk table. Risk counts must correspond to the plotted analysis population and time convention.
- Showing an extremely long sparse tail without context. Late estimates may be supported by very few patients.
- Smoothing the KM curve. A smoothed curve is not the Kaplan-Meier estimator.
KM Plot Checklist
| Question | Check |
|---|---|
| Endpoint | Is the exact event definition clear? |
| Time zero | Is the time origin stated? |
| Population | Does the figure use the prespecified analysis population? |
| Curves | Are treatment groups clearly and consistently identified? |
| Censoring | Are censoring marks displayed appropriately? |
| Uncertainty | Are confidence intervals included when appropriate? |
| Risk table | Are numbers at risk present and aligned with the x-axis? |
| Median | Is “not reached” handled correctly? |
| Axes | Are units, limits, and ticks clinically sensible? |
| Tail | Is sparse follow-up apparent and discussed where relevant? |
| Statistics | Are p-values, hazard ratios, and other inferential results kept distinct from the graphic? |
| QC | Can every displayed value be traced to the analysis dataset? |
How to Read a KM Plot in a Clinical Study Report
Start with the endpoint and time origin. Then identify the treatment groups and inspect the early portion of the curves. Next examine whether the curves separate, converge, or cross, and whether the pattern changes over time.
Then inspect the risk table. If the curves remain separated after the risk sets become very small, be cautious about assigning substantial weight to that visual tail.
Finally, integrate the figure with the reported event counts, median estimates, confidence intervals, landmark estimates, and prespecified inferential analysis.
References
Kaplan, E.L., Meier, P. (1958). Nonparametric Estimation from Incomplete Observations. Journal of the American Statistical Association, 53(282), 457–481.
Brookmeyer, R., Crowley, J. (1982). A Confidence Interval for the Median Survival Time. Biometrics, 38(1), 29–41.
Peto, R., Peto, J. (1972). Asymptotically Efficient Rank Invariant Test Procedures. Journal of the Royal Statistical Society: Series A, 135(2), 185–207.
Therneau, T.M., Grambsch, P.M. (2000). Modeling Survival Data: Extending the Cox Model. Springer.
Klein, J.P., Moeschberger, M.L. (2003). Survival Analysis: Techniques for Censored and Truncated Data. Springer.