What happens inside your body when you suddenly stop drinking coffee? To find out, researchers from University College Cork in Ireland studied a group of 62 people, half of whom regularly drank about three to five cups of coffee a day, and the other half who normally did not drink coffee. They examined their gut bacteria, metabolites, mood, stress, alertness, learning and memory.
The regular coffee drinkers first stopped drinking coffee for two weeks, and during that period, researchers measured changes both in their bodies and behavior. Coffee was then reintroduced, but participants did not know whether they were given the caffeinated or decaffeinated version of the beverage.
The most noticeable change after coffee was stopped was observed in the gut. The coffee drinkers' gut metabolites—small chemical substances produced or changed by metabolism—changed substantially compared with those of people who did not normally drink coffee.
When coffee was reintroduced, both caffeinated and decaffeinated groups reported less perceived stress, lower depression scores and less impulsivity. Because these changes occurred with both types of coffee, the effects were not necessarily dependent on caffeine.
The researchers also found some difference in the gut bacteria of the coffee drinkers. Bacteria—such as Eggerthella sp., thought to contribute to acid secretion in the stomach and intestines, or Cryptobacterium curtum, which may participate in bile acid production—were more abundant among coffee drinkers than those who did not drink coffee.
Both processes could potentially create an intestinal environment that discourages some harmful bacteria and infections.

...
Coffee drinkers also had higher levels of bacteria called Firmicutes, a group of microbes that have previously been associated with positive emotions in females.
Dr. Kelly Brown, the medical director at Geviti and a board-certified family medicine physician who is not involved in the study, told Newsweek that several biological pathways could help explain links between coffee, gut health and mental well-being.
"The gut and brain communicate through several pathways, including the nervous system, immune signaling, inflammation and metabolites produced by gut bacteria," she said. "Coffee contains compounds that can be metabolized by our gut microbes and may influence that environment."
She added that those changes could affect inflammation, neurotransmitter signaling and other pathways involved in mood, stress and cognition.
"But we are still working out exactly how important each mechanism is," Brown continued.
One main difference between caffeinated and decaffeinated coffee was observed.
People drinking decaffeinated coffee showed improvements in learning and memory, which were not observed in people from the caffeinated group. This means that caffeine may not account for all of coffee's possible effects on cognition.
The researchers pointed to other compounds in coffee, including polyphenols, as possible contributors.
Brown noted that polyphenols, particularly chlorogenic acids, are among the most significant non-caffeine compounds in coffee.
"They have antioxidant and anti-inflammatory properties and are also metabolized by the gut microbiome into other bioactive compounds. Coffee also contains soluble fiber and other plant compounds that can interact with gut bacteria, so the effects of coffee are much more complex than caffeine alone," she said.
Meanwhile, caffeinated coffee was associated with less anxiety, better vigilance and better attention, as well as reduced risk of inflammation.
Professor John Cryan, a principal investigator at APC Microbiome Ireland at University College Cork and the corresponding author of the study, said in a news release: "Public interest in gut health has risen hugely. The relationship between digestive and mental health is also increasingly being better understood, but the mechanisms behind coffee's effects on this gut-brain axis have remained unclear.
"Our findings reveal the microbiome and neurological responses to coffee, as well as their potential long-term benefits for a healthier microbiome. Coffee may modify what microbes do collectively, and what metabolites they use.
"As the public continues to think about dietary changes for the right digestive balance, coffee has the potential to also be harnessed as a further intervention as part of a healthy balanced diet."
Cryan added that coffee is more than caffeine. He said: "It's a complex dietary factor that interacts with our gut microbes, our metabolism, and even our emotional well-being."
Brown cautioned that the findings should be interpreted carefully.
"Association does not necessarily mean causation," she said, noting that coffee drinkers can differ in how much coffee they consume, what type they drink and how their bodies process caffeine.
She added that individual microbiomes can also vary considerably and that researchers should not automatically label changes in a single bacterial species as beneficial or harmful.
Brown said, "The research is promising, but coffee is not a treatment for poor gut health, depression or cognitive decline."
Reference
Boscaini, S., Bastiaanssen, T.F.S., Moloney, G.M., et al. (2026). Habitual coffee intake shapes the gut microbiome and modifies host physiology and cognition. Nature Communications, 17. https://doi.org/10.1038/s41467-026-71264-8
Contact Newsweek editors on this story: Kara Dolman and Shakeema Edwards.
