How to Enter Data in the Kaplan-Meier Calculator
The Kaplan-Meier survival analysis calculator supports three ways to enter your data. This guide explains each option using a practical example with two groups of cats being monitored for virus clearance. The event of interest in Kaplan-Meier analysis is the moment something happens to a subject — in this example, a cat testing virus-negative. A censored event means the cat left the study before becoming negative, or was still positive when the study ended.
The Example Scenario
You are tracking cats in two groups (A and B) to see how quickly they clear a virus. The event is a cat testing virus-negative. The time unit is days.
- Day 1: All cats are positive — no events yet.
- Day 2: 2 cats from Group A test negative; 1 cat from Group B tests negative.
- Day 3: No change in either group.
- Day 4: 1 cat from Group A ran away — you can no longer track its status (censored).
- Day 5: 1 cat from Group A tests negative; no change in Group B.
- Day 6: 1 cat from Group A tests negative; 2 cats from Group B test negative.
- Day 6 (end of study): 5 remaining positive cats in Group A and 7 remaining positive cats in Group B are censored at the study’s end.
Option 1 Enter Aggregated Data
Use this option when you want to enter a summary row per day per group. Instead of one row per cat, you enter the total number of events and censored observations for each time point. This is the most compact format.
The table has four columns: Time, Events, Censors, and Group. You can rename Time to your time unit (e.g., Day, Month, Week) and Events to a descriptive label (e.g., Negative).
There is no row for Day 1 or Day 3, because no events or censored observations occurred on those days.
| Day | Events (Negative) | Censors | Group |
|---|---|---|---|
| 2 | 2 | 0 | A |
| 4 | 0 | 1 | A |
| 5 | 1 | 0 | A |
| 6 | 1 | 5 | A |
| 2 | 1 | 0 | B |
| 6 | 2 | 7 | B |
Enter all rows for both groups one after the other in the same columns. The calculator uses the Group column to separate them automatically.
Option 2 Enter Raw Data Directly
Use this option when you have one row per cat. Enter 1 in the Event/Censored column if the cat had the event (tested negative), or 0 if it was censored.
The table has three columns: Time, Event/Censored, and Group.
| Time (Day) | Event/Censored | Group |
|---|---|---|
| 2 | 1 | A |
| 2 | 1 | A |
| 4 | 0 | A |
| 5 | 1 | A |
| 6 | 1 | A |
| 6 | 0 | A |
| 6 | 0 | A |
| 6 | 0 | A |
| 6 | 0 | A |
| 6 | 0 | A |
| 2 | 1 | B |
| 6 | 1 | B |
| 6 | 1 | B |
| 6 | 0 | B |
| 6 | 0 | B |
| 6 | 0 | B |
| 6 | 0 | B |
| 6 | 0 | B |
| 6 | 0 | B |
| 6 | 0 | B |
Group B breakdown: 1 event on Day 2. 2 events on Day 6. The 7 remaining positive cats on Day 6 are censored → 7 rows with Event/Censored = 0.
Enter both groups one after the other in the same input columns. The Group column tells the calculator which rows belong to which group.
Option 3 Enter Raw Data from Excel
If your data is already in a spreadsheet (Excel, Google Sheets, or similar), you can copy and paste it directly into the calculator. The format is identical to Option 2 — one row per subject — but instead of typing each value, you copy a block of three consecutive columns including the header row.
Your spreadsheet should look like this:
| A | B | C | |
|---|---|---|---|
| 0 | Day | Event/Censored | Group |
| 1 | 2 | 1 | A |
| 2 | 2 | 1 | A |
| 3 | 4 | 0 | A |
| 4 | 5 | 1 | A |
| 5 | 6 | 1 | A |
| 6 | 6 | 0 | A |
| 7 | 6 | 0 | A |
| 8 | 6 | 0 | A |
| 9 | 6 | 0 | A |
| 10 | 6 | 0 | A |
| 11 | 2 | 1 | B |
| 12 | 6 | 1 | B |
| 13 | 6 | 1 | B |
| 14 | 6 | 0 | B |
| 15 | 6 | 0 | B |
| 16 | 6 | 0 | B |
| 17 | 6 | 0 | B |
| 18 | 6 | 0 | B |
| 19 | 6 | 0 | B |
| 20 | 6 | 0 | B |
Steps to paste from Excel:
- In your spreadsheet, click the top-left header cell of your data (the cell containing “Day”).
- Press
Ctrl + Shift + Endto select all the way to the last row of data. - Press
Ctrl + Cto copy. - Select Enter raw data from excel in the calculator, then click inside the text area and press
Ctrl + Vto paste.
Tips & Notes
- You can use more than two groups. Just add rows with different values in the Group column.
- You can rename the Time column header to match your time unit: Day, Month, Week, Hour, etc.
- If you enter only one group, the log-rank test will not run (it requires at least two groups).
- Every subject must have either an event or a censored observation by the end of the study.
- Rows with no events and no censored observations on a given day do not need to be entered (e.g., Day 1 and Day 3 in this example).
- To download a plot as a PNG image, press the camera icon on the Kaplan-Meier chart.