— Kobus Louw/E+/Getty Images

If you need another reason to partake in your favorite morning (or midday or afternoon, or, if you’re really brave, evening) beverage, coffee, it’s your lucky day. New research has found that coffee has a surprising and somewhat ironic health benefit.

Coffee is the second most consumed beverage in the world behind water, and Americans drink around 400 million cups of joe daily. We use coffee to wake up in the morning and push through that midday slump. But besides the fact that it keeps us alert and helps us survive all-nighters, it’s also known for helping us…anticipate our bathroom breaks. That’s why it seems paradoxical that a drink known to make us poop could also help prevent irritable bowel syndrome (IBS), according to a study published in the journal Nutrients.

A meta-analysis of eight studies that included more than 430,000 participants found that folks who consumed any amount of coffee had 16% less odds of developing IBS than those who did not drink coffee.

IBS is a gastrointestinal disorder that affects more than 200,000 in the U.S. yearly. It causes abdominal pain, gas, bloating, constipation, and diarrhea, and researchers have been unable to pinpoint an exact cause. Though symptoms can be treated, IBS is incurable and can be a lifelong problem.

The study didn’t look into why coffee helps prevent IBS, but coffee “contains caffeine and other bioactive compounds” that could have multiple effects on the gut microbiome. Additionally, polyphenols and other compounds in coffee have anti-inflammatory properties, which could help prevent IBS.

But how much coffee helps? We don’t yet know, or really exactly why coffee is associated with a lower incidence of IBS. The research team was unfortunately unable to determine an exact type or amount of coffee that might be responsible for their findings.

Because of the variation in roasting styles, types of coffee, and the sheer volume of different coffee preparations, they couldn’t conclude if one type of coffee is better than others for IBS prevention — is your grande, iced, sugar-free, vanilla soy latte with extra whip as protective as a cup of black Kona, or does the five-year-old instant Maxwell House in your mom’s pantry have the same effect as a cup of Dunkin? They just don’t know.

It is safe to say, however, that some coffee preps are less healthy than others — a Venti Peppermint White Chocolate Mocha Frappuccino from Starbucks contains an incredible 88 grams of sugar, close to three times the recommended daily allowance of sugar for men. So even though coffee has health benefits, the type of coffee plays a big role in aspects of overall health, IBS or not.