Home / Guides

How to extract data from a Kaplan–Meier curve

Updated 2026-09-25 · TrialCurve methods team

In one paragraph: get the sharpest version of the figure you can, ideally from the vector PDF. Calibrate the x and y axes with at least two known tick values each, trace every arm's step curve, and copy the numbers-at-risk table exactly. Then QC the digitised points (they must be monotonically non-increasing and start at 1.0) and feed the curve and table into a reconstruction algorithm such as Guyot 2012. You can do this by hand in about 20–60 minutes per figure, or automatically in about a minute.

1. Get the best possible source image

2. The manual route (WebPlotDigitizer)

  1. Load the image and choose a 2D (X–Y) plot.
  2. Calibrate: click two x-axis ticks and two y-axis ticks and type their values. Check whether the y-axis is a percentage or a proportion.
  3. For each arm, trace the curve with the colour extraction tool or click the corners of each step (top and bottom of every drop).
  4. Export the points to CSV, one file per arm.
  5. Type the numbers-at-risk table into a spreadsheet: time, n per arm.

This is reliable but slow. Cochrane's standards (MECIR C46) call for two people to extract outcome data independently, which doubles the effort.

3. The automated route

Upload the figure below. TrialCurve calibrates the axes, separates and traces each arm, reads the at-risk table (two independent readers), and returns the digitised curve, the reconstructed IPD and summary statistics. The validation pack compares everything against the numbers printed on the figure.

4. Quality-check the digitised data

5. Export for analysis

Export one row per patient (arm,time,event) and analyse it with standard survival software. If you only need a hazard ratio and have no curve data, the Tierney et al. (2007) methods estimate log HRs and variances from reported statistics. See our hazard-ratio tool.

FAQ

How long does manual KM digitisation take?

Typically 20–60 minutes per figure, including the numbers-at-risk table and QC, and roughly double that if two reviewers extract independently.

Can ChatGPT or Claude read values off a KM curve?

On their own, in a single pass, older vision models estimated curve positions less precisely than pixel measurement: in our benchmark Claude Opus 5 had a median error of 0.8 months in median survival, against 0.1 months for the measured curve. Claude Opus 5.5 with a zoom tool, which crops and enlarges the figure where it needs to, now matches pixel measurement (about 0.08 months). A chat window still gives you a reading, not a checked reconstruction.

What if the curves overlap?

Trace them where they separate, and assume they follow the same path where they overlap. Automated tools handle this by detecting which curve is drawn on top.

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