Epidemic Calculator – SIR Model for Infectious Disease Spread
The Infectious Disease and Epidemic Calculator uses the SIR (Susceptible-Infected-Recovered) epidemiological model to simulate how an infectious disease spreads through a population. Enter population size, initial infected count, transmission rate, recovery rate, and simulation duration — and get peak infection count, days to peak, total infected over the simulation, recovered total, and the basic reproduction number R₀. Useful for public health students, epidemiology education, and science communication. Formula based on the standard SIR compartmental model in mathematical epidemiology.
Formula
This calculator transforms the provided inputs into the requested outputs using standard domain equations.
Quick Tip
Use this output as guidance and confirm clinical decisions with a qualified professional.
Curious how a disease spreads through a population — and what happens if transmission slows? Enter the population and disease parameters and this tool simulates the full epidemic curve using the standard SIR model.
Featured Answer
Q: What is the SIR model and how does it simulate an epidemic?
A: The SIR model divides a population into three groups: Susceptible (S), Infected (I), and Recovered (R). The model uses transmission rate (β) and recovery rate (γ) to calculate how these groups change daily. The basic reproduction number R₀ = β/γ determines outbreak potential — if R₀ > 1, an epidemic grows; if R₀ < 1, it fades. Use this calculator to simulate any epidemic scenario by adjusting these parameters.
How to Use SIR Epidemic Calculator
- Enter the population size — the total number of people in the simulated community.
- Enter the initial infected — the number of people infected at the start of the simulation.
- Enter the transmission rate (β) — the rate at which infected individuals spread the disease per day.
- Enter the recovery rate (γ) — the fraction of infected individuals who recover per day.
- Enter the days to simulate — the time period for the epidemic projection.
What is the SIR Epidemiological Model?
The SIR model is the foundational mathematical model for simulating how infectious diseases spread through populations. It divides the population into three compartments:
- S (Susceptible): individuals not yet infected and capable of being infected.
- I (Infected): currently infected and capable of transmitting the disease.
- R (Recovered): individuals who have recovered and are assumed immune.
The model's equations:
- dS/dt = −β × S × I / N
- dI/dt = β × S × I / N − γ × I
- dR/dt = γ × I
Where β = transmission rate, γ = recovery rate, N = total population.
The basic reproduction number R₀ = β/γ is the average number of new cases one infected individual generates in a fully susceptible population. R₀ > 1 means the epidemic grows; R₀ < 1 means it declines.
Famous R₀ values: COVID-19 original strain ~2.5–3.0; measles ~12–18; seasonal flu ~1.2–1.4.
Example: Population 100,000, initial infected 10, β = 0.3, γ = 0.1, 180 days.
| Field | Value |
|---|---|
| R₀ | 3.0 |
| Peak Infected | ~22,000 |
| Days to Peak | ~75 days |
| Total Infected | ~94,000 |
| Recovered Total | ~93,990 |
The SIR Model: Understanding Epidemic Curves Through Mathematics
Why This Epidemic Calculator Matters
During the COVID-19 pandemic, terms like R₀, herd immunity, and epidemic curves entered everyday conversation. But for most people, the underlying mathematics remained opaque. The SIR model is the foundation of all those concepts — simple enough to understand, powerful enough to guide real public health decisions.
This calculator makes the SIR model interactive. You can see how changing the transmission rate (simulating masks or distancing), the recovery rate (simulating treatment), or the initial infected count changes the entire epidemic trajectory. The results are not predictions — they are educational simulations that build intuition about how infectious diseases behave.
For students of epidemiology, public health, biology, or mathematics, this tool makes the theory concrete.
SIR Model — Step-by-Step Simulation Logic
The SIR model runs as a daily differential equation simulation:
- Day 0: Initialise S = N − I₀ − R₀, I = I₀, R = 0.
- Each day: Calculate new infections: β × S × I / N; calculate new recoveries: γ × I.
- Update compartments: S decreases by new infections; I increases by new infections, decreases by recoveries; R increases by recoveries.
- Track peak: Record the day and value when I is at its highest.
- Continue until I drops below a threshold or the simulation period ends.
- Calculate R₀: β ÷ γ.
Epidemic Scenarios — Comparing R₀ Values
| Scenario | β | γ | R₀ | Peak % of Population | Days to Peak |
|---|---|---|---|---|---|
| Mild flu-like | 0.15 | 0.1 | 1.5 | ~11% | ~60 days |
| COVID-like (original) | 0.25 | 0.1 | 2.5 | ~30% | ~80 days |
| COVID with distancing (30% reduction) | 0.175 | 0.1 | 1.75 | ~15% | ~100 days |
| Measles-like | 0.9 | 0.05 | 18.0 | ~95% | ~30 days |
Reducing β by 30% (representing social distancing or masking) in a COVID-like scenario cuts peak infections roughly in half and extends the timeline — the famous "flatten the curve" effect.
Common Misconceptions About the SIR Model
- The SIR model predicts the future — it does not. It is a deterministic mathematical simulation based on assumed parameters. Real epidemics are stochastic, with heterogeneous populations, changing behaviour, and interventions.
- R₀ is fixed — R₀ can change as behaviour changes, immunity accumulates, or new variants emerge. The effective reproduction number Rt tracks this over time; R₀ is only the initial value in a fully susceptible population.
- Recovered means immune permanently — in the basic SIR model, yes. In reality, immunity can wane (SIRS model adds a return to susceptible). This calculator uses the basic SIR assumption of permanent immunity.
- Total infected always approaches the whole population — not for low R₀ values. When R₀ is close to 1, a significant portion of the population remains susceptible at the end of the epidemic.
When to Use This Calculator
Use this tool for educational exploration of epidemic dynamics — to understand how disease parameters affect outbreak size and timing. Ideal for students studying epidemiology, public health, or mathematical biology, and for science communicators explaining epidemic concepts.
For COVID-19 specific modelling, official public health models (SEIR, agent-based) are more appropriate. For human health metrics, the BMR Calculator and TDEE Calculator cover individual energy requirements.
Important Assumptions and Limitations
This calculator implements the basic deterministic SIR model assuming homogeneous mixing, constant parameters, no births or deaths, no vaccination, and permanent immunity after recovery. Real epidemics require more complex models (SEIR, age-structured, network-based). Calculation reviewed against standard SIR compartmental model references in mathematical epidemiology.
This is an educational simulation tool. It does not replace official public health modelling for disease management decisions.
Frequently Asked Questions
Find answers to common questions about Infectious Disease and Epidemic Calculator (SIR Model)
The SIR model is a mathematical framework for simulating infectious disease spread, dividing a population into three groups: Susceptible (not yet infected), Infected (currently infectious), and Recovered (immune). It uses transmission rate (β) and recovery rate (γ) to calculate how these groups change daily. The basic reproduction number R₀ = β/γ determines whether an outbreak grows or fades.
Set population size, initial infected count, transmission rate (β), recovery rate (γ), and simulation duration. The model calculates daily changes in S, I, and R using differential equations. Key outputs are R₀, peak infections, days to peak, and total infected. This calculator runs the simulation and displays results when you enter these five parameters.
The calculator accurately implements the standard deterministic SIR model for the parameters entered. Its accuracy as a reflection of a real epidemic depends entirely on how well the input parameters match the actual disease and population. Real epidemics involve heterogeneous mixing, changing behaviour, interventions, and stochasticity that the basic SIR model does not capture. It is most valuable as an educational tool.
R₀ (basic reproduction number) is the average number of new infections a single infected person causes in a fully susceptible population. R₀ = β ÷ γ. If R₀ > 1, each case generates more than one new case and the epidemic grows. If R₀ < 1, cases decrease and the outbreak fades. R₀ = 1 is the threshold between growth and decline.
Public health students and educators use SIR simulators to understand epidemic dynamics, the effect of interventions, and herd immunity thresholds. Science communicators use it to explain R₀ and epidemic curves intuitively. Researchers use it as a starting point before building more complex models. It is not appropriate for real-time outbreak forecasting, which requires data-driven, validated public health models.
Herd immunity is reached when enough of the population is immune (through infection or vaccination) to prevent sustained epidemic growth. In the SIR model, the herd immunity threshold is 1 − 1/R₀. For R₀ = 2.5 (COVID-like), the threshold is 60% — meaning the epidemic naturally declines when 60% of the population has recovered and is immune. Higher R₀ requires a higher threshold.
Reducing β (through social distancing, masks, or ventilation) lowers R₀, which flattens the epidemic curve — reducing peak infections and extending the time to peak. A 30% reduction in β reduces R₀ proportionally. If R₀ falls below 1, the epidemic declines without infecting the full susceptible population. This mathematical effect is the basis of the public health 'flatten the curve' strategy.
The SIR model assumes a homogeneously mixed population (everyone has equal contact with everyone), constant transmission and recovery rates, no deaths, no vaccination, no new susceptibles (births), and permanent immunity after recovery. Real diseases involve age-structured contact patterns, changing behaviour, waning immunity, and multiple virus variants. More complex models (SEIR, SEIRS, agent-based) are used for realistic epidemic forecasting.