IPDfromKM: how it works, and a faster alternative
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
- 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.
- Type the numbers-at-risk table and the total number of patients.
- Pre-process the points (
preprocess) and reconstruct each arm (getIPD). - Check the result: the package compares the reconstructed and digitised curves and reports the hazard ratio.
IPDfromKM or TrialCurve?
| IPDfromKM | TrialCurve | |
|---|---|---|
| Getting the curve | Click points by hand | Read from the image automatically |
| Numbers-at-risk table | Typed in | Read automatically |
| Multi-panel figures | One curve at a time | Every panel at once |
| Checks against printed numbers | Your own | Printed HRs and medians, whenever the figure has them |
| Time per figure | About 20–60 minutes (our estimate) | About a minute |
| Cost | Free, open source | 3 free uploads a day, no sign-up. API $15 a figure, first 3 a month free, card required |
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 a record of the checks for a dossier. You can also use both, with one as a check on the other.
Accuracy
Both rest on the Guyot method. In a published validation of the manual route, the mean absolute difference from printed hazard ratios was 2.85% with IPDfromKM (Kim et al. 2025). On 211 printed hazard ratios from 96 papers, TrialCurve's was 2.9%, and 97% came within 10%: our own benchmark, not peer reviewed. Different figures, no head-to-head.
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 (panel, endpoint, population, arm, time, event), ready for survival, flexsurv or other R packages.
Whole review to do? $49 a figure, checked by a person.
See the validation pack