About the Infectious Disease and Epidemic Calculator (SIR Model)
The SIR model, published by Kermack and McKendrick in 1927, is the foundational compartmental model of mathematical epidemiology. It divides a closed population into three groups - Susceptible (S), Infected (I), and Recovered (R) - and describes how people move between them during an outbreak using three coupled differential equations:
- dS/dt = -βSI/N - susceptible people become infected at a rate proportional to contact with infected people.
- dI/dt = βSI/N - γI - infected people accumulate new cases and lose cases to recovery.
- dR/dt = γI - infected people recover (or are removed) at a constant rate.
Here N is the total population, β is the transmission rate, and γ = 1/D is the recovery rate, where D is the average infectious period in days. This calculator takes your population, initial infected count, R0, infectious period, and any initial immunity, derives β and γ, and integrates the three equations numerically (fourth-order Runge-Kutta) to trace the epidemic from day zero until it fades out.
The basic reproduction number, R0
R0 = β/γ is the average number of secondary infections one case produces in a fully susceptible population. It is the single most important input: R0 above 1 means each generation of cases outnumbers the last and the outbreak grows; R0 at or below 1 means the outbreak shrinks from the start, even with zero interventions.
What the calculator reports
From the simulated curves, the calculator reads off the peak number of simultaneous infections and the day it occurs (which happens exactly when the susceptible share of the population falls to 1/R0), the total number of people ever infected once the outbreak has fully run its course (the final epidemic size), and the herd immunity threshold, 1 - 1/R0 - the share of the population that must already be immune for the outbreak to fail to sustain itself.
Assumptions and limits
The classic SIR model assumes a closed, well-mixed population with no births, deaths, or migration during the outbreak; permanent immunity after recovery; and constant transmission and recovery rates (no behavior change, seasonality, or interventions partway through). It also treats everyone as equally likely to contact everyone else, ignoring age structure and network effects. These simplifications make the model transparent and fast to reason about, but real outbreaks - shaped by control measures, heterogeneous mixing, and changing behavior - can diverge from it substantially.
When to consult a professional
This tool performs the standard SIR arithmetic for education, planning, and scenario exploration. It is not surveillance data and does not replace guidance from epidemiologists or public health authorities during an actual outbreak, who combine real case data, contact tracing, and intervention effects that this simplified model does not capture.