Life

How many people need to be immune?

For measles, health agencies such as Europe’s ECDC aim for at least 95% of people to have two doses of vaccine. For some other infections far less would do. Where do these numbers come from, and what actually happens once you reach one?

A common picture of herd immunity is a finish line: once enough people are immune, the disease stops, and until then vaccination doesn’t do much. Both halves of that picture are wrong. There is a real threshold, and it comes from one simple idea. But an epidemic that is left alone runs straight past it, and vaccination protects people long before the threshold is reached.

One case makes how many?

Picture one person with an infection, walking into a town where nobody has ever had it. While they are infectious they pass it to some number of people. The average of that number, in a population where everyone can catch it, is called the basic reproduction number, written R0 (“R-nought”). Seasonal flu has an R0 of about 1.3. Measles, one of the most contagious diseases known, is usually quoted at 12 to 18.

Now suppose some people are already immune, through vaccination or an earlier infection. The infectious person meets just as many people, but only the susceptible ones — those who can still catch it — become new cases. The average number of new cases per case is now the effective reproduction number:

Reff = R0 × (share of people still susceptible)

If Reff is above 1, each generation of cases is bigger than the last, and the outbreak grows. If it is below 1, each generation is smaller, and the outbreak dies out.

3.0
30%
Effective R
2.10
Threshold for this R0
67%
Cases in this chain
–
Chance one case starts a large outbreak
82%

Figure 1.Six generations of infection from one case. Each case meets a random number of people averaging R0 (a Poisson distribution); each person met is immune with the chance you set. The random numbers are seeded, so the same settings give the same tree until you press New outbreak. The “chance of a large outbreak” is calculated exactly for this model, not by simulation.

Two things stand out. First, even well above 1, many chains fizzle by luck: with Reff = 2, about one chain in five dies out by chance. That is why a single imported case sometimes leads nowhere. Second, below 1 no chain survives for long, however lucky. A chain can still infect a handful of people before it ends, so small outbreaks still happen, but they can’t take hold and grow.

The threshold

The tipping point is where Reff = 1. Setting R0 × (susceptible share) = 1 says the susceptible share must be at most 1/R0. So the share that must be immune, the herd immunity threshold, is:

threshold = 1 − 1/R0

For R0 = 2 that is 1 − ½ = 50%. For R0 = 4 it is 75%. For measles at R0 = 15 it is 1 − 1/15 ≈ 93%.

Here is a way to feel why it climbs so steeply. Each case would meet enough people to infect R0 of them. To stop growth, on average only one of those R0 may be susceptible. With R0 = 2, one person in two may be susceptible; with R0 = 15, only one in fifteen. Going from R0 = 2 to 15 only moves the threshold from 50% to 93%, but it shrinks the share allowed to remain susceptible from 50% to under 7% — more than seven times smaller.

An epidemic, day by day

The chains show single generations. To see a whole epidemic unfold we need a model of a whole population. The classic one is the SIR model, which sorts everyone into three groups: Susceptible (can catch it), Infected (have it and can pass it on) and Recovered (had it and are now immune). Infections happen at a rate proportional to how many susceptible and infected people there are, as if everyone mixed at random. Here each person is infectious for 7 days on average, and the epidemic starts with 1 person in 10,000 infected. A share of people can be vaccinated beforehand; in this model they are simply immune.

3.0
0%
Effective R at the start
3.00
Peak: infected at once
30.0%
Peak on
day 35
Susceptible at the peak
33.3%
1/R0
33.3%
Ever infected
94.0%
Figure 2.The SIR model, as shares of the whole population. Shaded band at the top: people vaccinated before the outbreak. The equations are solved step by step (fourth-order Runge–Kutta, 0.05-day steps).

The peak falls where it does for the reason in Figure 1. The number of people ill at once grows as long as each case is replaced by more than one new case, that is, while the susceptible share is above 1/R0. The moment it drops below, each case is replaced by fewer than one, and the number ill starts to fall. The top of the curve is the herd immunity threshold being crossed.

Now look at the vaccination results. With R0 = 3 the threshold is 67%. Vaccinating 50% is below it, so an epidemic still happens — but it is slower and smaller. The peak drops from 30% of people ill at once to about 3%, and it arrives around day 103 instead of day 35. Of the unvaccinated half, 58% catch it instead of 94%. People who never got the vaccine are protected by the people who did. That indirect protection is what “herd immunity” most usefully means, and it starts with the first vaccinated person, not at the threshold.

Why epidemics overshoot

In Figure 2, with no vaccination and R0 = 3, the peak comes when 67% of people are immune — but by the end, 94% have been infected. When the susceptible share drops through 1/R0, a large number of people are infected at that very moment. Each of them still passes it on to nearly one more person, and those to nearly one more. The epidemic declines, but it keeps infecting people all the way down.

How many people are infected in the end, if nothing is done? The SIR model has a neat answer. The final share infected, z, satisfies the final-size equation:

z = 1 − e−R0·z

In words: the share who escape, 1 − z, equals e−R0z, the chance of dodging every one of the infections that the whole epidemic sent your way. It has no neat solution, but a computer can solve it in a moment. The difference between this final share and the threshold is the overshoot: people infected after the epidemic had already passed its peak.

R0
2.00
Threshold 1 − 1/R0
50.0%
Ever infected, no vaccine
79.7%
Overshoot
29.7%
Figure 3.The share of people ever infected in an unchecked SIR epidemic (red, from the final-size equation) and the herd immunity threshold (green, dashed), for R0 from 1 to 6. The shaded gap is the overshoot. Drag, or use the arrow keys (Shift for bigger steps).

For R0 = 2, the threshold is 50%, but an unchecked epidemic infects about 80%. The overshoot is largest, 29.8% of the whole population, at R0 ≈ 2.15; that maximum has been proved for this model. So “let it spread until we reach herd immunity” doesn’t stop at the threshold: it infects enough people to reach the threshold, and then up to 30% of the whole population on top. Vaccination gets to the threshold without the overshoot.

Real vaccines, real diseases

Two more facts turn the threshold into a vaccination target. Vaccines are not 100% effective: two doses of the measles vaccine protect about 97% of people, one dose about 93%. If a share E of those vaccinated become immune, vaccinating a share c makes c × E immune. So the coverage needed is:

coverage needed = (1 − 1/R0) ÷ E

And R0 is not a constant of nature. It depends on how people live, meet and gather, so studies in different places and years give different values. The bars under the chart below show ranges, not single numbers.

15.0
97%
Threshold (immune)
93.3%
Coverage needed (vaccinated)
96.2%
Highest R0 this vaccine can stop
33.3
Figure 4.The threshold (green, dashed) and the vaccine coverage needed to reach it (brass), against R0 on a logarithmic scale. Where the coverage needed passes 100% (shaded), vaccination alone can’t reach the threshold. Bars: seasonal flu and 1918 pandemic flu (middle half of published estimates, Biggerstaff et al. 2014); measles, the often-cited 12–18 (published estimates spread wider, Guerra et al. 2017).

At R0 = 15 and 97% effectiveness, 96% of people need to be vaccinated. With a 93% effective vaccine (one dose) the answer is just over 100%: impossible, however hard you try. One dose falls short whenever R0 is above about 14.3, because that is where 1 − 1/R0 passes 0.93. Below that it is possible, but only just: at R0 = 12 one dose would need almost 99% of people vaccinated. That is one reason measles vaccination uses two doses and aims for about 95% coverage, and why measles returns quickly when coverage slips by just a few percent. For an infection with R0 near 1.3, the threshold is only about 23%, which is small in the model — but flu viruses change from year to year and immunity to them fades, which the model leaves out.

So the rule to take away: the share that must be immune is 1 − 1/R0, because the share left susceptible can be at most 1/R0. Getting there by infection overshoots it; getting there by vaccination doesn’t; and every step towards it, even short of it, means fewer people ill.

What this model leaves out

  • Random mixing. The model assumes everyone is equally likely to meet everyone. Real people live in households, schools and networks, and mix mostly with people like themselves and of similar age. Pockets of low vaccination can sustain outbreaks even when the national average is above the threshold, and very sociable people tend to be infected first, which can lower the threshold reached by infection.
  • Equal spreaders. Figure 1 gives every case the same average. For many diseases a few “superspreaders” cause most infections, so more chains fizzle and a few explode.
  • Lasting immunity. Immunity here is permanent. In reality it can wane, and viruses like flu change, so people become susceptible again.
  • Births and deaths. A real population gains new susceptible babies all the time, which is why diseases like measles return in waves.
  • Behaviour. People change how they act when an outbreak is in the news; the model’s R0 never changes during an epidemic.
  • Imperfect vaccines. Figure 4 treats a vaccine as all-or-nothing: fully protecting a share E of people and doing nothing for the rest. Real vaccines can also partly protect, or reduce severity more than infection.
  • This page explains a model. It is not medical advice; for that, ask a doctor or your public health service.

Sources

  1. P. Fine, K. Eames and D. L. Heymann, “‘Herd immunity’: a rough guide”, Clinical Infectious Diseases 52(7):911–916 (2011). doi:10.1093/cid/cir007 The threshold 1 − 1/R0, the different meanings of “herd immunity”, and indirect protection of unvaccinated people.
  2. T. Britton, F. Ball and P. Trapman, “A mathematical model reveals the influence of population heterogeneity on herd immunity to SARS-CoV-2”, Science 369:846–849 (2020). doi:10.1126/science.abc6810 Critical coverage for an imperfect vaccine, (1 − 1/R0)/E; and that in a mixed, uneven population the immunity level reached by infection can be lower than 1 − 1/R0, because the most active people are infected first.
  3. M. Nguyen, A. Freedman, S. Ozbay and S. Levin, “Fundamental bound on epidemic overshoot in the SIR model”, Journal of the Royal Society Interface 20:20230322 (2023). arXiv:2303.01650 Overshoot defined as 1/R0 minus the final susceptible share; the maximum overshoot of 0.2984 at R0 = 2.151, which this page’s model reproduces.
  4. F. M. Guerra et al., “The basic reproduction number (R0) of measles: a systematic review”, Lancet Infectious Diseases 17(12):e420–e428 (2017). PubMed 28757186 58 estimates of measles R0 from 18 studies; they vary much more widely than the often-cited 12–18, and depend on setting.
  5. M. Biggerstaff et al., “Estimates of the reproduction number for seasonal, pandemic, and zoonotic influenza: a systematic review of the literature”, BMC Infectious Diseases 14:480 (2014). doi:10.1186/1471-2334-14-480 Seasonal flu: median R 1.28 (interquartile range 1.19–1.37); 1918 pandemic: median 1.80 (1.47–2.27).
  6. US Centers for Disease Control and Prevention, “About Measles”. cdc.gov Two doses of MMR vaccine are about 97% effective against measles, one dose about 93%.
  7. European Centre for Disease Prevention and Control, “Disease information on measles” and “Community spread drives ongoing measles transmission in Europe” (9 February 2026). ecdc.europa.eu The target: at least 95% of the eligible population vaccinated with two doses, aiming at a “desired 95% immunity level”; one dose makes about 95% of children immune.

Colophon

Date
30 September 2026
Revised
1 October 2026: the 95% measles target is now cited to ECDC, and the one-dose sentence says it holds only for R0 above about 14.3.

The model (model.js) was checked against the final-size equation, the peak condition S = 1/R0 and the published maximum overshoot.