Menu
numiqo
Statistics made easy

Statistics made easy

8th revised edition (March 2026) - many illustrative examples - only €8.99

Free sample

Kaplan-Meier Curve

Author: Dr. Hannah Volk-Jesussek
Updated:

Load example data

The Kaplan-Meier curve is used to analyze time-to-event data, such as the time until death, relapse, failure of a component, or another clearly defined event. It shows the estimated survival probability over time. Time is plotted on the x-axis and the survival probability, also called the survival function, is plotted on the y-axis.

What does a Kaplan-Meier curve show?

The first question is what the survival probability means. Let's look at this with an example. Suppose you're a dental technician and you want to study the "survival time" of a filling in a tooth.

So your start time is the moment when a person goes to the dentist for a filling, and your end time, the event, is the moment when the filling fails. The time between these two events is the focus of your study.

Kaplan-Meier curve example

You can now see how likely it is that a filling will last longer than a certain point in time by looking at the Kaplan-Meier curve. In this example, "survival" simply means that the filling has not failed yet.

Kaplan-Meier survival time curves

The horizontal axis represents time, usually measured in months or years. The vertical axis represents the estimated probability of still being event-free at that time.

For example, you may be interested in the probability that your filling will last longer than 5 years. To do this, you read off the value at 5 years on the graph, which is the estimated survival probability. At 5 years, the Kaplan-Meier curve gives you a value of 0.7. The estimated probability that a filling lasts longer than 5 years is therefore 70%.

Interpreting the Kaplan-Meier curve

The Kaplan-Meier curve shows the estimated survival probability after each observed event time.

Larger or more frequent downward steps indicate that more events occurred relative to the number still at risk at those times. Flat sections mean that no events were observed during those intervals; they do not prove that the underlying event risk was zero.

If there are multiple curves representing different groups, you can compare their shapes and levels. If the curves separate, the estimated survival probabilities differ between the groups. If the curves cross, the direction of the difference changes over time and a single overall comparison may be difficult to interpret.

At specific time points, you can estimate the survival probability by locating the time point on the horizontal axis and dropping a vertical line to the curve. Then, read the corresponding survival probability from the vertical axis.

How to calculate a Kaplan-Meier curve

To create a Kaplan-Meier curve, you first need the data for your subjects. Let's say the filling lasted 3 years for the first subject, 4 years for the second subject, 4 years for the third subject, and so on.

Calculate Kaplan-Meier Curve

Let's assume that none of the cases are "censored". The data are already arranged so that the shortest survival time is at the top and the longest at the bottom.

Now we create a second table that we can use to draw the Kaplan-Meier curve. To do this, we look at the time points in the left table and add the time zero. So we have the time points 0, then 3, 4, 6, 7, 8, 10, 11 and 13. In total we have 10 subjects.

Now we look at how many fillings break out at each time. We enter this in the column m. So at time 0, no fillings had failed. After 3 years, one filling had failed, after 4 years there were two, after 6 years there was one. We now do the same for all the other times.

Next, we look at the number of cases that are still at risk shortly before each event time. This means all cases that have survived up to that point, including the cases where the event occurs exactly at that time. We enter this in column n.

So n is the number at risk at that time point.

After zero years we still have all 10 people. After 3 years, we get 10 for n, 9 people still have their filling intact, and one person's filling failed after exactly 3 years.

The easiest way to get n is to take the previous n value and subtract the previous m value. So we get 10 - 1 equals 9. Then 9 minus 2 equals 7, 7 - 1 equals 6... and so on and so forth.

Because there is no censored data in this first example, we can calculate the survival probability after each event time by dividing the number still event-free after that event time, n - m, by the total number of subjects, i.e. 10. This simple proportion is equivalent to the Kaplan-Meier product in an example without censoring.

At time zero, 10 divided by 10 is equal to 1. After the event at 3 years, 9 divided by 10 is equal to 0.9; after the two events at 4 years, 7 divided by 10 is equal to 0.7. Now we do the same for all the other event times.

How to read and draw a Kaplan-Meier curve

We can now plot the Kaplan-Meier curve. At time 0 we have a value of 1, after 3 years we have a value of 0.9 or 90%. After 4 years we get 0.7, after 6 years 0.6 and so on and so forth.

Drawing the Kaplan-Meier curve

From the Kaplan-Meier curve, we can now see what percentage of the fillings have not failed after a certain time. The curve is drawn as a step function because the estimated survival probability changes only when an event occurs.

Kaplan-Meier curve with censored data

Next, we look at what to do when censored data is present. For this purpose, censored data has been added to the example in these three places. If you're not sure what censored data is, see the survival analysis tutorial.

Kaplan-Meier curve with censored data

We now need to enter this data into our Kaplan-Meier curve table. We do this as follows: We create our m exactly as we did before, looking at how many cases failed at each time point.

Now we add a column q, in which we enter how many cases were censored at each time. Censored cases lower the number of people still at risk for later event times, but they do not directly make the survival curve drop because the event itself was not observed.

In this calculation table, a censoring time between two event times is recorded with the previous event-time row so that it is removed from the next risk set. The censoring mark on the Kaplan-Meier graph should still be placed at the subject's actual censoring time.

Kaplan-Meier Curve Censoring

Let's look at this case. The censoring took place at time 9. In this table, however, there is no event at nine years, so no new event-time row is added. For the risk-set bookkeeping used here, the person is counted in the censoring column for the row at time 8 and is no longer at risk at the next event time.

We can now re-calculate the values for the survival curve. If we have censored data, this is a little more complex.

For this, we write down the values in the first step. We get these values by calculating (n - m) / n. In the third row, for example, we get the value 10/12 because 12 - 2 divided by 12 is 10/12.

The calculation of the real value is iterative. To do this, we multiply the result from the previous row by the value we have just calculated.

This is the basic Kaplan-Meier formula in words: at each event time, multiply the previous survival probability by the proportion that did not experience the event at that time.

So, in the first row we get 1, now we calculate 12/13 times 1, which is equal to 0.923. In the next row we calculate 10/12 times 0.923 and get a value of 0.769. We take this value again for the next row.

We do this for all the rows. We can then plot the Kaplan-Meier curve with this data in the same way as before.

Comparing different groups

If you are comparing several groups or categories (e.g. treatment groups), the Kaplan-Meier curve consists of several lines, each representing a different group. Each line shows the estimated survival probability for that particular group. To test whether there is a statistically significant difference between the groups, the log-rank test can be used.

If you want to compare survival between groups, you can calculate a Log Rank Test. If you want to examine several explanatory variables together, you can calculate a Cox Regression here with numiqo.

Confidence bands and numbers at risk

A publication-ready Kaplan-Meier figure should show more than the step curve alone. Confidence bands communicate uncertainty, censoring marks show incomplete follow-up, and numbers at risk show how many participants still contribute information at selected times. Estimates near the end of follow-up are often less precise because fewer people remain at risk.

numiqo also reports restricted mean survival time, median survival with confidence limits, and a complete table of survival estimates, standard errors, and confidence intervals.

Median survival is the earliest time at which the estimated survival probability reaches or falls below 0.50. It cannot be estimated if the curve never reaches 0.50. An ordinary mean survival time may also be unknown when follow-up ends before the curve reaches zero; restricted mean survival time avoids this problem by averaging survival only up to a stated time limit.

Kaplan-Meier curve assumptions

The Kaplan-Meier method is useful because it can include censored observations, but its interpretation depends on a few assumptions.

Non-informative censoring: At a given time, censored participants should have the same future event prospects as comparable participants who remain under observation. Censoring does not have to occur completely at random, but it must not selectively remove people with different future survival after relevant information has been taken into account. Otherwise, the estimated survival probabilities may be biased.

Independent observations: One participant's event time should not determine another participant's event time. Dependence can arise, for example, with paired observations, repeated events from the same person, or participants grouped in households or clinics; such data need methods that account for this structure.

Clearly defined time origin and event: The starting point and event must be defined consistently for all participants. The Kaplan-Meier method does not assume that event risk stays constant over time; its steps can reflect changes over follow-up.

No competing risks: The Kaplan-Meier curve assumes that the event of interest is the only possible outcome and there are no other competing events that could prevent the occurrence of the event being studied. Competing events can include other causes of death or events that render the occurrence of the event of interest impossible.

If competing events are observed, use the cumulative incidence function instead of interpreting one minus the Kaplan-Meier curve as event probability.

Create a Kaplan-Meier curve online

Load example data

To create a Kaplan-Meier curve with numiqo, go to the statistics calculator and copy your own data into the table. You need a time column. If your data contains censored cases, you also need a status column that shows whether the event occurred or whether the case was censored.

Kaplan-Meier curve online calculator

Now click on "Plus" and select Survival Analysis. Here you can create the Kaplan-Meier curve online. If you select the variable "Time", numiqo will create the Kaplan-Meier curve and you will get the survival table. If you do not select a status variable, numiqo assumes that the data is not censored. If this is not the case, also select the variable that contains the information about which case is censored and which is not. In the example, 1 stands for "event occurred" and 0 stands for "censored". Now you will get the appropriate results.


Statistics made easy

  • many illustrative examples
  • ideal for exams and theses
  • statistics made easy on 464 pages
  • 8th revised edition (March 2026)

Only €8.99

Free sample
numiqo

"Super simple written"

"It could not be simpler"

"So many helpful examples"

Cite numiqo: numiqo Team (2026). numiqo: Online Statistics Calculator. numiqo e.U. Graz, Austria. URL https://numiqo.com