If you worry about infectious disease, you probably already do plenty to avoid germs, like washing your hands frequently or wearing a mask in crowded places. But your community keeps you safe, too, through something called herd immunity.
Herd immunity means that enough people in a group have achieved protection against a certain germ, either through natural infection or vaccination, that the germ spreads more slowly until a community reaches herd immunity.
Simply put, “when everyone around you is protected through vaccination, the virus can no longer jump from person to person,” says Daniel Pastula, MD, MHS, FAAN, chief of Neuro-Infectious Diseases at University of Colorado School of Medicine. That means babies who are too young to get vaccinated, people with weakened immune systems, and those who don't respond fully to a certain vaccine, for example, are protected.
“It's a way for us to get rid of common but potentially deadly infections, like measles or polio,” explains Pria Anand, MD, chief of the Division of Hospital Neurology at Boston University Medical Center. Both of those diseases can lead to neurologic complications.
The level of immunity needed for a group to reach herd immunity varies by type of infection, Dr. Pastula notes. The threshold is about 80 percent for polio and 95 percent for measles, according to a report by Yale Medicine.
But with vaccine hesitancy on the rise, experts fear that herd immunity may be disappearing. A recent report that looked at states with data on the measles, mumps, and rubella (MMR) combination vaccine found that two-thirds of them had child immunization rates below 95 percent.
“That endangers the most vulnerable around us,” Dr. Anand says.
Here's a closer look at herd immunity and why it's so necessary to keep us healthy.
An Important Effort
Vaccines have been around for over two centuries, ever since the world's first one was created against smallpox in 1796. “They're essentially a dress rehearsal for the real thing: they give your immune system practice to fight off infection without the risks of that infection,” Dr. Pastula says. “They're the best way we have to prevent diseases that have traditionally caused so much pain, suffering, and death.”
Before the measles vaccine was developed in 1963, for example, outbreaks caused an estimated 2.6 million deaths each year. Mass measles vaccinations prevented more than 60 million deaths between 2000 and 2023, according to the World Health Organization.
Polio, on the other hand, caused over 15,000 cases of paralysis a year in the early 1950s, but those rates dropped dramatically after the introduction of its vaccine in 1955. Thanks to mass vaccination and herd immunity, the United States was polio-free for decades until 2022, when a case of paralytic polio occurred in an unvaccinated man who had travelled abroad. Even since then, herd immunity has prevented this deadly disease from making an unwanted comeback.
“We've been able to be so successful in eliminating these diseases over the years because of herd immunity,” Dr. Pastula says. Two doses of the MMR vaccine provide 97 percent protection against measles, and three doses of the polio vaccine provides 99 percent protection against that virus.
But herd immunity can be lost. If people can't get a vaccine, or choose not to, the level of protection in a community goes down. That's why we've seen outbreaks of measles over the last several years, Dr. Pastula says. In 2025, a West Texas measles outbreak of 762 cases, mostly in children, led to 99 hospitalizations and two deaths. The childhood MMR vaccination level in Gaines County, where the outbreak happened, was only around 82 percent, according to a 2025 study published in Annals of Internal Medicine.
Brain Benefits
Certain vaccinations, such as those for MMR and polio, prevent you from getting the disease entirely. That's important because these viruses can cause life-threatening complications, some of which impact brain health. One serious complication is acute encephalitis, or brain inflammation, that can lead to permanent brain damage. There's also a late-onset complication called subacute sclerosing panencephalitis that can develop years after an infection, Dr. Anand says.
Other viruses, including those for the flu and COVID-19, mutate, making it impossible to protect against them entirely, says Igor Koralnik, MD, FAAN, chief of Neuro-infectious Disease at Northwestern University Medical Center in Chicago. But people still benefit if they get annual updated versions of these vaccines since they help reduce the rate of serious disease, hospitalization, and death, he stresses.
These benefits extend to the brain as well. Getting an annual flu shot may reduce the risk of stroke by 54 to 73 percent, according to a 2025 study in the Journal of Clinical Hypertension.
“The flu is a viral infection, which causes inflammation that makes your blood stickier and more likely to clot,” Dr. Pastula says. “If you're vaccinated, your infection will often be less severe, which mutes that inflammatory reaction.”
Another study, published in Nature Communications in 2024, looked at 46 million adults and found that COVID-19 vaccination reduced the incidence of both heart attack and stroke for six months following vaccination, compared to those who were unvaccinated or the period prior to vaccination. Yet despite these benefits, fewer than half of children and adults got the 2024-25 flu vaccine, and less than a quarter of all adults got the updated 2024-25 COVID vaccine, according to the U.S. Centers for Disease Control and Prevention.
“There's a lot of misinformation and disinformation about these vaccines, particularly the COVID vaccine, but research shows that they're very safe,” Dr. Pastula says.
The shingles vaccine–which protects against reactivation of varicella zoster, the virus that causes chickenpox and, later, shingles—also appears to benefit the brain. Once the virus infects someone, it stays dormant in their body and can reactivate years later, causing shingles, a painful, blistering rash that can result in long-term effects like nerve pain, vision loss, pneumonia, hearing problems, and encephalitis. But the shingles vaccine (Shingrix) is over 90 percent effective in preventing the virus and postherpetic neuralgia, or long-term nerve pain, the most common complication.
Researchers have found that the shingles vaccine also might reduce the risk of developing dementia by about 20 percent, according to a 2025 study in the journal Nature. The study used an older form of the shingles vaccine, Zostavax, which contains a modified version of the live virus, explains Pascal Geldsetzer, MD, MPH, PhD, an assistant professor of medicine at Stanford University and the study's senior author. A 2024 study in Nature Medicine found that Shingrix, the new vaccine, also protects against dementia.
“We think that the vaccine prevents inflammation that can happen as a result of the reactivation of the chicken pox virus,” Dr. Geldsetzer says. “But it may also be due to broader immune system activation, too.”
Follow Precautions
While it's important for everyone to stay up to date on their vaccines, it's imperative for anyone with a neurologic condition. People with multiple sclerosis, for example, may take certain medications that suppress their immune system, making them more likely to get infections and experience complications, Dr. Pastula points out. But an unexpected infection such as the flu, COVID, or shingles can worsen any neurologic condition, Dr. Anand says, and “even a mild infection may stoke your immune system and put you at higher risk” of clinical deterioration if you have an autoimmune disease.
“If you have a neurodegenerative condition like dementia, or Parkinson's disease, or even a stroke, getting sick can cause you to worsen or have a setback,” she adds. “We've seen stroke patients who have made significant improvements in strength or speech who regress after infection.”
Dr. Anand recommends that people with neurologic conditions talk to their neurologist and primary care provider to make sure they are up to date on all necessary vaccines. Generally, vaccines and their boosters are safe and effective for most patients, live-attenuated vaccines are not recommended for people with MS who have recently taken steroids or who take certain disease-modifying therapies (DMTs) that suppress the immune system. People with MS should receive vaccines according to standard vaccine guidelines. Patients experiencing a relapse should delay vaccination until the relapse symptoms are no longer worsening or have resolved, however.
COVID-19 vaccination also may reduce the risk of developing long COVID, a chronic condition that can develop after infection with the virus and can have prominent neuro-cognitive features—just one of many benefits that this and other vaccines can have on brain health.