Short answer: If you’re wearing pants, you should be fine.
Back in 2001, a nurse asked Australian science author, educator, and commentator Karl "Dr. Karl" Kruszelnicki the same question. She wanted to know if she was contaminating the operating room she worked in by silently farting throughout procedures, Discover reports.
To get to the bottom of the matter, Kruszelnicki contacted Canberra microbiologist Luke Tennent. Tennent asked one of his colleagues to fart directly into two Petri dishes from a distance of five centimeters—first while wearing pants, and then a second time au naturel. While the first Petri dish stayed clean, the second one sprouted bacteria overnight, which seemed to suggest that clothing acts as a barrier between whatever bacteria might be expelled by a fart (not all of which would be contained within the gas itself). Dr. Karl reported the findings in 2014 in the satirical holiday issue of the scientific journal BMJ, noting:
"Our deduction is that the enteric zone in the second Petri dish was caused by the flatus itself, and the splatter ring around that was caused by the sheer velocity of the fart, which blew skin bacteria from the cheeks and blasted it onto the dish. It seems, therefore, that flatus can cause infection if the emitter is naked, but not if he or she is clothed. But the results of the experiment should not be considered alarming, because neither type of bacterium is harmful. In fact, they're similar to the ‘friendly’ bacteria found in yogurt."
While Kruszelnicki and Tennent's experiment didn't dive too deeply into all the kinds of bacteria that a pants-less person might be able to spread, China's CDC did. Earlier this year, a Beijing district office for the Center for Disease Control and Prevention announced that pants should be an effective barrier against farts that might carry the novel coronavirus. So to avoid spreading COVID-19, practice responsible social distancing—and avoid farting naked around other people. Which is honestly a good rule of etiquette for life in general.
Have you got a Big Question you'd like us to answer? If so, let us know by emailing us at bigquestions@mentalfloss.com.