How the Gut Microbiome Affects Mental Health

Photo: Edward Jenner / Pexels
How the gut microbiome affects mental health is one of the most active questions in neuroscience, and the honest answer has two halves. The mechanisms are real: gut bacteria talk to the brain through nerves, immune molecules, and chemicals they manufacture. The evidence that changing those bacteria treats a mood disorder in people is far thinner. This article walks through the biology, the animal experiments that opened the field, the human studies that complicate it, and what the best trials on probiotics and diet can and cannot tell you.
This article is for education, not medical advice. If you are struggling with your mood or anxiety, a doctor or mental health professional is the right person to talk to.
The gut is not just digestion: it has its own nervous system
Most people picture the brain as the body's command center and the gut as a pipe. The gut is closer to a second, smaller command center. It contains the enteric nervous system (ENS), a mesh of neurons embedded in the walls of the digestive tract that numbers in the hundreds of millions, according to standard reviews of the field (Furness, 2012, Nature Reviews Gastroenterology & Hepatology).
The ENS runs digestion largely on its own: it coordinates muscle contractions, secretions, and local blood flow, and it senses what is passing through. A useful comparison is a regional office with its own manager. It handles routine decisions locally and phones headquarters only when something needs escalation. Researchers sometimes call it the "second brain," though the label undersells the point. The ENS is a distinct neural organ that happens to share a body with the brain, and the two are in constant conversation.
That conversation is where bacteria enter. The gut lining is not a sealed wall but a surface covered in sensors, and trillions of microbes are on the other side of it. Understanding how a bacterium can influence mood starts with understanding that the gut has ways of listening to them. For the broader digestive picture, see how digestion works.
Counting the residents
The commonly repeated claim that bacterial cells outnumber human cells ten to one has been revised. A 2016 re-estimate by Ron Milo's group put the bacteria in a 70 kg reference man at about 3.9 × 10¹³ (roughly 39 trillion) and human cells at about 3.0 × 10¹³, a ratio on the order of 1.3 to one (Sender, Fuchs, and Milo, 2016 preprint, later published in PLoS Biology). The bacteria are therefore about as numerous as your own cells, not ten times more.
What matters for the brain is less the headcount than the metabolic repertoire. Your own genome cannot digest most plant fibers, synthesize certain vitamins, or transform bile acids in the ways gut bacteria can. The microbiome behaves like an organ with a chemical specialty, and many of its outputs are small molecules that can enter the bloodstream. Those outputs are the raw material of the gut-brain axis.
To read the research honestly, you also need the vocabulary of its main tool. Germ-free mice are animals raised in sterile isolators with no microbes at all. Scientists can colonize them with chosen bacteria and see what changes, which is how many of the causal claims in this field were first tested. Germ-free animals also have abnormal immune systems and guts, a limitation that comes up again below.
The gut-brain axis: several communication highways
The gut-brain axis is the collective term for the signaling infrastructure linking the digestive tract and the central nervous system. A 2019 review in Physiological Reviews sorts the traffic into several routes: the immune system, tryptophan metabolism, the vagus nerve, the enteric nervous system, and microbial metabolites such as short-chain fatty acids (Cryan et al., 2019). Three of them carry most of the story.
1. The vagus nerve. The vagus nerve is the longest cranial nerve, running from the brainstem into the abdomen. It is described as roughly 80% afferent and 20% efferent, meaning most of its fibers carry information from the body up to the brain rather than commands down (Bonaz et al., 2018, Frontiers in Neuroscience). Think of it as a broadband cable that the gut uses to report its chemical state to brainstem regions involved in stress, mood, and autonomic function.
2. The immune route. A large share of the body's immune cells sit in the gut wall, where they sample bacterial products all day. Gut microbes shape how those cells behave, and immune signaling molecules called cytokines can influence the brain. A well-known review links inflammatory signaling to depression and to poor response to existing antidepressants in some patients (Miller and Raison, 2016, Nature Reviews Immunology).
3. The chemical route. Gut cells release many hormones and peptides into the blood, including glucagon-like peptide-1 and peptide YY, and bacteria release metabolites of their own. These molecules act on nerve endings in the gut, on the blood-brain barrier, or on the brain after crossing it. The hormone story has a high-profile drug spin-off, covered in how the hormones of the endocrine system work.
The experiment that showed the vagus matters
The most direct evidence that the nerve route can carry a mood signal comes from mice. Researchers fed mice a strain of Lactobacillus rhamnosus (JB-1) over a chronic period. The animals showed lower stress-induced corticosterone and less anxiety- and depression-related behavior, along with region-specific shifts in the expression of GABA receptors in the brain. When the vagus nerve was cut, those neurochemical and behavioral effects did not appear (Bravo et al., 2011, PNAS).
It is a striking result, but it is one strain, in mice, with behavioral tests that only loosely map onto human depression. It shows that a gut bacterium can change brain chemistry through the vagus. It does not show that a probiotic will do so in a person.
How gut bacteria help shape neurotransmitters
Here the connection between gut bacteria and mood gets concrete, and also easy to overstate. The key neurotransmitters are serotonin, GABA, and dopamine, and each has a different gut story.
Serotonin: made mostly in the gut, but not for the brain
More than 90% of the body's serotonin is synthesized in the gut, according to the introduction of a landmark paper in Cell (Yano et al., 2015). The cells that make it are the enterochromaffin cells lining the intestine. Yano and colleagues showed that spore-forming bacteria from mouse and human gut microbiota promote serotonin production in these cells, and that germ-free mice have reduced serotonin until such bacteria are introduced.
The headline can mislead. Gut serotonin acts mainly in the gut itself, where it regulates movement of the bowel, signals to vagal nerve endings, and communicates with immune cells, and it is generally understood not to cross the blood-brain barrier in meaningful amounts. The brain makes its own serotonin from local tryptophan. What the Cell paper showed is that the microbiota also modulates serotonin in the hippocampus, but it did not test whether the gut's pool feeds the brain's pool. "Ninety percent of serotonin is made in the gut" is true. "So gut bacteria control your mood chemistry" does not follow from it.
The tryptophan fork
Tryptophan, an amino acid from food, is the raw material for serotonin. It is also the starting point for a second route, the kynurenine pathway, whose products are linked to inflammation and neurotoxicity. The balance between the two routes depends on immune activation and on bacteria that compete for tryptophan. The rat study discussed below found altered tryptophan metabolism in animals given microbiota from depressed patients (Kelly et al., 2016). The mechanism is plausible and measurable, which is why researchers take it seriously, but its role in human mood disorders is still being worked out.
GABA and dopamine: bacteria as chemists
GABA (gamma-aminobutyric acid) is the brain's main inhibitory neurotransmitter, the chemical that calms overactive signaling. Some gut bacteria, including certain Lactobacillus and Bifidobacterium strains, can produce it. A large analysis of the Flemish Gut Flora Project (1,054 people, with validation in a second cohort) found that two bacterial genera, Coprococcus and Dialister, were depleted in people with depression even after accounting for antidepressant use, and it flagged a possible role for microbial GABA production. It also found that the microbial potential to make a dopamine metabolite correlated with better mental quality of life (Valles-Colomer et al., 2019, Nature Microbiology). These are statistical associations and genetic potential, not proof that those bacteria changed anyone's mood.
For a deeper look at the reward chemical itself, see the dopamine system explained, and for the general mechanics of neural signaling, how neurotransmitters work.
| Signal | Where gut bacteria influence it | Reaches the brain directly? | Evidence strength |
|---|---|---|---|
| Serotonin | Production by gut enterochromaffin cells | Largely no; acts via vagus and gut | Strong in mice, mechanism well described |
| Tryptophan/kynurenine | Competition for tryptophan, immune shift | Metabolites can reach the brain | Plausible; human role unclear |
| GABA | Produced by some bacterial strains | Unclear in humans | Mouse data; human association |
| Short-chain fatty acids | Fermentation of dietary fiber | Some reach the blood; brain effects debated | Animal work, often at high doses; human trials limited |
| Vagal signaling | Bacterial products stimulate gut sensors | Yes, via nerve | Shown in mice (vagotomy) |
Short-chain fatty acids: chemical dispatches from the colon
When gut bacteria ferment dietary fiber, they release short-chain fatty acids (SCFAs), mainly acetate, propionate, and butyrate. They are the most studied microbial metabolites in the gut-brain literature, and they are a good example of how food becomes biology: the fiber you eat is not digested by you but is converted by microbes into compounds that circulate in the blood.
SCFAs act through several mechanisms. Butyrate is the main fuel for the cells lining the colon. It also inhibits enzymes called histone deacetylases, which changes how genes are switched on, and it binds receptors on immune and nerve cells. A review from the Cryan lab discusses how microbial metabolites including butyrate might influence brain function and behavior, while cautioning that experiments often use doses far higher than physiological levels (Stilling et al., 2016, Neurochemistry International).
That caution matters. Many of the dramatic findings on SCFAs, such as effects on microglia (the brain's resident immune cells) or on BDNF, a protein that supports neuron survival, come from animal experiments, some of them at doses well above normal physiological levels. The logic is sound: a fiber-rich diet feeds bacteria that produce SCFAs, which may support the brain's immune and plasticity systems. The evidence that this chain operates the same way in a person eating ordinary food is much weaker than the diagrams suggest.
Dysbiosis: when the microbiome looks different
A healthy gut community is diverse, with hundreds of species in rough balance. Dysbiosis is the term for a community that has drifted: reduced diversity, a loss of key fiber-fermenting species, or overgrowth of species that provoke inflammation. A 2019 review lists birth mode, antibiotics, diet, and stress among the early-life and ongoing factors that shape microbial composition (Cryan et al., 2019).
Because stress also alters the gut, the arrows run both ways. Chronic stress activates the hypothalamic-pituitary-adrenal axis and raises cortisol, which can change gut movement and the microbial environment. Changes in the microbiome can in turn alter immune and neural signaling. For the stress side of that loop, see the psychology of stress and cortisol and the stress response.
What studies of depressed people have found
A 2015 study compared the fecal microbiota of 46 people with major depressive disorder and 30 healthy controls. It found higher levels of the phyla Bacteroidetes, Proteobacteria, and Actinobacteria and lower levels of Firmicutes in the depressed groups, and lower Faecalibacterium, a butyrate-producing genus, which tracked inversely with symptom severity. The authors stressed high variability between people and the need for study of causality (Jiang et al., 2015, Brain, Behavior, and Immunity).
The Flemish study described above is larger and reached a similar flavor of conclusion: certain butyrate-producing genera were enriched in people with better quality of life and depleted in people with depression. The recurring theme across studies is a lower presence of butyrate producers, but exact species differ from study to study, which is a warning that results are not yet a reliable fingerprint.
What the rat transplant experiment can and cannot show
In 2016, a research group transplanted gut microbiota from patients with major depression, and from healthy controls, into rats whose own microbiota had been depleted. The rats receiving microbiota from depressed patients developed anhedonia (loss of interest in rewards), anxiety-like behavior, and altered tryptophan metabolism. The authors concluded that the microbiota may play a causal role in features of depression (Kelly et al., 2016, Journal of Psychiatric Research).
That is a meaningful result. It also has limits worth stating plainly. The recipients were rats, whose behavior is a rough proxy for human mood. The patients' donor samples came from a small group. And a transplant moves the entire microbial community along with its metabolites, so it cannot say which bacteria did what. Correlation, in this case, is accompanied by suggestive animal causation, but nothing close to a human demonstration. A good primer on why that distinction matters is how correlation differs from causation.
| Study type | Example | What it can show | What it cannot show |
|---|---|---|---|
| Human cross-section | Jiang 2015 (46 vs 30 people) | Microbiomes differ between groups | Which came first |
| Large cohort | Valles-Colomer 2019 (1,054 people) | Associations that survive medication control | That the bacteria cause low mood |
| Animal transplant | Kelly 2016 (rats) | A community can transfer behavior in animals | That it works the same in people |
| Randomized trial | Probiotic and diet trials | Whether an intervention changes symptoms | Which microbial change, if any, did it |
What the research says about probiotics and depression
Psychobiotics is the term for live microorganisms that, taken in adequate amounts, might give a mental health benefit. The idea is scientifically grounded. The clinical record is still modest.
A 2016 systematic review of randomized controlled trials searched five databases and included 10 trials, four in clinically diagnosed groups and six in non-clinical samples. The authors found "limited support" for the use of some probiotics in reducing human anxiety and depression and called the results tentative because of methodological limitations (Pirbaglou et al., 2016, Nutrition Research). Strain matters enormously: a Lactobacillus rhamnosus product tested in one trial tells you little about a Bifidobacterium longum product tested in another.
A small pilot trial published in JAMA Psychiatry in 2023 tested a multistrain probiotic as an add-on to ongoing antidepressants. It randomized 49 analyzed adults to eight weeks of probiotic (24 people) or placebo (25 people). Attrition was low, and effect-size estimates favored the probiotic on depression and anxiety scales, but the authors framed it as a feasibility study meant to inform a larger trial rather than proof of efficacy (Nikolova et al., 2023).
The bottom line is that no probiotic is an approved treatment for depression, and the trials are too small and too different from one another to support firm conclusions. The field is moving, but any marketing claim that a particular product treats depression is ahead of the evidence.
Diet: the larger and better-supported lever
If specific probiotics are a weak lever, diet is a bigger one, though the link to the microbiome is less certain than most summaries admit.
The SMILES trial
The SMILES trial randomized 67 adults with major depression to either a 12-week dietary improvement program, built around a Mediterranean-style pattern, or a social support control. Among 56 who completed the assessment, the diet group improved more on a standard depression scale (Cohen's d of -1.16, a large effect), and 32.3% of the diet group reached remission versus 8.0% of the control group (Jacka et al., 2017, BMC Medicine).
Two cautions apply. The trial was small, and a dietary program is hard to blind, so participants likely knew which group they were in. More importantly for this article, SMILES did not measure the gut microbiome, so it cannot say that the diet worked by changing gut bacteria. Diet can affect mood through many other routes, including blood sugar regulation, inflammation, nutrient status, and sleep. It is evidence that diet quality matters for depression, not evidence that the microbiome is the mediator.
How quickly diet changes the gut
In a 2014 Nature study, volunteers who switched to diets made entirely of animal or plant products showed rapid shifts in microbial community structure and activity, including more bile-tolerant bacteria on the animal-based diet and fewer fiber-degrading Firmicutes (David et al., 2014). The microbiome responds to what you eat within days, not months, though the study used extreme diets and short windows.
Plant diversity and fermented foods
The American Gut Project, a citizen-science study with over 10,000 participants, reported that the diversity of plants people ate, rather than labels like "vegan," was associated with microbiome and metabolome differences (McDonald et al., 2018, mSystems). Different plants carry different fibers that feed different bacterial niches, which is why variety tends to beat quantity of a single food. A useful analogy is a garden: planting many crops keeps the whole ecosystem productive.
A randomized trial from Stanford compared a high-fiber diet with a high-fermented-food diet in healthy adults over 17 weeks. The fermented-food group showed steadily rising microbiome diversity and decreased markers of inflammation. The high-fiber group's diversity stayed stable, though it showed changes in the microbes' fiber-degrading genes, and immune responses varied from person to person (Wastyk et al., 2021, Cell). The study enrolled only 18 people per arm and measured immune markers, not mood.
Fiber targets and the ultra-processed question
The Dietary Guidelines for Americans 2020-2025 recommend at least 14 grams of fiber per 1,000 calories, about 28 grams a day for women and 35 grams for men. Analyses of national survey data find that American adults eat only about 10 to 15 grams a day on average (BMC Public Health, 2023). Fiber is the main fuel for SCFA-producing bacteria, so the gap between target and intake is one plausible reason low microbial diversity tracks with Western dietary patterns.
Some food additives may matter as well, though the evidence is from animals. In mice, low doses of the common emulsifiers carboxymethylcellulose and polysorbate 80 altered the gut microbiota, causing low-grade inflammation and metabolic changes (Chassaing et al., 2015, Nature). Whether the same happens at typical human intakes is unproven. The popular term "leaky gut," meaning increased intestinal permeability that lets bacterial products into circulation, remains a hypothesis about mechanisms of inflammation, not an established diagnosis for mood disorders.
What the field gets wrong
"Ninety percent of serotonin is in the gut, so the gut controls mood." The statistic is true and the conclusion does not follow. Gut serotonin mostly acts in the gut and via the vagus. The brain's serotonin system is separate, and common antidepressants act on it directly.
"Probiotics treat depression." The trials show tentative, strain-specific signals at best. A probiotic is not a replacement for treatment, and many commercial products have never been tested for mental health outcomes.
"My microbiome is out of balance, so I can fix it with a test." Consumer stool tests can describe which bacteria are present, but the field has not defined what a "healthy" profile looks like for mood. Even the studies above find different depleted bacteria in different populations.
"If mice show it, people show it." Mouse microbiomes, diets, and behavior differ from ours. Germ-free mice have abnormal immune systems, which makes them useful for proving that microbes can matter but poor for predicting effect sizes in people.
"Dysbiosis causes depression." In humans the data are associations, and treatments, diet, sleep, and illness all change the microbiome. Depression itself changes eating, activity, and stress hormones, which in turn change gut bacteria. Both directions are probably real, and for broader context on the clinical picture see the neuroscience of depression and anxiety neuroscience.
Frequently asked questions
Q: Can gut bacteria affect your mood? A: Evidence from animals says yes: bacteria can alter stress hormones, brain chemistry, and behavior, and in one mouse study the effect disappeared when the vagus nerve was cut. In humans, studies find that gut bacteria differ in people with depression, but whether they cause or result from the condition is unresolved.
Q: What is the gut-brain axis? A: It is the two-way communication network between the digestive tract and the central nervous system. Reviews describe several routes, including the vagus nerve, the immune system, tryptophan metabolism, the enteric nervous system, and microbial metabolites such as short-chain fatty acids.
Q: Do probiotics help with anxiety and depression? A: Some trials show small improvements with specific strains, but a systematic review of 10 trials called the support "limited" and the results tentative. A 2023 pilot trial of 49 adults taking an add-on probiotic was encouraging but designed only to inform a larger study. No probiotic is approved to treat depression.
Q: How much serotonin is made in the gut? A: More than 90% of the body's serotonin is made in the gut, mainly by enterochromaffin cells in the intestinal lining. It acts mostly on the gut and on vagal nerve endings. The brain makes its own serotonin separately, so gut serotonin does not simply top up the brain's supply.
Q: Which foods support a diverse gut microbiome? A: Research points to fiber from varied plant foods and to fermented foods. In a 17-week trial, a high-fermented-food diet increased microbiome diversity and reduced inflammatory markers. National guidelines suggest about 14 grams of fiber per 1,000 calories. These are dietary patterns studied for gut health, not treatments for a mood disorder.
Q: Did the SMILES trial prove diet treats depression by changing the microbiome? A: No. SMILES showed that a Mediterranean-style dietary program improved depression scores in 67 adults over 12 weeks compared with social support, but it did not measure the microbiome. The benefit might involve gut bacteria, inflammation, nutrition, or other pathways, and the trial was small and unblinded.
The takeaway
The gut microbiome affects mental health through documented biology: bacteria influence serotonin production in the gut, send signals through the vagus nerve, shape immune tone, and make metabolites such as short-chain fatty acids that reach the rest of the body. That is why the field is real and why it excites researchers. The distance between mechanism and medicine is still large, though. Human studies are mostly associations, probiotic trials are small and inconsistent, and the best-supported intervention, a better overall diet, has not been shown to work through the microbiome. A fair reading is that the gut is one influential input into mood among many, and that the practical advice that survives the evidence is also the unglamorous kind: eat a varied, fiber-rich diet, and seek real treatment for real symptoms.
Sources
- Bravo JA et al. "Ingestion of Lactobacillus strain regulates emotional behavior and central GABA receptor expression in a mouse via the vagus nerve." PNAS 2011;108(38):16050-16055. Europe PMC
- Yano JM et al. "Indigenous bacteria from the gut microbiota regulate host serotonin biosynthesis." Cell 2015;161(2):264-276. PMC4393509
- Valles-Colomer M et al. "The neuroactive potential of the human gut microbiota in quality of life and depression." Nature Microbiology 2019;4:623-632. Europe PMC
- Jiang H et al. "Altered fecal microbiota composition in patients with major depressive disorder." Brain, Behavior, and Immunity 2015;48:186-194. Europe PMC
- Kelly JR et al. "Transferring the blues: Depression-associated gut microbiota induces neurobehavioural changes in the rat." J Psychiatr Res 2016;82:109-118. Europe PMC
- Cryan JF et al. "The Microbiota-Gut-Brain Axis." Physiological Reviews 2019;99(4). Europe PMC
- Pirbaglou M et al. "Probiotic supplementation can positively affect anxiety and depressive symptoms: a systematic review of randomized controlled trials." Nutrition Research 2016;36(9):889-898. Europe PMC
- Nikolova VL et al. "Acceptability, Tolerability, and Estimates of Putative Treatment Effects of Probiotics as Adjunctive Treatment in Patients With Depression." JAMA Psychiatry 2023;80(8):842-847. Europe PMC
- Jacka FN et al. "A randomised controlled trial of dietary improvement for adults with major depression (the SMILES trial)." BMC Medicine 2017;15:23. Europe PMC
- Wastyk HC et al. "Gut-microbiota-targeted diets modulate human immune status." Cell 2021;184(16):4137-4153. Europe PMC
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

How Do Fireflies Produce Light: The Science of Bioluminescence
Fireflies generate light without heat through a chemical reaction that achieves 41% efficiency — nearly three times more efficient than an incandescent bulb — powered entirely by ATP and oxygen.

Why Do We Have Blood Types? The Science and Evolution
Blood types are inherited molecular markers on red blood cells. The ABO polymorphism has been kept alive in primates for at least 20 million years, and infections such as malaria, cholera, and norovirus are the leading explanation for why.

Depression: The Neuroscience Behind It
Depression is more than low serotonin. A look at the brain biology behind it: the serotonin debate, stress hormones, inflammation, neuroplasticity and new treatments.

Psychedelics and the Brain: The Neuroscience of Psilocybin
How psilocybin acts on the brain: 5-HT2A receptors, the default mode network, plasticity, and what clinical trials in depression, PTSD, and addiction show.

The Science of Mental Health — What We Actually Know
About 1 in 7 people worldwide live with a mental disorder. The biology is real but incompletely understood, and several effective treatments exist. Here is what the evidence supports.

The Gut-Brain Connection — How Your Microbiome Affects Your Mind
Your gut and brain exchange signals through nerves, immune cells, and microbial chemicals. Here is what animal and human studies show about mood, anxiety, and cognition, and where the evidence is still thin.