# SIR Epidemic Model Calculator

URL: https://speedycalculator.com/calculators/health/viral-infection-sir/
Last updated: 2026-10-30

> The SIR epidemic calculator simulates how an infection spreads through a population with the classic susceptible–infected–recovered model, from population size, initial cases, R₀ and infectious period, and gives the peak, its timing and the final share infected.

## Inputs

- Population
- Initially infected
- Basic reproduction number (R₀)
- Infectious period (days)
- Days to simulate
- Share immune at the start (%)

## Results

- Peak number infected at once
- Day of the peak
- Total infected by the end
- Share of the population infected
- Herd immunity threshold
- Effective R at the start
- Still infected at the end

## Formula

```
dS/dt = −β S I ÷ N · dI/dt = β S I ÷ N − γ I · dR/dt = γ I
β = R₀ × γ, γ = 1 ÷ infectious period
Herd immunity threshold = 1 − 1 ÷ R₀
```

## Explanation

The SIR model, introduced by Kermack and McKendrick in 1927, captures the basic shape of an epidemic: exponential growth, a peak when the susceptible share falls below 1/R₀, and decline. Real epidemics are shaped by behaviour, interventions and population structure. Everything is calculated in your browser, so nothing you type is sent to our server.

### How to use the SIR Epidemic Model Calculator

- **Population**
- **Initially infected**
- **Basic reproduction number (R₀)**
- **Infectious period**
- **Days to simulate**
- **Share immune at the start**

Everything runs in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Enter the population, starting infections, R₀, infectious period, simulated days and any share vaccinated at the start.

### Tips

- Use counts and person-time from the same population and period.
- Report confidence intervals with rates and ratios.
- Check whether figures are crude or age-adjusted before comparing.
- Larger samples give more stable estimates.

### Common mistakes to avoid

- Confusing incidence (new cases) with prevalence (all cases).
- Comparing rates per 1,000 with rates per 100,000.
- Reading a relative risk without the baseline risk.

*Health note: this calculator is for education and screening only and is not a diagnosis or treatment advice. Discuss your results with a qualified clinician.*

## Worked example

Inputs — Population: 100,000; Initially infected: 10; Basic reproduction number (R₀): 2.5; Infectious period: 7 days; Days to simulate: 365; Share immune at the start: 0 %.

Results — **Peak number infected at once = 23,405**; Day of the peak = 45; Total infected by the end = 89,311; Share of the population infected = 89.3 %; Herd immunity threshold = 60 %; Effective R at the start = 2.5.

## Key terms

- **SIR**: Susceptible–Infected–Recovered.

## FAQ

**What does the SIR model assume?**
A well-mixed population, lifelong immunity after recovery and constant transmission.

**Why does the epidemic peak?**
When the susceptible share falls below 1/R₀, each case infects fewer than one person.

**Why do more people get infected than the herd immunity threshold?**
Momentum: cases already infected keep spreading after the threshold is passed.


## Sources

- [Kermack WO, McKendrick AG. A contribution to the mathematical theory of epidemics. Proc R Soc Lond A, 1927](https://royalsocietypublishing.org/doi/10.1098/rspa.1927.0118)
