Survival & Reliability calculator

Kaplan-Meier survival analysis calculator

Compute non-parametric Kaplan-Meier survival curves, median survival time, Greenwood standard error, and cumulative failure hazard probabilities.

Run this test live in StatLab npm i @statlab/core

When to use it

Use when analyzing time-to-event data subject to right-censoring.

Required Inputs

  • Event / Duration times
  • Censoring status (1 = event occurred, 0 = right-censored)

Mathematical Formula

Ŝ(t) = Π_{t_i ≤ t} (1 - d_i / n_i), Var(Ŝ(t)) = Ŝ(t)² Σ [ d_i / (n_i(n_i - d_i)) ]

Reporting Cautions

  • Assumes censoring is independent of survival probability.
  • Censored items must be recorded accurately.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
from lifelines import KaplanMeierFitter
kmf = KaplanMeierFitter()
kmf.fit(durations, event_observed=censor_status)
print(kmf.median_survival_time_)
R Language
library(survival)
fit <- survfit(Surv(time, status) ~ 1)
summary(fit)
TypeScript (@statlab/core)
import { kaplanMeier } from '@statlab/core';
const res = kaplanMeier(durations, status);

Developer Use Cases & Production Integrations

  • Analyzing service container uptime, Mean Time Between Failures (MTBF), and crash survival rates.
  • Measuring customer subscription retention curves in VoxelPulse telemetry.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.