Interactive Learning Tool

How Community Immunity Protects Us All

When enough people in a community are protected against a disease — through vaccination or prior infection — the disease struggles to spread and cannot reach those who are most vulnerable. This is called community immunity, sometimes called herd immunity. Explore it here through real-world scenarios.

What Is Community Immunity?

Community immunity protects everyone — including people who cannot get vaccinated — by limiting how easily a disease can spread through a population.

💉

Vaccinated & Protected

When you get vaccinated, your immune system learns to fight the disease without you getting sick. Most people who are vaccinated become immune — the vaccine teaches the body to recognize and fight the germ.

🛡️

A Wall Around the Vulnerable

Babies, elderly people, and those with weakened immune systems often cannot receive certain vaccines. When those around them are protected, the disease has nowhere to go and cannot reach these vulnerable individuals.

📉

The Threshold Matters

Every disease has a community immunity threshold — the minimum share of people who need to be immune before the disease stops spreading. Fall below that level and outbreaks become more likely.

🔢

The R₀ Number

R₀ (said "R-naught") is the average number of people one sick person infects in a fully susceptible population. A higher R₀ means a disease spreads more easily and requires a higher vaccination rate to achieve community immunity.

📊

Vaccine Effectiveness

No vaccine is 100% effective for every person. Vaccine effectiveness varies by disease, age, and individual biology. This means some vaccinated people may still get sick, though usually with milder illness.

⚠️

When Coverage Drops

If vaccination rates fall — due to exemptions, access barriers, or vaccine hesitancy — the community immunity threshold may no longer be met. Exemptions in U.S. schools have hit record highs, putting entire communities at risk.


Community Immunity Simulator

Choose a real-world scenario below, or adjust the sliders yourself to explore how vaccination rates and vaccine effectiveness shape the outcome of an outbreak.

Custom Scenario

Adjust the sliders below to explore any combination of parameters. Click Start Simulation to run it.

Simulation Controls
Population Size 500
How many people are in this community
% Vaccinated 95%
Share of people who received the vaccine
Vaccine Effectiveness 97%
How often the vaccine successfully protects a vaccinated person
R₀ (Spread Rate) 15
Average number of people one case infects in an unprotected population
Starting Infections 1
Number of sick people at the start
Days Before Infectious 8
Days from exposure until a person can spread the disease
Infectious Period (days) 8
How long a sick person can spread the disease

Community Immunity Meter

Based on your R₀ and vaccine settings, are you above or below the protection threshold?

Threshold
0%Effective Coverage100%
✓ Above threshold — community immunity likely
Threshold = 1 − 1/R₀ = 93.3%  |  Effective coverage = vaccinated% × effectiveness% = 92.2%
0
Currently Sick
0
Days Elapsed
0
Days Since Last Case
Outbreak Simulation
Immune
Vaccinated (not immune)
Unvaccinated
Infected

Simulation complete

Before & After Summary

Counts at the start and end of the simulation

GroupStartEnd
Vaccinated & Immune
Vaccinated, Not Immune
Unvaccinated
Total Infected
Recovered (gained immunity) 0

Attack Rates & Rate Ratio

The "attack rate" is the share of each group that got sick. A high rate ratio means being unvaccinated carried much more risk.

MeasureValue
Attack Rate — Vaccinated
Attack Rate — Unvaccinated
Rate Ratio (Unvax ÷ Vax)

Epidemic Curve

This chart shows how many new infections happened each simulated day. Epidemiologists call this an "epi curve" — the shape tells you a lot about how fast an outbreak moved.


Spread Rates (R₀) for Common Diseases

The R₀ number describes how contagious a disease is in a population with no immunity. Diseases with a higher R₀ require more of the community to be vaccinated before outbreaks are prevented.

Seasonal FluR₀ ≈ 1–2
EbolaR₀ ≈ 1.5–2.5
SARS (2003)R₀ ≈ 2–5
DiphtheriaR₀ ≈ 6–7
COVID-19 (Delta)R₀ ≈ 5–8
SmallpoxR₀ ≈ 5–7
MumpsR₀ ≈ 4–7
RubellaR₀ ≈ 6–7
ChickenpoxR₀ ≈ 10–12
MeaslesR₀ ≈ 12–18
Pertussis (Whooping Cough)R₀ ≈ 12–17
PoliovirusR₀ ≈ 5–7

What This Simulator Assumes

All models simplify reality. Here's what this simulator assumes — and where real life is more complex.


References

All vaccine effectiveness values, R₀ estimates, and epidemiological data used in this simulator are drawn from the sources below.

[1] CDC — Flu Vaccine Effectiveness Data, 2023–2024 Season
Older adults (≥65): ~31–37% VE. Source for nursing home flu scenarios.
cdc.gov/flu-vaccines-work
[2] CIDRAP — Flu vaccine efficacy 41% overall and 26% in older adults, 2023–24
California statewide VE study. Source for flu VE in elderly/nursing home population.
cidrap.umn.edu
[3] Influenza Vaccine Effectiveness, 2023/2024 — Northern Ireland, PMC
Care home resident uptake 82%; VE 47.5% across all age groups. Source for nursing home coverage & VE.
pmc.ncbi.nlm.nih.gov
[4] PubMed — Two-dose measles vaccine effectiveness remains high over time (France, 2023)
Two-dose VE: 99.6% in young children, 96.7% 16 years post-vaccination. Source for measles VE values.
pubmed.ncbi.nlm.nih.gov/37586955
[5] Truveta — Measles vaccination trends in U.S. children (2025)
Two-dose MMR series 97% effective. Source for measles vaccine effectiveness.
truveta.com
[6] CDC MMWR — School Vaccination Coverage, 2022–23 School Year
National MMR coverage: ~93.1% for kindergartners; exemption rate 3.0%. Source for poorly vaccinated school scenario.
cdc.gov/mmwr
[7] KFF — Recent Changes to State Vaccine Requirements for School Children (2025)
Non-medical exemptions rose to 3.4% nationally; Idaho reached 15.4%. Context for school exemption scenarios.
kff.org
[8] Johns Hopkins Bloomberg School of Public Health — Measles & Vaccines (2025)
Two doses of MMR protect ~97% of children. Measles requires ≥95% coverage for community immunity.
publichealth.jhu.edu
[9] Mayo Clinic — Herd Immunity and Vaccines
Community immunity for measles requires ≥95% vaccination. Explains threshold concept.
mayoclinic.org
[10] WHO — Community Immunity, Lockdowns, and COVID-19
Explains community immunity thresholds and how they are calculated (1 − 1/R₀).
who.int
[11] CDC — Measles Complications
Ear infections (1/10), pneumonia (1/20), encephalitis (1/1,000), death (1–3/1,000). Source for complications table.
cdc.gov/measles
[12] PMC — Herd Immunity, Vaccination and Moral Obligation (Journal of Medical Ethics, 2023)
R₀ values, threshold formula, and differences between diseases regarding community immunity.
pmc.ncbi.nlm.nih.gov/articles/PMC10511978