When the coronavirus that causes COVID-19 first appeared late in 2019, it found itself faced with an all-you-can-infect buffet. Although the virus had likely been circulating in animals for quite some time, it was new to human beings. None of us were immune, and that—combined with other characteristics such as its contagiousness in people who don’t realize they’re sick—has allowed the virus to sweep around the world.

But pandemics cannot rage forever, even if it might not feel that way right now. At some point, it’s likely that COVID-19 will eventually run out of easy targets to infect.

When enough people become immune to an infectious disease, everyone in the population—whether we’re talking about a village, a city, or a country—has some protection from catching it, says Shane Crotty, an immunologist at the La Jolla Institute for Immunology in California. This concept is what epidemiologists and other public health experts call herd immunity, and it plays a key role in how vaccinations work so well and why the flu isn’t as devastating on a population level as it could be.

But when will we reach that point for COVID-19, and how much protection could herd immunity give us?

“Herd immunity is not this magical number where once you reach that point nobody else gets infected,” Crotty says. “It would no longer be a full-blown epidemic once you get to herd immunity, [but] the virus would still spread, it would still infect people, it would still kill people. It would just be a less common event.”

Herd immunity can develop naturally after a contagious disease has infected huge numbers of people. “As more and more people get immune, they’re not available as a host and so the rate of infection will slowly go down,” says Durland Fish, an epidemiologist at the Yale School of Public Health. The threshold for herd immunity is the point at which each person who catches a disease would spread it to less than one person on average.

The other way that herd immunity can come about is for a vaccine to be introduced and widely used. Once a vaccine becomes available, though, it won’t be fully effective in every person who gets it. However, when enough people are vaccinated for herd immunity to kick in, the chances of an infected person coming crossing paths with someone who is still susceptible to the disease are much lower.

One striking case where this happened is the polio vaccine, Crotty says. In the early 1950s, polio outbreaks caused more than 15,000 cases of paralysis each year in the United States, according to the Centers for Disease Control and Prevention. Then in 1955 a vaccine became available. The next year scientists saw far fewer cases of polio than they were expecting—not only were vaccinated kids not becoming sick, but far fewer susceptible, non-vaccinated kids were getting infected as well. The number of new polio cases dropped to fewer than 100 during the 1960s, fewer than 10 in the 1970s, and then ground to a halt in 1979. Since then, polio has been eliminated in the U.S. and is only rarely seen when it is brought into the country by travelers infected elsewhere.

Typically, more than 70 percent of the population needs to be vaccinated for herd immunity to work.That percent rises though, when a disease is particularly infectious. To prevent polio from spreading through the community, about 80 to 85 percent of the population must be immunized. For measles, the percent is even higher. This disease is extraordinarily contagious; about 19 out of every 20 people must be vaccinated to keep it under control. In recent years, measles outbreaks have become more common in the United States among communities where not enough people have been vaccinated.

“Measles is so infectious that it can find the rare people who aren’t vaccinated or who don’t have strong immunity and still spread,” Crotty says. “So you really have to have a high level of coverage of measles [vaccination] to protect a population.”

It’s not yet certain what percentage of the population will need to be immune to COVID-19 before herd immunity can begin to slow its spread; some current estimates range from roughly 50 to 70 percent of the population.

How quickly we get there depends on a number of things. Right now, aggressive social distancing is vital to preventing the novel coronavirus—officially known as SARS-CoV-2—from spreading rampantly. However, this benefit has a flip side: It also means that the vast majority of the population is still vulnerable to COVID-19 and herd immunity will take longer to develop.

“If someone was talking about a virus that really didn’t kill anybody but just gave everybody the sniffles, sure, the fastest way to herd immunity is to just let it go,” Crotty says.

But given how serious the illness we’re dealing with can be, it makes more sense to slow the spread of COVID-19 and build herd immunity very gradually until a vaccine can be developed.

To avoid future surges in COVID-19 infections that leave hospitals overwhelmed and unable to provide critical care to everybody who needs it, the U.S. might have to endure several rounds of social distancing, researchers at Harvard University reported last week in the journal Science. Absent any new advances in our ability to fight COVID-19, this strategy could require some form of social distancing into 2022.

However, it’s very likely that we will become more adept at dealing with the novel coronavirus before then. Social distancing measures might not need to be as stringent if scientists develop an antiviral treatment that could prevent people with COVID-19 from becoming seriously ill or dying.

“That would be a major contribution not only to their wellbeing but to the progress of herd immunity under one of these scenarios,” Marc Lipsitch, an epidemiologist and one of the authors of the new study, said at the press conference.

How helpful herd immunity will be also depends on how our immune systems respond to the virus, Crotty says. That means scientists must answer a few basic questions: Do people actually develop immunity after recovering from COVID-19? Is this response strong enough to protect them from getting re-infected? How long does immunity to COVID-19 last? And is there any shred of preexisting immunity in the population caused by exposure to other, less dangerous members of the coronavirus family that cause common colds?

Scientists will probably have a preliminary idea of how strong the immune response to COVID-19 is by summertime, Crotty says. “We and others are trying to generate information about the immune system that’s helpful for understanding what might we expect for herd immunity,” he says. That knowledge about the immune system might also help researchers develop an effective vaccine.

“The classic way to develop a vaccine is to look at that immune response and say, okay, what did the immune system do, let’s try to do that with a vaccine.” For example, Crotty says, when researchers were developing the hepatitis B vaccine, they found that most people made a full recovery from the viral infection, but those that didn’t (around 5 percent of those afflicted) developed progressively worse chronic liver disease. Scientists realized that the people that recovered successfully had developed a unique antibody, which researchers used to create a highly effective vaccine.

Predicting how close we are to herd immunity also depends on having widely available serological tests, which look for germ-fighting antibodies produced in the blood of people who recover from COVID-19. These tests will help reveal how many people have already been infected and how common it is for people to catch COVID-19 without realizing it.

“Right now it’s a nightmare scenario where any company can put out any test and most of them are lousy tests,” Crotty says. However, he adds, the tests developed by university-based scientific labs tend to be more accurate. “It’s definitely possible to make a good test.”

Despite the devastation that COVID-19 has caused around the world, we have a long way to go before reaching herd immunity. On April 20, the World Health Organization reported that early data from serological tests suggest that only 2 to 3 percent of the global population have antibodies indicating that they have been infected with COVID-19.

And even once there is evidence that herd immunity to COVID-19 has developed, we cannot let our guards down.

“Once things get to herd immunity you don’t have this wildfire pandemic, but the virus is still around and can infect people,” Crotty says. “By definition there would be fewer cases and fewer deaths after herd immunity than before, but it’s not a black-and-white event where it means once the population has herd immunity you have immunity.”

When herd immunity does begin to kick in, it will probably arrive sooner in some places than others, Fish says. “There will be areas that haven’t had much disease where more of the population is going to be susceptible than in an area where there has been a lot of transmission,” he says.

It’s also likely that COVID-19 will be reintroduced periodically from other communities where the disease is spreading more widely. This happens regularly with measles in the United States. It also seems to be happening now for COVID-19 in several countries that had brought their initial wave of infections under control.

“You still want a vaccine even when there is herd immunity so that you can explicitly, specifically protect each individual,” Crotty says.

This article has been updated to reflect the fact that most people, including most folks with compromised immune systems, can receive inactivated vaccines.