It's dinnertime. As you lift your fork, a piece of pasta falls off and hits the floor. Do you pick it up and eat it?

Many of us will rationalize eating it with the five-second rule, the common idea that a piece of food on the floor for less than five seconds remains safe to eat. Fans of MythBusters will point out that Jamie Hyneman and Adam Savage proved several years ago that five seconds on the floor was enough for tasty morsels to attract all sorts of bacteria—but a new study finds that, depending on the type of food and the floor you've dropped it on, the five-second rule works.

Students at Aston University in the United Kingdom, led by Anthony Hilton, a professor of microbiology, looked at whether different types of food would contract E. coli or Staphylococcus aureus if they fell on various types of floors, including tile, linoleum, and carpet. Students dropped wet foods, such as gummy bears and pasta, on the surfaces. Within five seconds, the moist foods on tile and linoleum started showing signs of E. coli or Staphylococcus aureus. When it came to carpet, the food could rest for up to 30 seconds without any microbes showing up. And dry foods, such as cookies or pretzels, could sit on any type of floor for up to 30 seconds before bacteria swarmed all over it.

“Consuming food dropped on the floor still carries an infection risk as it very much depends on which bacteria are present on the floor at the time; however, the findings of this study will bring some light relief to those who have been employing the five-second rule for years, despite a general consensus that it is purely a myth,” Hilton said.

The students also surveyed people about the likelihood they’d eat food off the floor. Of the 500 people surveyed, 87 percent would or had already consumed food from the floor. Women were more likely to nosh off the floor, with 55 percent feeling comfortable with it and 81 percent adhering to the five-second rule.

"Our study showed that a surprisingly large majority of people are happy to consume dropped food, with women the most likely to do so," Hilton said. "But they are also more likely to follow the 5 second rule, which our research has shown to be much more than an old wives' tale.”