Home / Guides

Numbers at risk in Kaplan–Meier plots, explained

Updated 2026-09-25 · TrialCurve methods team

Number at risk at time t is the count of patients still being followed who have not yet had the event or been censored just before t. It appears as a table under the KM plot, one row per arm, at regular time points. It shows how much data supports each part of the curve, and it is the key input for reconstructing patient-level data.

Why it matters

A simple consistency check

Censoring only removes patients, so the fraction still at risk can never exceed the survival probability: n(t)/n(0) ≤ S(t). If a digitised table breaks this, a cell was probably misread or rows were swapped between arms. TrialCurve runs this check automatically and flags any violation.

Adding the table to your own plots

Extracting it from a published figure

Copy every cell exactly, together with the time each column refers to, which is usually the x-axis tick above it. Common pitfalls are columns that skip ticks, rows listed in a different order from the legend, and small digits misread in low-resolution images. TrialCurve's vision model reads every cell, zooming into the table where the digits are small, and the reconstruction reports how closely it reproduces the curve, so a misread count shows up as a mismatch.

FAQ

Is 'number at risk' the same as 'number of events'?

No. At-risk counts patients still under observation at a time point; events are counted separately. The fall in numbers at risk over an interval includes both events and censorings.

What if the paper has no at-risk table?

Reconstruction is still possible from the initial N and, if reported, the total number of events, but the censoring pattern (and so the tail) is much less certain.

Reconstruct IPD from your own figure. Upload a Kaplan–Meier plot and get curves, numbers at risk, pseudo-IPD, hazard ratios and a validation pack. Three figures a month are free.

Try the live demo Browse trial data API docs