How to extract data from a Kaplan–Meier curve
To extract data from a Kaplan–Meier curve, take the sharpest version of the figure, calibrate both axes, trace each arm's steps and copy the numbers-at-risk table. Check the points never rise, then run Guyot (2012) to rebuild patient data. By hand this takes about 20–60 minutes per figure (our estimate); automated, about a minute.
1. Get the best possible source image
- Download the article PDF and zoom to 200–400% before taking a screenshot. Aim for axis text at least 10 px tall.
- For a manual digitizer, crop to one panel, including the tick labels, legend and the numbers-at-risk table. Automated readers such as TrialCurve take the whole figure.
- If the figure is a vector graphic in the PDF, the exact coordinates exist in the file. A high-resolution screenshot gets you most of that precision.
2. The manual route (WebPlotDigitizer)
- Load the image and choose a 2D (X–Y) plot.
- 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.
- For each arm, trace the curve with the colour extraction tool or click the corners of each step (top and bottom of every drop).
- Export the points to CSV, one file per arm.
- 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. Other options: WebPlotDigitizer alternatives and all digitizers compared.
3. The automated route
Use the box at the top of this page. TrialCurve reads the axes, separates and traces each arm, reads the at-risk table, and returns the digitised curve, the reconstructed IPD and summary statistics. Its checks compare the result with the numbers printed on the figure.
4. Quality-check the digitised data
- Survival must start at 1.0 (or 100%) at time 0 and never increase.
- At each table time, the fraction still at risk cannot exceed survival (n(t)/n(0) ≤ S(t−), survival just before that time), because censoring only removes patients. A violation usually means a misread cell or a mismatched arm.
- Compare the reconstructed median and HR with the published ones. Differences above about 10% need a second look.
- Overlay the reconstructed KM curve on the original image. It should sit on top of the published line.
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?
Our estimate is 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 simulated 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.
Have a KM figure from a paper? Get its data in a minute.
Upload a figure