HomeArticlesSEIR Epidemic Model

SEIR Epidemic Model: Incubation, R0 and Herd Immunity

Why adding one Exposed compartment to SIR changes how fast an epidemic curve rises, and how lockdowns, masks and vaccines all reduce to the same three parameters.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

Why a fourth compartment matters

The classic SIR model splits a population into Susceptible, Infected and Recovered. That is enough for a disease where you are contagious the moment you catch it, but most real pathogens — including SARS-CoV-2, influenza and measles — have an incubation period: you are infected but not yet infectious. SEIR adds that missing compartment, Exposed, and the extra delay changes the shape of an epidemic curve in ways SIR cannot capture.

dS/dt = -beta * S * I / N
dE/dt =  beta * S * I / N  -  sigma * E
dI/dt =  sigma * E         -  gamma * I
dR/dt =  gamma * I

Here beta is the transmission rate (contacts per unit time times the probability of transmission per contact), sigma is the rate at which exposed people become infectious (1/sigma is the mean incubation period), and gamma is the recovery rate (1/gamma is the mean infectious period). N is the fixed total population, so the four compartments always sum to N.

live demo · SEIR curves rising and falling● LIVE

R0 and the epidemic threshold

The basic reproduction number R0 = beta / gamma is the average number of new infections one infectious person produces in a fully susceptible population. If R0 > 1 the exposed and infected compartments grow exponentially at first; if R0 < 1 the disease dies out even without intervention. The incubation compartment does not change R0 itself, but it delays the peak — E acts as a buffer that smooths and postpones the surge in I, which is why SEIR outbreaks often look slower to take off than SIR predicts for the same R0.

Herd immunity and the susceptible threshold

An epidemic keeps growing only while enough of the population is still susceptible to sustain R0 > 1 effectively. Once the susceptible fraction S/N falls below 1/R0, each new case infects on average fewer than one other person and incidence starts to fall — this is the herd immunity threshold. For a disease with R0 = 3 that threshold is 1 minus 1/3, about 67% of the population immune, whether from infection or vaccination. Masks and distancing reduce the effective beta, which lowers R0 and lowers the herd immunity threshold along with it.

Interventions as parameter changes

Lockdowns, masks and vaccination do not change the SEIR equations — they change the parameters the equations run on. A lockdown lowers beta by cutting contact rates. A vaccine rollout moves people directly from S to R without passing through infection, which shrinks the pool available to sustain transmission. Because these interventions act on stocks that already exist in the model, you can simulate a policy by simply changing a coefficient mid-run and re-integrating the same four differential equations forward.

Reading the ICU load off the curve

The Infected compartment is not directly the hospital burden — it is scaled by a case-severity fraction and a lag, and that scaled curve is what determines whether a health system is overwhelmed. Flattening the curve does not reduce the total eventual infections much on its own; its real effect is spreading the same area under the curve over more time so the peak height of I, and hence peak ICU demand, stays under capacity.

Frequently asked questions

What is the difference between SIR and SEIR?

SIR assumes people become infectious the instant they are infected. SEIR inserts an Exposed compartment for the incubation period, so newly infected people spend time non-infectious before entering the Infected compartment — this delays and smooths the epidemic peak compared to SIR with the same R0.

What does R0 less than 1 actually mean?

It means each infectious person, on average, infects fewer than one other person before recovering. Under that condition the Exposed and Infected compartments shrink over time even without any intervention, and the outbreak dies out on its own.

Why doesn't a vaccine campaign show up as a new equation?

Because vaccination is modeled as a flow, not a new mechanism — it moves people from Susceptible directly to Recovered (immune) without an infection. That is a parameter and initial-condition change layered on the same four SEIR equations, not a different model.

Try it live

Everything above runs in your browser — open SEIR Epidemic and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open SEIR Epidemic simulation

What did you find?

Add reproduction steps (optional)