AdvancedIndependently reviewed, not yet spot-checked by a human

Restricted mean survival time (RMST)

RMST is the area under the Kaplan-Meier curve between 0 and τ — on average, how long people lived during the first τ of follow-up. This page covers how to read that area, why τ must be fixed in advance, how far the conclusion moves when τ changes, why the difference and the ratio both have to be reported, and how to turn it into one sentence you can say to a patient.

Why this method gets its own page

The main line this site teaches for survival data is the Kaplan-Meier curve plus the Cox proportional hazards model, and the effect measure that comes out is a hazard ratio. A hazard ratio charges two things, and clinical readers pay them every day:

  1. It requires proportional hazards. The ratio between the two groups has to hold constant across the whole of follow-up. When it does not, that single number is a weighted average of two different effects and matches the true hazard ratio at no time point at all. How to check it, and what each of the four repairs costs, is on the proportional hazards assumption and Schoenfeld residuals.
  2. Its unit does not translate. HR 0.78 does not answer so what? To tell a patient how much longer this treatment lets people live on average, a hazard ratio cannot be converted directly — it is a ratio of instantaneous risks, not a length of time.

Restricted mean survival time (RMST) owes neither. It is an area under a curve, so it needs no proportionality of any kind, and its unit is time — days or months — which the reader does not have to translate.

That is why it is no longer only repair number four for a failed assumption. Recent oncology and heart-failure trials routinely put an RMST difference in the secondary analyses or the appendix, for exactly the two reasons above: when curves cross or an effect arrives late, the hazard ratio is hard to interpret, and RMST still computes and still says something out loud. This page is the site’s only full account of it — the PH page now carries a short pointer here instead of publishing a second set of RMST numbers of its own.

The definition: the area under the Kaplan-Meier curve

RMST(τ)=0τS(u)du\mathrm{RMST}(\tau) = \int_0^{\tau} S(u)\,\mathrm{d}u

S(u)S(u) is the survival curve estimated by Kaplan-Meier. Integrate it from 0 to τ\tau and the dimension of the answer is time: during the first τ\tau of follow-up, how long the average person lived.

A KM curve is a step function, so the integral needs no numerical method at all — it is a sum of rectangles, each step’s height times the number of days it lasts. That is also why RMST assumes no distributional shape and no proportionality: it uses nothing except the KM curve itself.

The example here is survival::lung, the NCCTG advanced lung cancer cohort, 228 patients in all. After a complete-case filter on the six columns time, status, age, sex_f, ph.karno, wt.loss, 214 patients enter the analysis with 152 deaths and 62 censored observations. The grouping variable is ph.karno, the Karnofsky performance score: Karnofsky >= 80 (n = 160, events = 105) against Karnofsky <= 70 (n = 54, events = 47). τ\tau is set to 365 days, one year.

Two Kaplan-Meier survival curves with the RMST areas shaded under them. The horizontal axis is days since enrolment, drawn out to 1000; the vertical axis is survival probability from 0 to 1. The blue-grey step curve is Karnofsky >= 80 (n = 160, events = 105) and the red step curve is Karnofsky <= 70 (n = 54, events = 47). Blue-grey runs above red for almost all of follow-up; the two only meet at about 880 days, where they cross and blue-grey slips slightly below red, both settling near 0.05, and the red curve extends a little further right than the blue-grey one. A dark dashed vertical line marks τ = 365 days, labelled tau = 365 days. To the left of it are two translucent fills, and they are stacked rather than placed side by side: the pink one is the entire region under the red curve, 221.6 days, labelled inside itself as the RMST for that group; the region under the blue-grey curve is 284.9 days and contains the pink one completely. What the eye can actually separate is therefore only the band between the two curves, and a leader line labels that band as the difference between the groups, 63.3 days. Three lines of text above the plot say that the shaded area up to tau is the restricted mean survival time, that the blue area contains the pink one rather than sitting beside it, and that the difference is 63.3 days with a 95% CI of 26.1 to 100.6 and p = 0.0009. Below the plot is a number-at-risk table listing both groups every 200 days, falling from 160 and 54 at the left edge to single digits at the right.
RMST is this area. Note that the two fills are stacked: the blue-grey area (284.9 days) contains the pink one (221.6 days), and the band the eye picks out is the difference, 63.3 days.Plotting script figures/scripts/B3-07-rmst.R

How to compute it

The survival package does it unaided, with nothing to install: summary(fit, rmean = tau) reports the area under the curve on [0, τ] for every stratum, together with its standard error.

library(survival)
data(cancer, package = "survival")

lung$sex_f <- factor(lung$sex, levels = c(1, 2), labels = c("Male", "Female"))

# The complete-case filter keeps exactly the six columns this analysis uses
ld <- lung[complete.cases(lung[, c("time", "status", "age", "sex_f",
                                   "ph.karno", "wt.loss")]), ]

# State the levels. Left to itself R sorts them alphabetically, "Karnofsky <= 70"
# lands in row one, and every m[1] below is silently the other group.
ld$karno_grp <- factor(
  ifelse(ld$ph.karno >= 80, "Karnofsky >= 80", "Karnofsky <= 70"),
  levels = c("Karnofsky >= 80", "Karnofsky <= 70")
)

fit <- survfit(Surv(time, status) ~ karno_grp, data = ld)

# That is the whole thing: rmean = tau makes summary() report the area under
# the curve on [0, tau]. The column names changed between survival versions:
# older ones lead with a star (*rmean), 3.8 onwards does not. Accept both --
# hard-coding one of them breaks silently on the next upgrade.
tb <- summary(fit, rmean = 365)$table
mcol <- intersect(c("rmean", "*rmean"), colnames(tb))
scol <- intersect(c("se(rmean)", "*se(rmean)"), colnames(tb))
m  <- tb[, mcol]
se <- tb[, scol]

# Difference: two independent means subtract, their variances add
d    <- m[1] - m[2]
se_d <- sqrt(se[1]^2 + se[2]^2)
c(diff = d, lcl = d - 1.96 * se_d, ucl = d + 1.96 * se_d,
  p = 2 * (1 - pnorm(abs(d / se_d))))

# Ratio: built on the log scale and transformed back (why: the section below)
r     <- m[1] / m[2]
se_lr <- sqrt((se[1] / m[1])^2 + (se[2] / m[2])^2)
c(ratio = r, lcl = exp(log(r) - 1.96 * se_lr), ucl = exp(log(r) + 1.96 * se_lr))

# Sensitivity to tau: the same code over a series of taus is figure 2
sapply(c(180, 270, 365, 450, 550, 650), function(tau) {
  x <- summary(fit, rmean = tau)$table
  xc <- intersect(c("rmean", "*rmean"), colnames(x))
  x[1, xc] - x[2, xc]
})

Verified with R 4.6.0 and survival 3.8.6. summary(fit, rmean = tau) ships with survival itself; nothing extra to install.

τ has to be fixed in advance

RMST means nothing without a τ attached — an RMST with no τ is not a number. And τ is chosen, which is the one genuinely soft spot this method has.

The RMST difference plotted against τ. The horizontal axis is the restriction time τ; the plotted curve spans 90 to 930 days and the axis itself runs further right to make room for the red dashed line there. The vertical axis is the RMST difference in days, ticked from 0 to 200. The solid blue line is the point estimate: it starts at 5.2 days at τ = 90, climbs steadily, passes through 63.3 days at τ = 365 — marked with a filled dot, a dropped dashed line and a label — then reaches 114.9 days near the right-hand end before flattening and easing back slightly to 114.7 days in the final step. The pale blue band is the 95% confidence interval, widening steadily to the right; its lower edge still covers zero until τ = 120 days and only clears the horizontal zero line beyond that. A red dashed vertical line at 1010 days carries rotated red text naming it the longest usable τ. Three lines of text above the plot say that picking τ after seeing the data means picking the size of the answer too, that the difference runs from 20.6 days at τ = 180 to 102.3 days at τ = 650, and that the band clears zero only from τ = 120 days on.
One dataset, one set of patients, only τ changes. The difference grows from 20.6 days at τ = 180 to 102.3 days at τ = 650, a factor of 5.0. Choosing τ after the fact is choosing how big the answer is.Plotting script figures/scripts/B3-07-rmst.R

Same data, same patients, same model — only τ moves:

τ (days)Karnofsky >= 80Karnofsky <= 70Difference (days)95% CIp
180165.1144.520.64.8 – 36.50.011
270229.9188.441.515.3 – 67.80.002
365284.9221.663.326.1 – 100.6< 0.001
450323.2243.379.933.3 – 126.5< 0.001
550356.5265.890.733.1 – 148.20.002
650382.3280.1102.335.9 – 168.60.003

Move τ from 180 to 650 days and the difference goes from 20.6 to 102.3 days, a factor of 5.0. These are not two different conclusions. They are two cuts of the same one — but if the paper reports only the second, and τ was settled after looking at the curves, the reader cannot tell a clinical reason from a chosen one.

The direction is worth noticing too. In this dataset the difference grows almost monotonically in τ, reaching 114.9 days at τ = 900 before flattening and easing back to 114.7 days in the last step. Figure 1 explains why: the two curves do not cross for almost all of follow-up, blue-grey stays above red, and every extra day of integration adds a little more area — until the tail, where the curves meet and cross and the difference stops accumulating. Data whose curves cross in the middle does not look like this; there the difference grows, then shrinks back visibly or even changes sign, and the choice of τ matters more still.

How far τ can go

RMST subtracts one curve’s area from another’s, so τ cannot run past the last observation in either group.

GroupLast observation (days)
Karnofsky >= 801010
Karnofsky <= 701022

The bound is set by the group with the shorter follow-up — Karnofsky >= 80 at 1010 days, not the other group’s 1022. So the longest usable τ on this page is 1010 days, the red dashed line on figure 2.

The reason is how a step function behaves once the last person leaves: the KM curve simply stops descending. It stops not because the risk ended but because nobody is left to have the event. Push τ past that point and the extra area is a rectangle extruded sideways from the final step — extrapolation, not estimation. Worse, the two groups get extruded by different lengths, so the difference is pushed around by an artefact.

Report both the difference and the ratio

QuantityEstimate95% CIReads as
RMST difference63.3 days26.1 – 100.6 daysDays of extra life on average within the first 365 days
RMST ratio1.291.09 – 1.51How many times the mean survival time within the first 365 days

The difference says how many days longer, and is the quantity that can go straight onto a patient handout. The ratio says how many times longer, and travels better between studies because it carries no unit. The practical reason to report both is that they respond to τ differently: over the same move from τ = 180 to 650 days the difference grows by a factor of 5.0 (the table above), while the ratio of the two RMSTs travels only from 1.14 to 1.37, because numerator and denominator grow together. Give only one and the reader has nothing to check it against.

The difference excludes 0 and the ratio excludes 1; both point the same way. The p < 0.001 quoted here is the test on the difference — the ratio is tested on the log scale, and its p value is not the same number.

One sentence you can say to a patient

This is where RMST earns its keep: it needs no translation.

During the first year after diagnosis (τ = 365 days, or 11.99 months), patients in the Karnofsky >= 80 group lived 9.36 months on average, and those in the Karnofsky <= 70 group lived 7.28 months, a difference of 2.08 months (95% CI 0.86 to 3.30 months).

Put plainly: the group with the better performance status lived about 2 months longer, on average, during that first year. Saying that needs no prior explanation of instantaneous risk, and none of what proportional means.

RMST and median survival are also two different things that clinical discussion routinely conflates. The median answers how far half the patients got; RMST answers how long the average patient lived during a stated window. The median cannot be estimated at all until the curve has dropped below 0.5, which needs long enough follow-up; RMST is computable regardless, and that is part of why early reports like it.

How to read it in a paper

RMST usually appears as a KM figure plus a row or a small table giving each group’s RMST(τ), the difference, the ratio and their intervals. Three things to check:

  1. What τ is, and how it was chosen. The Methods should be able to say. Taking τ as the largest follow-up time in the shorter-followed arm is an acceptable pre-specified rule; no account at all of where τ came from leaves the difference impossible to evaluate.
  2. Whether the difference and the ratio both appear, with intervals. An RMST reported as a bare point estimate is as unusable as a bare hazard ratio.
  3. Whether there is a sensitivity analysis over τ. In modern trials the appendix often holds exactly the curve in figure 2 above. A single τ that happens to sit where the gap is widest sends you back to point 1.

One more thing that gets skipped: RMST replaces the effect measure, not the censoring assumption. The KM curve underneath still requires non-informative censoring, and RMST inherits that requirement whole — see censoring and truncation.

Common misuse

MisuseWhy it is wrong
Choosing τ after seeing the curvesThe difference is a function of τ (here 20.6 days to 102.3 days), so choosing τ chooses the size of the answer
Computing a row of τ values and reporting the best oneSelective reporting. Either pre-specify one, or put the whole curve in the appendix
Letting τ exceed the last observation in the shorter-followed armThe extra area is the final step extruded sideways — extrapolation, not estimation
Setting τ out at the tailThat stretch of curve rests on a handful of people; the interval widens until there is no conclusion left
Reporting the difference or the ratio but not bothThey respond to τ differently, so one alone cannot be checked against anything
Building the ratio’s CI additively on the ratio scaleA ratio is right-skewed and bounded below by 0; work on the log scale and transform back
Calling RMST a mean life expectancyIt covers [0, τ] only, and says nothing beyond it
Comparing an RMST difference against a hazard ratio by sizeDifferent units, different questions — one is time, the other a ratio of risks
Switching to RMST because cox.zph() came out significant, without saying soReplacing the effect measure is a methodological decision; whether it was made before or after must be in the Methods
Treating RMST as a reason to skip the censoring checkNon-informative censoring is a KM requirement, and RMST is built on KM

Where this page sits

  • It is built on KM — see the Kaplan-Meier curve and the log-rank test. If the KM estimate is wrong, RMST is wrong; the number-at-risk table and the handling of censoring all follow that page’s rules.
  • The hazard ratio it is compared against — see the Cox proportional hazards model. They are not substitutes: most papers report both, the HR carrying the primary claim and RMST the clinical reading.
  • Repair four when proportional hazards fails — see the proportional hazards assumption and Schoenfeld residuals. The first three repairs (stratify, split the time axis, a time-varying coefficient) all still mend the Cox model; this one replaces the effect measure.
  • The other route out of proportional hazards — see weighted log-rank tests and milestone survival. The division of labour: a weighted log-rank test answers whether the two curves differ, RMST answers by how much and in days. In a delayed-effect setting such as immunotherapy the two usually appear together.
  • The censoring assumption underneath — see censoring and truncation.

Rerun every number on this page

/opt/homebrew/bin/Rscript figures/scripts/B3-07-rmst.R

Read the figure

The answer comes from the same statistical output that produced this page's figures, not from a number typed in beside them.

At a tau of 365 days the RMST analysis prints several numbers. Which one can be told to a patient directly as "on average this much longer alive"?

Show the answer and why

Correct answer: 63.3 days - the difference in restricted mean survival time between the arms

63.3 days is the difference in RMST, and its most useful property is its unit: days. It can be stated as "about two months longer alive, on average, over this year", which a hazard ratio cannot - a hazard ratio is a ratio, carries no unit of time, and cannot answer a patient asking how much longer. 19.0 is the standard error of that difference, describing precision rather than size; 26.1 is its lower 95% bound, and using an interval endpoint as the effect size reports a different quantity rather than a cautious version of the same one.

Three numbers in the output are measured in days. Which one cannot possibly be either arm's RMST?

Show the answer and why

Correct answer: 365.0 days is impossible - it equals tau, and RMST is the area under the curve from zero to tau

RMST is the area under the survival curve from zero to tau, so its ceiling is everyone surviving the whole window, which is tau itself. 365.0 can therefore only be tau and never an arm's RMST - a quick self-check: an "RMST" at or above tau means the wrong column was read. 284.9 and 221.6 are the two arms, and both are legitimate; a large gap between them does not make either impossible, since that gap is the quantity the analysis exists to measure.

Same data, same comparison: moving tau from 365 days to 90 shrinks the RMST difference sharply. What does that show?

Show the answer and why

Correct answer: The difference becomes 5.2 days - tau is part of the estimand, so it has to be fixed in advance

At 90 days the difference is 5.2 days; over a year it is 63.3. Neither is wrong - they answer two different questions, "how much longer alive over three months" and "over a year". Tau is therefore not a technical setting but part of the estimand, and it has to be fixed before the data are seen; choosing the tau that looks best afterwards is choosing the endpoint afterwards. 11.2 is the upper bound on the 90-day difference, not a point estimate.

Sources and licences

This page is original writing

Report a content problem

The statistics on this site are written by AI and reviewed by AI; a human only spot-checks. What you can see may be what we cannot.

The more specific, the more fixable — e.g. which sentence disagrees with which textbook or paper.

Needed only if you want a reply; reports without it are still read.

Sent along with your report

These are attached automatically. You can drop any of them.