Physics students have calculated how long it would take for humans to be wiped out by an infectious zombie apocalypse, and the results are pretty depressing.

The study suggests that after just 100 days - a little over three months - less than 300 humans would be left alive on the entire planet.

At that point, any remaining humans would be outnumbered a million to one by zombies, which means it'd be pretty tough out there for survivors like Rick and his gang on The Walking Dead.

But before you give up all hope, there is good news - in a follow-up study, the students showed that as humans gradually kill more zombies, get better at surviving, and make more babies, the world's population would eventually start bouncing back after roughly 27 years. So… yay?

The research was conducted by physics students at the University of Leicester as part of an annual exercise that tests their ability to apply science to real-world or hypothetical scenarios.

Two papers on the topic have now been published in the peer-reviewed Journal of Physics Special Topics (here and here), which is run by students to give them experience publishing, editing, and reviewing papers.

To be clear, right now, a zombie apocalypse is complete fiction, and, as far as we know, no one's at risk of being wiped out any time soon by an infectious zombie disease (thankfully).

But course tutor Mervyn Roy from the university's department of physics and astronomy thought the topic might help get the students engaged in the complex physics required to make these types of predictions.

"Every year we ask students to write short papers for the Journal of Physics Special Topics," said Roy. "It lets the students show off their creative side and apply some of physics they know to the weird, the wonderful, or the everyday."

To figure out how humanity would cope with a zombie apocalypse, the students first had to come up with the parameters of the infection. They assumed that a zombie could find one person each day, with a 90 percent chance of infecting them with the zombie virus.

They then used an epidemiological model called the SIR model to map how the disease would spread. Using the model, they split the human population up into three categories: the susceptible population (S), zombie (Z), and dead (D).

The lifespan of a zombie goes from S to Z to D. And the team didn't factor in natural birth and death rates, seeing as they were only looking at 100 days, and natural births and deaths over that time would be pretty insignificant compared to the destruction from the zombie virus.

The model then analysed how often infected humans (zombies) would come into contact with non-infected humans, and how likely they were to pass on the disease, in order to see how many humans could survive.

The results weren't great - after 100 days there would be just 273 remaining humans on the planet, the researchers found. And we'd be outnumbered a million to one by zombies. 

Without any major way for humans to fight back, the students predicted that, in less than a year, the human species would most likely be wiped out entirely.

But in a more positive follow-up study, students factored in that, over time, humans would get better at killing zombies, and also at avoiding being infected. And they could rapidly start having babies, which makes human survival a lot more feasible.

Under these conditions, the team found that it would take around 1,000 days, or 2.7 years, for humans to wipe out all the zombies. And then another 25 years on top of that for the human population to start to recover from the attack.

Which means there might still be hope for the cast of The Walking Dead, if they stop fighting each other and start killing more zombies instead.

And just in case you do ever find yourself in a real-life zombie apocalypse, don't worry, scientists have also calculated the best place for you to hide out, and it's definitely not a shopping mall.

Good luck out there, guys.