Skip to content
PoopCheck PoopCheck
Research April 22, 2026

The Gut-Brain Axis: How Your Microbiome Shapes Mood and Anxiety

How the gut-brain axis links your microbiome to mood and anxiety, via the vagus nerve, serotonin, short-chain fatty acids, and the HPA stress axis.

By PoopCheck Team

The gut-brain axis is a two-way communication network that connects your gut microbes to your brain through the vagus nerve, immune signals, hormones, and microbe-made neurochemicals. A growing body of research shows that the trillions of microbes in your colon influence mood, anxiety, and stress response, and that a troubled gut can send distress signals to the brain just as a troubled brain can unsettle the gut. The science is still young, but the mechanisms are real, and they help explain why gut-directed treatments can ease anxiety and why chronic stress can wreck digestion.

Key takeaways

  • The gut-brain axis is a bidirectional communication network linking the central nervous system, the enteric nervous system, the vagus nerve, the immune system, and the gut microbiota.
  • Your gut contains an enteric nervous system of roughly 100 to 500 million neurons — enough that researchers call it a “second brain,” though it doesn’t do the thinking, per the Queensland Brain Institute.
  • Enterochromaffin cells in the gut wall produce about 90% of the body’s serotonin, per a 2023 review in Food Science & Nutrition, though most of it acts locally on gut motility, not on mood.
  • The vagus nerve is the main highway between gut and brain; roughly 80% of its fibers carry signals from the gut to the brain, per a 2018 review in Frontiers in Neuroscience.
  • A landmark 2019 study of 1,054 people in Nature Microbiology found that people with depression had lower levels of two butyrate-producing bacteria, Faecalibacterium and Coprococcus.

What is the gut-brain axis?

The gut-brain axis is the set of biological pathways through which the gastrointestinal tract and the central nervous system talk to each other. Signals travel in both directions. A 2015 review in Annals of Gastroenterology describes it as a network that links “emotional and cognitive centers of the brain with peripheral intestinal functions.”

Four main channels carry the traffic:

  1. Neural — the vagus nerve and the enteric nervous system.
  2. Endocrine — stress hormones like cortisol via the hypothalamic-pituitary-adrenal (HPA) axis.
  3. Immune — cytokines released by gut-resident immune cells.
  4. Microbial metabolites — short-chain fatty acids, neurotransmitters, and tryptophan metabolites produced by gut bacteria.

When any of these channels gets disrupted, mood and digestion both tend to suffer. That is why anxiety can trigger diarrhea and why chronic gut inflammation can show up as brain fog or low mood.

The enteric nervous system: your “second brain”

The wall of your gut houses a dense mesh of neurons called the enteric nervous system (ENS). Estimates of neuron count range from roughly 100 million to 500 million depending on the counting method, per the Queensland Brain Institute. That’s more than the spinal cord, and it’s why the ENS earned the “second brain” nickname in a foundational 1999 paper in Scientific American and later PubMed review.

The ENS can run basic gut functions — muscle contractions, secretions, local blood flow — without any input from the brain. But it is wired into the central nervous system through the vagus nerve, and it shares most of the same neurotransmitters: serotonin, dopamine, GABA, acetylcholine.

It does not “think.” It does, however, sense chemistry and mechanical stretch inside the gut and relay that information upstream. When it mis-fires — as happens in IBS — the brain receives distorted signals, and gut pain becomes part of the problem.

The vagus nerve: the gut-brain highway

The vagus nerve is the longest cranial nerve and the main physical link between gut and brain. It wanders from the brainstem down through the neck and chest and branches extensively through the abdomen.

A 2018 review in Frontiers in Neuroscience notes that roughly 80% of vagal fibers are afferent — they carry information from the gut up to the brain — while only about 20% are efferent, sending commands down. In other words, the gut talks to the brain far more than the brain talks back.

Vagal afferents sense:

  • Stretch and pressure in the gut wall (fullness, distension)
  • Nutrient content via signals from enteroendocrine cells
  • Microbial metabolites like short-chain fatty acids
  • Inflammatory signals from gut-resident immune cells

The cholinergic anti-inflammatory pathway, carried by the vagus, can dampen peripheral inflammation and reduce intestinal permeability. This is part of why vagus-nerve stimulation is being studied for everything from treatment-resistant depression to IBD.

Gut serotonin: abundant, but mostly local

You have probably seen the claim that “90% of serotonin is made in the gut.” The number is real. A 2023 review in Food Science & Nutrition reports that enterochromaffin cells in the gut lining synthesize roughly 90% of the body’s total serotonin, while the brain itself holds only about 5%.

But the popular reading — that “your gut makes your happy chemical” — oversimplifies it.

Most gut serotonin does not reach the brain. Serotonin does not cross the blood-brain barrier in appreciable amounts. Gut-produced serotonin mostly acts locally, on gut motility, secretion, and visceral pain signaling, and it is a major reason enterochromaffin-cell dysfunction shows up in IBS symptoms.

What connects gut serotonin to mood is indirect: enterochromaffin cells signal to vagal afferents, and those afferents carry information to brainstem mood and arousal circuits. Gut microbes also influence how much of the precursor amino acid tryptophan gets shunted toward serotonin versus inflammatory pathways. So the gut does shape brain serotonin — just not by shipping serotonin across the bloodstream.

How gut microbes influence mood and anxiety

This is the most active area of research, and the one with the most hype to cut through. Four mechanisms have the clearest evidence:

1. Short-chain fatty acids (SCFAs)

When your gut microbes ferment fiber, they make short-chain fatty acids — mostly acetate, propionate, and butyrate. Butyrate fuels colon cells and has anti-inflammatory effects, and some SCFAs cross the blood-brain barrier, with butyrate crossing most efficiently, per a 2023 review in Cells.

SCFAs help maintain blood-brain-barrier integrity, modulate microglia (the brain’s immune cells), and support brain-derived neurotrophic factor (BDNF) — a protein linked to mood regulation and neuroplasticity.

2. Vagal signaling from the microbiome

Microbial metabolites activate vagal afferents in the gut. A 2017 Cell paper showed that enterochromaffin cells synapse directly with vagal sensory neurons — a physical circuit by which gut microbes can influence brainstem activity within milliseconds.

3. HPA-axis regulation (stress response)

Chronic gut inflammation and dysbiosis appear to prime the hypothalamic-pituitary-adrenal axis, the body’s main stress system. A 2025 review in Frontiers in Immunology describes how disrupted gut microbiota can increase HPA reactivity, raising cortisol responses to ordinary stressors and reinforcing anxiety symptoms.

4. Microbe-made neurotransmitters

Certain gut bacteria synthesize or regulate GABA, dopamine precursors, and tryptophan metabolism. In the Valles-Colomer study published in Nature Microbiology in 2019 — a survey of 1,054 people with a 1,063-person replication cohort — researchers found that:

  • People with depression had lower levels of Faecalibacterium and Coprococcus, two major butyrate producers.
  • Coprococcus and Dialister were depleted in depression even after controlling for antidepressant use.
  • The microbial capacity to synthesize a dopamine metabolite (3,4-dihydroxyphenylacetic acid) correlated positively with mental quality of life.

This is association, not causation. But it’s one of the best-powered datasets on the question, and it aligns with the mechanistic work. Researchers looking for similar public cohorts can browse our index of 26 stool and gut microbiome datasets by sample size, sequencing type, and access method.

Stress, anxiety, and your gut: the other direction

The axis runs both ways. When the brain perceives threat, it triggers the fight-or-flight response, which slows or halts digestion so the body can divert blood and energy elsewhere. Harvard Health notes that even mild stress — public speaking, a tight deadline — can temporarily disrupt digestion and produce the symptoms of functional GI disorders.

Sustained stress does more. It raises cortisol, increases intestinal permeability (“leaky gut” in the mechanistic rather than the wellness-marketing sense), and shifts the microbiome toward less favorable compositions. Over months and years, this is part of how chronic anxiety drives IBS, and why psychological therapies like cognitive-behavioral therapy and gut-directed hypnotherapy consistently improve IBS symptoms in clinical trials.

The practical upshot is that stress management is gut care, and gut care is — to some extent — mood care.

What you can actually do about it

The interventions with the strongest evidence aren’t exotic. They’re the same habits that show up in any good gut-health guide, for a simple reason: they feed the microbes that feed your brain.

  1. Eat fiber from many plant sources. Fiber is the raw material for butyrate. A varied fiber intake (aiming for 25–34 g/day) supports the butyrate producers that go missing in depression studies. See our guide to fiber and stool consistency for practical targets.
  2. Add fermented foods daily. Yogurt, kefir, kimchi, sauerkraut, and kombucha increase microbiome diversity and reduce inflammation markers. Our roundup of fermented beverages covers the useful options.
  3. Be honest about probiotic supplements. The evidence for “psychobiotic” strains (certain Lactobacillus and Bifidobacterium) on mood is promising but strain-specific and often modest, per a 2025 review in Biomedicines. Don’t expect a random drugstore pill to fix anxiety. Our probiotics vs prebiotics guide walks through which strains have real trial data.
  4. Protect your sleep and manage stress. Both feed back onto HPA-axis reactivity and gut motility. A 2026 cohort of 6,941 adults found lower microbiome diversity in people with poorer sleep quality and greater social jet lag — see sleep and gut health for the evidence. CBT, mindfulness, and gut-directed hypnotherapy have randomized-trial support for IBS.
  5. Move your body. Exercise increases microbial diversity and butyrate producers in several human studies.
  6. See a clinician for red-flag symptoms. New, persistent mood changes or gut symptoms — bleeding, unintended weight loss, chronic diarrhea — need evaluation, not a kombucha.

If you want to see whether a diet or stress-management change is actually shifting your gut, the most honest feedback is your stool. Our broader 10 evidence-based ways to improve your gut health covers more of the playbook.

FAQ

Is the gut really a “second brain”? It’s a useful metaphor, not a literal claim. The enteric nervous system has on the order of hundreds of millions of neurons and uses many of the same neurotransmitters as the brain, but it doesn’t think or generate consciousness. It senses, signals, and runs local gut function — and it talks to the real brain through the vagus nerve.

Does my gut microbiome actually cause anxiety or depression? The evidence supports association and plausible mechanisms, not a simple cause-and-effect. Human studies show differences in microbiome composition between people with and without depression, and mechanistic work in animals shows gut microbes influencing anxiety-like behavior. But depression and anxiety are multifactorial, and microbiome changes are more likely one contributing input than a single cause.

Can probiotics treat anxiety or depression? Meta-analyses show small-to-moderate effects for certain strains and combinations on depressive and anxiety symptoms, but results are mixed and strain-specific. They are not a replacement for evidence-based treatment. Talk to a clinician before using probiotics as a mental-health intervention.

How long does it take for gut changes to affect mood? Microbiome shifts from diet usually start within days, but clinically meaningful mood or anxiety changes in probiotic trials typically take 2–8 weeks. Don’t judge it in a week.

Why do I get diarrhea when I’m anxious? Your sympathetic nervous system redirects blood away from the gut and speeds colon transit during acute stress. Combined with vagal signaling and hormones like CRH, this can produce urgency, cramping, and loose stool. It’s a normal gut-brain-axis response that becomes a problem when it’s triggered constantly.

Is “leaky gut” real? Increased intestinal permeability is a real physiological phenomenon measurable in lab studies and is associated with chronic stress, inflammation, and some GI diseases. The broader wellness concept of “leaky gut syndrome” as a catch-all diagnosis is not recognized by mainstream medicine.

The bottom line

Your gut and your brain are in constant conversation through nerves, hormones, immune cells, and the chemical output of trillions of microbes. That conversation shapes mood, anxiety, stress tolerance, and digestion. You can’t micromanage it. You can feed it well — diverse fiber, fermented foods, decent sleep, real stress management — and give it time to respond.

If you want to see the feedback loop in your own body, track your stool alongside stress and diet changes. The PoopCheck app logs Bristol type, color, and consistency from a photo, so you can watch how your gut actually responds when you change what it’s eating and how you’re living.

Sources

  1. The gut-brain axis: interactions between enteric microbiota, central and enteric nervous systems. Annals of Gastroenterology, 2015.
  2. The Vagus Nerve at the Interface of the Microbiota-Gut-Brain Axis. Frontiers in Neuroscience, 2018.
  3. The neuroactive potential of the human gut microbiota in quality of life and depression. Nature Microbiology, 2019 (Valles-Colomer et al.).
  4. Exploring the serotonin-probiotics-gut health axis: A review of current evidence and potential mechanisms. Food Science & Nutrition, 2024.
  5. Mechanisms of Blood-Brain Barrier Protection by Microbiota-Derived Short-Chain Fatty Acids. Cells, 2023.
  6. The microbiota-gut-brain axis in depression: unraveling the relationships and therapeutic opportunities. Frontiers in Immunology, 2025.
  7. Gut-Brain Axis in Mood Disorders: A Narrative Review of Neurobiological Insights and Probiotic Interventions. Biomedicines, 2025.
  8. The enteric nervous system: a second brain. Hospital Practice, 1999.
  9. Enteric nervous system. Queensland Brain Institute.
  10. The gut-brain connection. Harvard Health Publishing.

Ready to track your gut health?

Download PoopCheck free and get your first AI stool analysis in seconds.

Scan your first photo free
P
PoopCheck Team

The PoopCheck team is dedicated to making digestive health tracking accessible, accurate, and private for everyone.

4.8 · Get the app free