HERD IMMUNITY CALCULATOR

Herd immunity calculator

The threshold from R0, the coverage a vaccine needs, and a simple epidemic model.

%

An illustration of the arithmetic, not a forecast of any real outbreak.

What is the herd immunity threshold?

It is the share of a population that must be immune for each case to infect, on average, no more than one other person, so that an outbreak stops growing. The formula is 1 − 1/R0, where R0 is the basic reproduction number, the average number of people one case infects in a completely susceptible population. Fine, Eames and Heymann explain it with R0 = 4: each case infects four people when nobody is immune; if 75% of people are immune, three in four contacts are protected and each case leads to just one new case. For R0 = 3 the threshold is 67%, for R0 = 12 it is 91.7% and for R0 = 18 it is 94.4%.

How does vaccine effectiveness change the target?

If a vaccine protects only a share E of the people who get it, the share who must be vaccinated rises to Vc = (1 − 1/R0) ÷ E. With R0 = 5 the threshold is 80%; a vaccine that is 90% effective has to reach 88.9% of people. When E is lower than the threshold itself, even vaccinating everyone is not enough: with R0 = 15 (threshold 93.3%) a 90% effective vaccine would need 103.7% coverage, which is not possible. Fine and colleagues point out the same thing, and note that waning immunity raises the coverage needed or calls for boosters.

What is R0 for measles, flu and COVID-19?

The reference table below lists published estimates. Measles is often cited at 12 to 18, which gives a threshold of 92% to 94%, but a 2017 systematic review in The Lancet Infectious Diseases (Guerra and colleagues, 58 estimates from 18 studies) found that the estimates vary more than that range. Seasonal influenza has a median R of 1.28 in a systematic review of 47 estimates, a threshold of only 22%. No R0 is a constant of nature: it depends on how people mix, on climate, on crowding and on the variant.

How does the SIR model work?

The SIR model splits a population into susceptible (S), infected (I) and recovered or immune (R) shares. Infected people recover at a rate γ, one divided by the infectious period, and susceptible people are infected at a rate β × I; R0 = β ÷ γ. The calculator steps the equations forward in small increments and reports each day. In the example below, R0 = 2.5, a 7-day infectious period and 10 cases per 100,000 people give a peak of 23.4% infected at the same time on day 45, and 89.3% infected over the whole outbreak.

What is the final size equation?

The share of people who are never infected, S∞, satisfies ln(S∞ ÷ S0) = −R0 × (S0 + I0 − S∞), which has no closed-form solution but is easy to solve numerically. For R0 = 2 and a fully susceptible population about 80% are eventually infected, and for R0 = 3 about 94%, even though the epidemic burns out when the susceptible share has dropped only to 1/R0. The calculator solves it exactly and shows it next to the simulation; for the example with R0 = 2.5 the two agree at 89.27%, and the exact peak is 23.35%.

Why does the epidemic overshoot the threshold?

Because the infection does not stop the moment the immune share reaches the threshold. At that moment the number of cases is at its maximum, and each of them still infects others for a while. The epidemic keeps going until the susceptible share has fallen well below 1/R0, so more people are infected than the threshold alone suggests. This is the reason that a high final size at R0 = 3 does not contradict a threshold of two thirds.

Is this a forecast?

No. A model like this is an illustration of the arithmetic of spread, with every person identical, mixing at random, becoming infectious immediately and immune for life. Real epidemics are shaped by schools, households, travel, seasons, behavior, testing, treatment and vaccination campaigns that the model leaves out. Use it to understand why a threshold of 95% for measles is so demanding, not to predict what will happen in your town. For real decisions follow the CDC and your local health department.

How to use the two modes

In the threshold mode enter R0 and, if you want, the effectiveness of the vaccine; the table shows the same thresholds for other R0 values. In the simulator mode add the share of the population vaccinated, the infectious period and the number of cases at the start, and read the peak and the total. The simulator treats vaccination as an all-or-nothing shield: coverage times effectiveness is the share who start out immune, the rest start susceptible. In the example, 70% coverage with a 95% effective vaccine leaves 66% immune; the same R0 = 2.5 outbreak would then reach only 0.01% at its peak and 0.06% of people in total, against 23.4% and 89.3% with no one immune. With 60% or more immune at the start, the threshold for R0 = 2.5, the outbreak does not take off at all.

Common mistakes

Treating R0 as a fixed number for a disease. The basic reproduction number is a property of a pathogen in a particular population at a particular time, which is why the Guerra review found wide variation for measles. Mixing up R0 and the effective reproduction number, which falls as immunity grows or behavior changes. Assuming that 95% vaccinated means 95% immune: effectiveness and the share of people vaccinated multiply. And reading a threshold as a guarantee of safety for a neighborhood: unvaccinated people tend to cluster, so a state or country can be above the threshold while a school or a community is far below it and has an outbreak.

Limits of this method

The threshold formula assumes that people mix randomly and that vaccination is random, a vaccine that protects against infection and transmission, and immunity that does not fade. Fine, Eames and Heymann note that real populations are heterogeneous: with clustering, nonrandom vaccination and groups that contribute more to transmission, the threshold becomes harder to apply, although the form (1 − 1/R0) ÷ E remains the benchmark. Immunity can wane, vaccines can protect better against severe disease than against infection, and mutations change R0. The simulator is deterministic and has no births, deaths, seasonality, age structure or intervention; these are important for any real forecast.

Published R0 estimates

InfectionR0 (or R)Threshold, 1 − 1/R0Source
Measles12–18 (often cited); estimates vary more92% to 94%Guerra et al., Lancet Infect Dis 2017;17(12):e420-e428
Smallpox3.5–671% to 83%Gani and Leach, Nature 2001;414
Seasonal influenzamedian 1.28 (IQR 1.19–1.37)16% to 27%Biggerstaff et al., BMC Infect Dis 2014;14:480
1918 influenza pandemicmedian 1.80 (IQR 1.47–2.27)32% to 56%Biggerstaff et al., BMC Infect Dis 2014;14:480
2009 influenza pandemicmedian 1.46 (IQR 1.30–1.70)23% to 41%Biggerstaff et al., BMC Infect Dis 2014;14:480
COVID-19, early 2020 studiespooled 3.32 (95% CI 2.81–3.82)64% to 74%Alimohamadi et al., J Prev Med Public Health 2020;53
COVID-19, Omicronaverage 8.2 across the studies reviewed88%Liu and Rocklöv, J Travel Med 2022;29

Thresholds are computed from the ends of each range. The influenza and 2009 pandemic values are reproduction numbers (R) measured in populations that already had some immunity, so 1 − 1/R understates the threshold for a fully susceptible population. Estimates depend on the population, the period and the method; the numbers are not the same as an infection's real transmissibility in your community. Polio is not listed because no published review estimate could be verified.

General information, not medical advice: for vaccination decisions talk with your doctor, pharmacist or local health department, and see the CDC's immunization schedules. Sources, read October 27, 2026: Fine P, Eames K, Heymann DL, “Herd immunity: a rough guide,” Clinical Infectious Diseases 2011;52(7):911-916; Guerra FM et al., “The basic reproduction number (R0) of measles: a systematic review,” Lancet Infectious Diseases 2017;17(12):e420-e428; Gani R, Leach S, “Transmission potential of smallpox in contemporary populations,” Nature 2001;414; Biggerstaff M et al., BMC Infectious Diseases 2014;14:480; Alimohamadi Y et al., J Prev Med Public Health 2020;53; Liu Y, Rocklöv J, J Travel Med 2022;29. Related: exponential growth calculator, probability calculator, percentage calculator, half-life calculator. How we check our calculators.