Home / Compare

IPDfromKM: how it works, and a faster alternative

Updated 2026-09-25 · TrialCurve

IPDfromKM is a free R package and Shiny app (Liu, Zhou and Lee, 2021) that reconstructs individual patient data from Kaplan–Meier curves with a modified Guyot algorithm. You supply the curve coordinates and the numbers at risk; it returns the IPD, re-plotted curves, a hazard ratio and accuracy checks. It is peer-reviewed and reliable, but every figure is manual work.

The IPDfromKM workflow

  1. Extract the coordinates of each curve: click points on the image (the package can read clicks on a figure) or use a digitizer such as WebPlotDigitizer.
  2. Type the numbers-at-risk table and the total number of patients.
  3. Pre-process the points (preprocess) and reconstruct each arm (getIPD).
  4. Check the result: the package compares the reconstructed and digitised curves and reports the hazard ratio.

IPDfromKM or TrialCurve?

IPDfromKMTrialCurve
Getting the curveClick points by handRead from the image automatically
Numbers-at-risk tableTyped inRead automatically
Multi-panel figuresOne curve at a timeEvery panel at once
Checks against the paperYour ownPrinted HRs and medians, automatically
Time per figure20–60 minutesAbout a minute
CostFree, open source3 free figures a month, then per figure

Use IPDfromKM for occasional figures, for teaching, or when you want to control every point. Use TrialCurve when you have many figures, multi-panel layouts or a deadline, or need an audit trail for an HTA dossier. Many teams use both, with one as a check on the other.

Accuracy

Both rest on the Guyot method, so a careful manual digitisation and an automated one reach similar accuracy. On figures from 40 published trials, TrialCurve reproduced 95% of printed hazard ratios within 10% (methods and results).

FAQ

Is IPDfromKM free?

Yes. It is an open-source R package on CRAN with an accompanying Shiny app.

What is the difference between IPDfromKM and the Guyot algorithm?

IPDfromKM implements a modified version of the Guyot (2012) algorithm, with pre-processing of the digitised points and built-in accuracy checks.

Can TrialCurve output data for use in R?

Yes. It returns the reconstructed IPD as CSV (arm, time, event), ready for survival, flexsurv or other R packages.

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