Skip to content

Search Broadly Epi

Epi Explained

What does an SIR model actually calculate, and when should you trust its output?

Understanding SIR models

An SIR model tracks how a population moves through susceptible, infectious, and recovered states. Two parameters, the effective contact rate and the recovery rate, determine whether an outbreak grows or fades. Work through the equations step by step, see how to calculate R0, and understand where the homogeneous-mixing assumptions break down.

By Cody Micah Carmichael MPH, CPH March 27, 2024 Updated October 11, 2026 9 minute read

The short answer

Definition

An SIR model sorts a population into susceptible, infectious, and recovered compartments and uses two rates to predict how many people are in each compartment at each point in time.

Start here

What to remember

  • An SIR model divides a population into susceptible, infectious, and recovered compartments and uses two rates (beta and gamma) to describe how people move between them.
  • R0 = beta / gamma; when R0 exceeds 1 the outbreak grows, when it falls below 1 the outbreak shrinks.
  • The basic model assumes homogeneous mixing, a constant population, and lasting immunity, all of which fail to varying degrees in real outbreaks.

Use it carefully

Current public-health application

Public-health agencies and academic researchers use SIR and related compartmental models to project outbreak trajectories, estimate the impact of interventions, and set vaccination targets. Results are scenario estimates, not predictions.

What the model can tell you — and what it cannot

The SIR model is a mathematical sketch of how an infection moves through a population. It answers questions about direction and magnitude: does the outbreak grow or shrink? How many people might eventually be infected? What happens to the peak if the recovery rate changes? These are useful questions. They are not the same as predicting what will happen in a real outbreak.

The model assumes every person mixes randomly with every other person, that the population is constant, and that recovery produces lasting immunity. Real populations have age structure, household clusters, schools, workplaces, travel patterns, seasonal behavior, and heterogeneous contact rates. None of that is in the basic SIR model. Keep that gap visible when reading results derived from it.

The three compartments

The model sorts the entire population into three groups at any given moment. Everyone is in exactly one group, and in the basic version movement is one-directional: susceptible to infectious, and infectious to recovered.

Compartment Symbol Who is in it Can they infect others?
SusceptibleSPeople who have not had the infection and can catch itNo
InfectiousIPeople currently infected and able to transmitYes
RecoveredRPeople who recovered and are assumed immuneNo
Every person in the model is in exactly one compartment at any moment. In the basic SIR model, movement flows one way: S to I to R.

The names are intuitive, but the recovered compartment requires a note. In the basic SIR model, ‘recovered’ also includes anyone who is no longer infectious for any reason, such as death or permanent removal from the population. The model does not distinguish between immune survivors and those who died.

Two parameters drive the outbreak

Beta (β) is the effective contact rate. Think of it as the average number of new infections one infectious person generates per day in a fully susceptible population. Beta combines two things: how often an infectious person contacts others, and the probability that any given contact transmits the infection. Public-health measures that reduce contact or transmission (masks, distancing, ventilation) aim to reduce beta.

Gamma (γ) is the recovery rate. It is the fraction of infectious people who recover per day. If the average infectious period is 10 days, gamma = 0.1 per day. The inverse of gamma (1 ÷ γ) gives you the average time someone spends in the infectious compartment.

The ratio of these two parameters, R₀ = β ÷ γ, is the basic reproduction number. R₀ answers a simple question: in a fully susceptible population, how many new cases does one infectious person produce before recovering? When R₀ is above 1, the outbreak grows. When it falls below 1, the outbreak shrinks. Getting an infectious disease’s R₀ below 1 is, in broad terms, what vaccination campaigns and control measures are trying to accomplish.

The three equations

The three SIR equations

Each equation describes how fast one compartment changes. A negative value means people are leaving; a positive value means people are arriving.

Susceptible compartment: how fast S shrinks

dSdt = − β SIN

Susceptible people leave S when they encounter an infectious person and catch the disease. The rate of those encounters depends on how many susceptible and infectious people are mixing, divided by the total population.

Infectious compartment: how fast I grows or shrinks

dIdt = β SIN − γ I

The first term is the same new infections that left S. The second term removes people who recover. When new infections exceed recoveries, I grows. When recoveries outpace new infections, I falls.

Recovered compartment: how fast R grows

dRdt = γ I

R grows at the same rate that I shrinks from recoveries. These three equations always balance: the total population N = S + I + R stays constant.

What every symbol means

S, I, R
The size of each compartment at a given moment. These are the variables that change over time.
N
Total population (constant in the basic SIR model: N = S + I + R at every point in time).
β (beta)
Effective contact rate. The average number of new infections one infectious person produces per unit time, given the current fraction of susceptible people. Higher beta means faster spread.
γ (gamma)
Recovery rate. The fraction of infectious people who recover per unit time. If the average infectious period is 10 days, then gamma = 0.1 per day.
d/dt
Rate of change per unit time. Each equation expresses how quickly a compartment grows or shrinks at a particular moment.

A numerical example: three steps by hand

The equations describe continuous change, but you can approximate several short steps arithmetically. The walk-through below uses clean numbers to show how the compartments shift day by day. Follow the table, then work through each step.

Day S (susceptible) I (infectious) R (recovered) New infections that day
0999.001.000.00—
1998.701.200.100.30
2998.341.440.220.36
3997.911.730.360.43
Approximate compartment sizes over four days using Euler’s method. Values are rounded to two decimal places; small rounding differences accumulate across steps. S + I + R = 1,000 at every row.

Three steps by hand

Work through the first few days

Choose a small population and concrete parameter values. A basic calculator is enough for each step. This method (adding the rate to the current value at each step) is called Euler’s method. It is an approximation; real simulations use smaller time steps or more accurate solvers. The arithmetic here is meant to show how the equations behave, not to produce exact predictions.

Starting conditions

Population of 1,000 people. One person is infectious at the start. Everyone else is susceptible.

N = 1,000    S = 999    I = 1    R = 0

Parameter values:

β = 0.3 per day    γ = 0.1 per day

Average infectious period: 1 ÷ 0.1 = 10 days. Basic reproduction number: R₀ = 0.3 ÷ 0.1 = 3. In a fully susceptible population, each case produces an average of 3 new cases before recovering.

Day 0 → Day 1

Plug the starting values into each equation to get the rates of change:

dS/dt = − 0.3 × (999 × 1) ÷ 1,000 ≈ −0.30

dI/dt = 0.3 × (999 × 1) ÷ 1,000 − 0.1 × 1 = 0.30 − 0.10 = +0.20

dR/dt = 0.1 × 1 = +0.10

Add each rate to its compartment:

S: 999 − 0.30 = 998.70    I: 1 + 0.20 = 1.20    R: 0 + 0.10 = 0.10

Check: 998.70 + 1.20 + 0.10 = 1,000 ✓

New infections outpaced recoveries (0.30 vs 0.10), so I grew. The outbreak is spreading.

Day 1 → Day 2

Use the Day 1 values as the new starting point:

dS/dt = − 0.3 × (998.70 × 1.20) ÷ 1,000 ≈ −0.36

dI/dt = 0.36 − 0.1 × 1.20 = 0.36 − 0.12 = +0.24

dR/dt = 0.1 × 1.20 = +0.12

New compartment sizes:

S: 998.70 − 0.36 = 998.34    I: 1.20 + 0.24 = 1.44    R: 0.10 + 0.12 = 0.22

Check: 998.34 + 1.44 + 0.22 = 1,000 ✓

New infections grew from 0.30 on day 0 to 0.36 on day 1. The growth is accelerating because there are now more infectious people contributing to spread.

Day 2 → Day 3

dS/dt ≈ −0.43    dI/dt ≈ +0.29    dR/dt ≈ +0.14

S: 997.91    I: 1.73    R: 0.36

The table above shows all four days together. Each day, the number of new infections is slightly larger than the day before. This exponential-looking growth continues until the susceptible population shrinks enough that the epidemic curve begins to flatten.

What happens when R₀ is less than 1?

Change β to 0.05 with γ still at 0.1. Now R₀ = 0.05 ÷ 0.1 = 0.5. Work through day 0: dI/dt = 0.05 × 0.999 − 0.1 × 1 = 0.050 − 0.100 = −0.050. The infectious compartment shrinks immediately. A single introduced case will not grow into a sustained outbreak because each infectious person produces fewer than one new case before recovering.

How the model has been used

Public-health agencies have used SIR and related compartmental models to project how quickly an infection might spread under different scenarios, to estimate how many people might need hospital care at the peak, and to set targets for vaccination coverage. During the COVID-19 pandemic, national and regional health authorities ran variants of these models continuously to guide decisions about distancing, school closures, and vaccine rollout timing.

In those applications, the model is almost always extended beyond the basic SIR framework. SEIR models add an exposed (E) compartment for people who are infected but not yet infectious. Age-structured models replace the single homogeneous population with several age groups that have different contact rates and different outcomes. Some versions allow for waning immunity, reinfection, or multiple strains.

Even in those applications, model output is reported as a range of scenarios, not a single prediction. Small changes to beta or to the initial conditions can shift the projected peak by days or weeks. Responsible modeling teams are explicit about this uncertainty and report the assumptions that drive each scenario rather than presenting one number as the forecast.

Where the model breaks down

The homogeneous-mixing assumption is the most consequential simplification. People do not contact a random sample of the population each day. They contact household members, coworkers, classmates, neighbors. Pathogens that spread within tightly connected clusters behave differently from what a homogeneous model predicts.

The model also treats the population as constant, which fails during long outbreaks where births, deaths, and migration matter. It assumes lasting immunity after recovery, which is not true for all pathogens. And it uses fixed values for beta and gamma, even though both change over the course of a real outbreak as behavior shifts, interventions are applied, or the pathogen evolves.

Extensions of the SIR framework address many of these limits. SEIR models add an exposed compartment for people who are infected but not yet infectious. SIS models allow recovery without immunity. Age-structured and network models replace random mixing with more realistic contact patterns. Each extension adds complexity; the basic SIR model remains the starting point because it captures the essential logic of threshold dynamics with the fewest moving parts.

Knowledge check

Return to the example above: N = 1,000, I₀ = 1, β = 0.3, γ = 0.1, and R₀ = 3. Now suppose beta doubles to 0.6 because a more transmissible variant arrives. Without running a full simulation, describe two things that change and one thing that stays the same.

Show the reasoning

What changes. First, R₀ doubles from 3 to 6. Each infectious person now produces an average of 6 new cases in a fully susceptible population, so the outbreak grows faster. Second, the herd immunity threshold rises. In the original scenario, the outbreak stops accelerating once roughly 1 − 1/3 ≈ 67% of the population has been infected or immunized. With R₀ = 6, that threshold rises to 1 − 1/6 ≈ 83%. More of the population is exposed before the epidemic curve turns down. What stays the same. Gamma does not change, so the average infectious period is still 10 days. The mathematics of the equations themselves are unchanged; only the rate at which susceptibles become infectious has doubled. Running the Day 0 step with the new beta confirms the faster growth: dI/dt = 0.6 × 0.999 − 0.1 × 1 = 0.599 − 0.10 = 0.499 per day, compared to 0.20 per day before.

Humanities Moment

Edward Burne-Jones

English painter · 1833–1898

Burne-Jones was a British artist associated with the Pre-Raphaelite movement. He collaborated with William Morris on stained glass and decorative work, and his paintings often combined close observation of individual faces with mythological or allegorical subjects. Female Head Study from an Italian Model is a preparatory sketch showing that kind of attention to a single person. The painting is the article’s featured image and was sourced from Artvee by Broadly Epi.

Why this work: the SIR model strips individuals away entirely. Every person becomes a number in a compartment, flowing from one state to the next according to two rates. That abstraction is the source of the model’s usefulness and its most significant limitation at the same time. A head study is a useful counterpoint: a reminder that the compartments contain real people with different contact patterns, immune histories, and vulnerabilities that the basic equations cannot see.

Sources and further reading

Build the concept package

Continue learning

  • Basic reproduction number
  • Herd immunity
  • Outbreak investigation
  • Types of outbreaks
  • SEIR models
Apply it with Data & Code