Return to portfolio

Herd Immunity Explorable

What is Herd Immunity?

Herd immunity is refers to the concept the group protection from an infectious disease that emerges when critical mass of the population are immunized from that recieving the disease. In the majority of cases, immunization stems from recieving vaccination against the disease. These immunized people in the community reduce the odds that a disease can spread from person to person. In other words, persons that are not immune to disease can still be shielded against contracting it by virtue of others in the population being unable to pass it on. The greater number of people immune to a disease, the less likely of a chance that someone vulnerable to the disease will contract it. Herd immunity is important because there people who cannot be vaccinated against certain diseases such as those who are too young, too old, or allergic to the vaccination. These people must rely on those around to get vaccinated so that the diease has lower odds of spreading to them.

Calculating Herd Immunity

A population is deemed to have achieved herd immunity against an infectious disease outbreak when they have reached or surpassed the herd immunity threshold, denoted as Qc. To calculate the value of Qc, one would need to know the basic reproductive rate of the specific disease, denoted as R0. R0 is a numeric measure representing the average number of infections made by that specific disease based on it's various attibutes such as method of spread and duration if infection. The higher that number is, the more infectious the disease is said to be. Using the entire equation, we can determine the herd immunity threshold calculated by solving for the equation Qc = 1 – (1/R0).

For example, mumps can have a reproductive number (R0) of 7, so when we plug it into the equation, it becomes Qc = 1 - (1/7). Solving the equation gives us 0.86. In other words, 86% of the population needs to be immunized.

However, this calculation makes the assumption that a vaccine against the disease will be 100 percent effective. In reality, vaccines are not perfect. Therefore to find the real world vaccination rate required for herd immunity, we also need to factor in imperfect vaccines by dividing Qc by the effectiveness of the vaccine(E). Thus, the population required to reach herd immunity threshold can be approximated as Vc = Qc/E.

In our previous mumps example, the effectiveness of getting two doses of the mumps vaccine is 88 percent. When that number is converted to a decimal, we can get the equation 0.86/0.88 = 0.97, which converts into 97%. In reality, 97% of the population is actually needed to reach herd immunity against mumps! When the vaccination coverage of a population has the necessary percentage for herd immunity, the disease is thought off as "contained".

Reproductive Numbers For Well Known Diseases

Disease Name Reproductive Number (R0) Vaccine Effectiveness (E)
Measles 12-18 93% (One Dose), 97% (Two Doses)
Mumps 4-7 78% (Two Doses), 88% (Three Doses)
Polio 5-7 90% (Two Doses), 99% (Three Doses)
Rubella 5-7 97%
Seasonal Flu 1-2 Varys, but typically between 40% - 60%

History and epidemiology of global smallpox eradication. (2014, August 25). Retrieved from

Vaccine Effectiveness - How Well Does the Flu Vaccine Work? (n.d.). Retrieved from

Measles, Mumps, and Rubella (MMR) Vaccination: What Everyone Should Know. (n.d.) Retrieved from

Polio Vaccine Effectiveness and Duration of Protection (n.d.)

Your Turn

Watch the effect of vaccination and herd immunity in action by simulating your own outbreak. In the simulation you will be able to modify the reproductive rate of your disease, the effectiveness of the vaccination against it and the vaccination rate of the population. In the simulation, your fictitious disease will have ten attempts infect someone in a population of 250 people. Each time the disease infects a person, it will spread twice according to the reproductive rate you set – once to the R0 number of closest neighbors from the initial infection, and then again for each of the neighbors infected. To incorporate some real life randomness, the location distribution of the vaccinated, unvaccinated and vaccinated but vulnerable is randomly distributed. This will cause some variation the simulation, but you view see the average results on the line graph.

10 50 50
Threshold Percentage
Qc = 1 – (1/R0)
Vaccination Rate needed with Vaccine Effectiveness Factored in
Vc = Qc / E

Color Legend

Unvaccinated Unprotected(Vaccinated, but Vulnerable) Vaccinated and Immune Infected

Simulation Display

Config settings and press "Start Simulation" button to start outbreak

Current Simulation Population Distribution

Hover to see segment details


The Simple Math of Herd Immunity. (2015, April 20). Retrieved from

What is Herd Immunity? (2014, September 5). Retrieved from