When should a society start wearing masks and limiting contacts during a pandemic — and when should it stop? Scientists at the Max Planck Institute in Germany have built a new mathematical model that might help answer that question. The tool calculates exactly how strict pandemic measures should be, based on how serious a disease is and how much containing it costs society.

The researchers, working at the Theory of Complex Systems group at the Max Planck Institute for Dynamics and Self-Organization (MPI-DS), published their findings in the journal Proceedings of the National Academy of Sciences. They didn't design the model to recommend specific actions for specific diseases. Instead, they wanted to find general rules that could guide future decisions.

"Our goal is to help prepare for possible future outbreaks," said Laura Müller, the study's first author.

What the model revealed surprised even the researchers. When they fed in data about how diseases spread and how much containing them costs society — including economic losses, social disruption, and mental health effects — a clear pattern emerged. The model showed that optimal containment measures don't gradually scale up and down. Instead, they follow what the researchers call a "threshold structure."

For mild diseases, the math says it's actually best to do nothing. But once a disease crosses a certain level of severity, the model recommends implementing strong containment measures immediately. The jump between no action and intensive action happens suddenly — there is no middle ground that works best.

"It is very surprising that the transition in the idealized model occurs absolutely abruptly," said Viola Priesemann, a professor and group leader at MPI-DS. "Measures that represent a compromise between optimal intervention and no control at all ultimately result in higher overall costs."

The researchers also looked at how seasons affect the math. For diseases like influenza that spread more easily in winter, the model shows containment should automatically tighten when infection rates rise and ease when they fall. With optimized control, a winter flu season could produce only a small secondary wave in spring — about three months after the original peak — rather than the large waves communities typically experience.

Timing turned out to matter enormously. Because diseases can grow exponentially at the start of an outbreak, even small delays in launching measures led to significantly higher infection rates for severe diseases. For milder illnesses, those delays mattered less.

The model is simplified and can't make specific recommendations for real-world diseases. But Priesemann said the core finding — the sharp threshold between no containment and heavy containment — appears to hold true at a fundamental level. That gives policymakers a scientific starting point when facing uncertain situations, even before all the details of a new disease are known.

"Such principles provide guidance when society and policymakers need to develop strategies," Priesemann said. Which measures actually get implemented, though, remains a societal and political choice.