GutPathways Take the quiz
Infant microbiome

How breast milk vs formula shapes your baby's gut microbiome

Breast milk and formula both feed a baby well, but they feed different gut bacteria. Breast milk carries sugars that only certain bifidobacteria can use, so the infant gut microbiome takes a different path with each type of feeding, and some of those differences last.

  • 17 min read
  • By Theodoros Prevedoros, Biochemist, MSc
  • Published
  • Updated
  • Sources checked
Glass of infant formula powder and a baby bottle with the title Breastmilk vs formula, an infant microbiome point of view
Breast milk and formula start two different gut ecosystems.

How does breast milk vs formula change the infant gut microbiome?

Feeding your newborn is a big decision, and many parents end up with breastfeeding, formula or a mix of both. There is no wrong choice here, because every option can be improved for the baby's gut bacteria. Still, the type of milk decides which microbes settle first, and that early community trains the immune system.

A meta-analysis of seven studies with 684 infants put numbers on the difference. In the first six months, babies who were not exclusively breastfed had higher gut diversity, a gut that looked "older" for their age and more Bacteroidetes and Firmicutes. On top of that, the differences were still there after six months.1

The main reason is a group of sugars in breast milk. Human milk oligosaccharides, or HMOs, reach the colon undigested, and bifidobacteria are the main bacteria with the tools to eat them.3, 8 As a result, the breastfed gut fills with these bacteria, while formula feeds a wider and more mixed crowd.

Why does the infant gut microbiome matter so much?

The infant microbiome is the community of bacteria, fungi and viruses that settles in the baby's gut from birth onward. During the first year it changes fast, shaped by delivery mode, feeding, antibiotics and the home environment. Above all, it is the main teacher of the young immune system.

Gut bacteria help immune cells tell harmless from harmful. For example, in a Swedish cohort of 64 infants, more Bifidobacterium species in the first weeks went with higher secretory IgA in saliva at 6 months, an antibody that guards the mucosal surfaces.9 In other words, the right early bacteria help the baby build its first line of defense.

The gut also talks to the brain. Gut bacteria can produce or consume serotonin, dopamine and GABA, mostly shown in animals so far.10 In humans, a study of 89 one-year-olds linked gut bacterial groups with cognitive scores at age 2, although the field is still young.11

The infant microbiome and long-term health

The first year leaves marks that show up later. In a Danish cohort of 690 children, an immature gut microbiome at age 1 went with a higher risk of asthma at age 5, but only in children of mothers with asthma.12 Likewise, a study in 222 Northern European infants tied the type of early gut bacteria to how the immune system learns, a mechanism linked to autoimmunity.13

What are human milk oligosaccharides and why do they matter?

HMOs are the third most abundant solid part of breast milk, after lactose and fat, and they are unique to human milk.8 They work as a prebiotic "bifidus factor", and they also act as decoy receptors that keep pathogens off the gut lining.3 Their names are hard, yet a few of them now appear on formula labels:

  • 2′-fucosyllactose
  • 3-fucosyllactose
  • 3′-sialyllactose
  • 6′-sialyllactose
  • lacto-N-fucopentaose I, II, III, V
  • lacto-N-hexaose
  • lacto-N-neotetraose
  • lacto-N-tetraose
  • sialyl-lacto-N-tetraoses a to c
Human milk oligosaccharides (HMOs)
A family of complex sugars that the baby cannot digest. They pass to the colon, where they feed selected bifidobacteria, block pathogens from attaching and may support immune and brain development. Most of the evidence still comes from lab, animal and cohort studies.3

How do breastfeeding, formula and mixed feeding compare?

Breast milk changes with the baby's age. It carries nutrients, growth factors, antimicrobial peptides and immune proteins that support the developing immune system. Infant formula is a manufactured product that copies the nutrient profile of breast milk, but it cannot copy its living and bioactive parts.14

Formula feeding moves the infant gut toward proinflammatory bacteria and has been linked to higher gut permeability and bacterial load.15 For instance, in 72 newborns, gut permeability dropped faster in breastfed babies than in formula-fed babies within the first week.16

Key differences between breast milk and formula
AreaBreast milkFormula
NutritionNutrients that change with the baby's age, plus growth factors, antimicrobial peptides and immune proteinsCovers nutrient needs, but lacks most bioactive parts of breast milk
Gut microbiomeSupports a bifidobacteria-rich gutMoves the gut toward proinflammatory bacteria, more permeability and a higher bacterial load
Overweight riskLinked with a lower risk of overweightExclusive formula at 3 months went with about twice the odds of overweight at 1 year in one cohort
ImmunitySupports immune development and protects against infectionsMay expose the baby to more proinflammatory bacteria and antigens

The overweight row comes from a Canadian cohort of 1,087 infants, where exclusive formula feeding at 3 months doubled the odds of overweight at 1 year. However, much of that link faded after accounting for the formula-type microbiota.6

Infographic listing the benefits of breastfeeding for the baby and for the mother
Breastfeeding benefits listed for baby and mom. The strength of the evidence differs from item to item.

For the baby

Breastfeeding is linked with a lower risk of ear infections, asthma, meningitis, gastroenteritis, the flu, type 1 diabetes, ulcerative colitis, SIDS, obesity and heart diseases.

For mom

Breastfeeding is linked with a lower risk of osteoporosis, breast cancer, ovarian cancer, depression, type 2 diabetes, hypertension and obesity.

What the strongest evidence shows for baby and mom
For the baby
  • Fewer infections
  • Less malocclusion of the teeth
  • Higher intelligence test scores
  • Probably less overweight and diabetes later
For the mother
  • Protection against breast cancer
  • Better spacing between births
  • Possibly less ovarian cancer
  • Possibly less type 2 diabetes

From the Lancet breastfeeding series. It found no clear link with asthma, blood pressure or cholesterol.17

Which bacteria differ between breastfed and formula-fed babies?

The dominant bacteria differ clearly. Breastfed babies have more Bifidobacterium and Lactobacillus, while formula-fed babies have more Bacteroidetes and Firmicutes.18, 1 These bacteria matter because bifidobacteria crowd out harmful microbes and help train immune responses.

Diversity tells a less obvious story. Formula-fed babies have more diverse gut bacteria, yet in infancy higher diversity is not a good sign in itself, because the breastfed gut is meant to be simple and bifidobacteria-led at first.1 The type of microbe counts more than the number of types.

A study of 91 term infants looked at specific groups. At 40 days, Veillonella and Clostridioides were higher in formula-fed babies, and at 3 months formula-fed babies had more Lachnospiraceae and Clostridioides.2 By 6 months, the diversity of breastfed babies rose and started to catch up.2

REAL QUESTION

My baby is breastfed and her stools look yellow and seedy, but my friend's formula-fed son has firmer and darker stools. Is something wrong with one of them?

Most likely neither. In a French study, exclusively breastfed babies passed more stools and more liquid stools in the first months than formula-fed babies.19 Feeding type and gut bacteria both play a part. Changes in color, blood, a very hard stool or signs of pain are reasons to call your pediatrician, but the usual difference between breastfed and formula-fed stools is expected.

Does formula feeding raise antibiotic resistance in the infant gut?

It may. Formula changes which bacteria grow, and some of them carry antibiotic resistance genes. In a Finnish analysis, formula-fed newborns had 69% more antibiotic resistance genes in their gut bacteria than babies fed only human milk.20

The same babies had more opportunistic bacteria such as Staphylococcus aureus, Klebsiella pneumoniae and Clostridioides difficile, and fewer bifidobacteria.20 These genes are not inherited from the parents. Rather, the baby's diet selects for bacteria that already carry them.

69%more antibiotic resistance genes in the gut bacteria of formula-fed newborns.20
1.69fold change, with a confidence interval of 1.12 to 2.55.20

Why the first days and colostrum count

Colostrum, the first milk, seeds the newborn gut. It carries lactic acid bacteria such as Weissella, Leuconostoc and Lactococcus.21 A 2026 study of 33 colostrum samples also found Bifidobacterium and Lactobacillus DNA, and Bifidobacterium tracked with regulatory T cells, the cells that keep immune tolerance.22

For this reason, formula in the very first day may matter. In an Australian 2026 cohort of 563 high-risk infants, formula within 24 hours of birth went with about 3.6 times the odds of egg allergy at age 1.23 The authors called for randomized trials before turning this into advice.

Breastfeeding was also linked with 32% lower odds of wheezing in the first year among high-risk infants.24 The different metabolites made by the gut bacteria of breastfed and formula-fed babies may be one reason for this.5

What did a 2026 study find about breast milk, B. infantis and blood pressure?

Bifidobacterium longum subsp. infantis, or B. infantis, is the bifidobacterium best equipped to eat HMOs. A 2026 analysis of the Canadian CHILD cohort asked whether breast milk and this bacterium act together. Among babies who carried B. infantis at 3 months, breast milk feeding went with lower blood pressure percentiles at ages 3 and 5.4

17percentile points lower childhood systolic blood pressure with exclusive breast milk and B. infantis at 3 months.4
15percentile points lower with mixed feeding and B. infantis at 3 months.4
Study

In babies without B. infantis, breast milk feeding showed no link with later blood pressure. The milk and the microbe seemed to work as a pair, through the metabolites they produced in the gut at 3 months.4

This is a cohort study, so it shows an association and not proof. Even so, it explains why the same breast milk may not do the same work in every gut, since the bacteria that use it have to be there. It also shows that mixed feeding kept part of the effect.

How does breast milk train the baby's immune system?

Breast milk microbes help move the newborn from the Th2-leaning immune response of pregnancy to a balanced Th1 and Th2 response. Bacteria in colostrum and mature milk can also push the immune system toward anti-inflammatory responses, which may lower the risk of inflammatory conditions such as asthma and atopic dermatitis.25

Infographic of the immune components of breast milk: mucins, defensins and lactoferrin, human stem cells, probiotic bacteria, secretory IgA and anti-inflammatory cytokines
The main immune components of breast milk.

Mucins, defensins and lactoferrin

They are immune components of breast milk.

Human stem cells

Human stem cells are an immune component of breast milk.

Probiotic bacteria

Probiotic bacteria are an immune component of breast milk.

Secretory IgA

Secretory IgA is an immune component of breast milk.

Anti-inflammatory cytokines

Anti-inflammatory cytokines are an immune component of breast milk.

Some milk strains act directly on immune cells. In the lab, two Lactobacillus strains isolated from breast milk activated NK cells, CD8+ T cells and regulatory T cells.26 As a result, breast milk works as food, as a source of bacteria and as an immune signal at the same time.

Breast milk, tolerance and protection against infections

In the Dutch Generation R study of 4,164 infants, exclusive breastfeeding for 4 months and partial breastfeeding after that lowered the risk of respiratory and gut infections up to 6 months, and of lower respiratory infections between 7 and 12 months.27 Partial breastfeeding alone did not show the same protection in that study.27

Breast milk also helps the baby build tolerance to food antigens met during breastfeeding, which may help prevent allergies.25 In practice, when parents ask about allergies in the clinics where I work as a scientific collaborator, the first weeks of feeding and the first antibiotics are often the most useful part of the history.

What happens to the gut microbiome with combo feeding?

Combo feeding, also called mixed feeding, means breast milk and formula together. It helps many families, and any amount of breast milk counts. Still, in 6-week-old infants, the gut bacteria and stool metabolites of mixed-fed babies were much closer to formula-fed than to breastfed babies.5

Even brief formula in the hospital left a trace. In the CHILD cohort, exclusively breastfed babies who had received some formula as newborns had fewer Bifidobacteriaceae and more Enterobacteriaceae at 3 to 4 months.6 On the other hand, the 2026 blood pressure data showed that mixed feeding kept a good part of the benefit when B. infantis was present.4

Do HMO and probiotic formulas close the gap?

Newer formulas add HMOs, prebiotics, probiotics or postbiotics to bring the formula-fed gut closer to the breastfed one. In a randomized trial, a formula with five HMOs raised B. infantis and moved the gut profile closer to that of breastfed babies.28

The 2026 position of the ESPGHAN gut microbiota group sets the limits. Formulas with added biotics raised no safety concerns for growth, tolerance or side effects in healthy babies, but for most of them no recommendation for or against could be made. Only certain prebiotics earned a weak recommendation, for softer stools.7

⚠️ Warning: Probiotics are not risk-free in every baby. Cases of sepsis from probiotic strains have been reported, mostly in preterm infants with catheters.29 Probiotics for very small or sick babies belong to the medical team.

How can you support the gut of a formula-fed baby?

Formula feeding is a valid and often necessary choice. These steps help the gut microbiota whatever the feeding plan:

Breastfeed if you can, in any amount

Any breast milk brings HMOs and bacteria the gut can use. If exclusive breastfeeding is not possible, partial breastfeeding still counts, and the 2026 data showed part of the benefit with mixed feeding.4

Choose the formula with care

When formula is the main food, a formula closer to human milk, such as one with added HMOs, can move the gut profile toward that of breastfed babies.28

Discuss probiotics with your pediatrician

Probiotic formulas and drops are safe for most healthy babies, but the benefit depends on the strain, and preterm or sick babies need medical guidance.7, 29

Avoid antibiotics that are not needed

Antibiotics disrupt the young gut. Use them only when your doctor prescribes them, and ask how the gut can be supported afterward. More in IBS after antibiotics.

Diversify the diet with solid foods

Once solids start, a varied diet with fiber and, when suitable, fermented foods helps the gut community grow and mature.

Keep your pediatrician in the loop

A pediatrician or a pediatric dietitian can tailor feeding choices to your baby's growth, allergies and family history.

Frequently asked questions

Breastfed infants have a gut led by Bifidobacterium and Lactobacillus. Formula-fed infants have more diverse bacteria, more Bacteroidetes and Firmicutes, and at 3 months more Lachnospiraceae and Clostridioides.1, 2

In part. Breast milk carries its own bacteria, including lactic acid bacteria and bifidobacteria, and it also carries HMOs, which work as a prebiotic for selected bifidobacteria.21, 22, 3

It helps shift the newborn toward a balanced Th1 and Th2 response, supports anti-inflammatory signals and helps build tolerance to food antigens. Breastfeeding also lowers the risk of some infections.25, 27

Formula is safe and sometimes necessary. Even so, mixed-fed babies have a gut profile closer to formula-fed than to breastfed babies, and formula in the first 24 hours was linked with egg allergy in one 2026 cohort.5, 23

HMOs are human milk oligosaccharides, sugars made to match those in breast milk, such as 2′-fucosyllactose. Formulas with HMOs moved the gut microbiota closer to that of breastfed babies in a randomized trial.28

Differences persist after 6 months, and formula-fed newborns carried 69% more antibiotic resistance genes in their gut bacteria than babies fed only human milk.1, 20

Yes. In the first two months, exclusively breastfed babies passed about twice as many stools a day, and their stools were more liquid during the first three months. Some breastfed babies also go several days without a stool, which can be normal.19

References

29 studies
  1. Ho NT, Li F, Lee-Sarwar KA, et al. Meta-analysis of effects of exclusive breastfeeding on infant gut microbiota across populations. Nat Commun. 2018.
  2. Ma J, Li Z, Zhang W, et al. Comparison of gut microbiota in exclusively breast-fed and formula-fed babies: a study of 91 term infants. Sci Rep. 2020.
  3. Bode L. Human milk oligosaccharides: every baby needs a sugar mama. Glycobiology. 2012.
  4. Liu T, Petersen C, Zhao N, et al. Human milk and infant gut microbiome in association with infant fecal metabolome and child blood pressure. JAMA Netw Open. 2026.
  5. Wang M, Valizadegan N, Fields CJ, Donovan SM. Fecal microbiome and metabolomic profiles of mixed-fed infants are more similar to formula-fed than breastfed infants. Microorganisms. 2025.
  6. Forbes JD, Azad MB, Vehling L, et al. Association of exposure to formula in the hospital and subsequent infant feeding practices with gut microbiota and risk of overweight in the first year of life. JAMA Pediatr. 2018.
  7. Dinleyici EC, Indrio F, Szajewska H, et al. Recommendations on the health outcomes of infant formula supplemented with biotics by the ESPGHAN Special Interest Group on Gut Microbiota and Modifications. J Pediatr Gastroenterol Nutr. 2026.
  8. Masi AC, Stewart CJ. Untangling human milk oligosaccharides and infant gut microbiome. iScience. 2022.
  9. Sjögren YM, Tomicic S, Lundberg A, et al. Influence of early gut microbiota on the maturation of childhood mucosal and systemic immune responses. Clin Exp Allergy. 2009.
  10. Strandwitz P. Neurotransmitter modulation by the gut microbiota. Brain Res. 2018.
  11. Carlson AL, Xia K, Azcarate-Peril MA, et al. Infant gut microbiome associated with cognitive development. Biol Psychiatry. 2018.
  12. Stokholm J, Blaser MJ, Thorsen J, et al. Maturation of the gut microbiome and risk of asthma in childhood. Nat Commun. 2018.
  13. Vatanen T, Kostic AD, d'Hennezel E, et al. Variation in microbiome LPS immunogenicity contributes to autoimmunity in humans. Cell. 2016.
  14. Le Huërou-Luron I, Blat S, Boudry G. Breast- v. formula-feeding: impacts on the digestive tract and immediate and long-term health effects. Nutr Res Rev. 2010.
  15. O'Sullivan A, Farver M, Smilowitz JT. The influence of early infant-feeding practices on the intestinal microbiome and body composition in infants. Nutr Metab Insights. 2015.
  16. Catassi C, Bonucci A, Coppa GV, et al. Intestinal permeability changes during the first month: effect of natural versus artificial feeding. J Pediatr Gastroenterol Nutr. 1995.
  17. Victora CG, Bahl R, Barros AJ, et al. Breastfeeding in the 21st century: epidemiology, mechanisms, and lifelong effect. Lancet. 2016.
  18. Rinne M, Kalliomäki M, Arvilommi H, et al. Effect of probiotics and breastfeeding on the bifidobacterium and lactobacillus/enterococcus microbiota and humoral immune responses. J Pediatr. 2005.
  19. Moretti E, Rakza T, Mestdagh B, Labreuche J, Turck D. The bowel movement characteristics of exclusively breastfed and exclusively formula fed infants differ during the first three months of life. Acta Paediatr. 2019.
  20. Pärnänen KMM, Hultman J, Markkanen M, et al. Early-life formula feeding is associated with infant gut microbiota alterations and an increased antibiotic resistance load. Am J Clin Nutr. 2022.
  21. Cabrera-Rubio R, Collado MC, Laitinen K, et al. The human milk microbiome changes over lactation and is shaped by maternal weight and mode of delivery. Am J Clin Nutr. 2012.
  22. Bermejo-Haro MY, Hernández-Peláez G, Álvarez-Peña IJ, et al. Coordination between Treg cells and Bifidobacterium in the immune-bacterial network of human colostrum. J Immunol Res. 2026.
  23. Nilsson JK, Walker SVM, Prescott SL, et al. Infant formula introduced within 24 hours of birth increases egg allergy risk. J Allergy Clin Immunol Pract. 2026.
  24. Harvey SM, Murphy VE, Whalen OM, et al. Breastfeeding and wheeze-related outcomes in high-risk infants: a systematic review and meta-analysis. Am J Clin Nutr. 2021.
  25. Toscano M, De Grandi R, Grossi E, Drago L. Role of the human breast milk-associated microbiota on the newborns' immune system: a mini review. Front Microbiol. 2017.
  26. Pérez-Cano FJ, Dong H, Yaqoob P. In vitro immunomodulatory activity of Lactobacillus fermentum CECT5716 and Lactobacillus salivarius CECT5713: two probiotic strains isolated from human breast milk. Immunobiology. 2010.
  27. Duijts L, Jaddoe VW, Hofman A, Moll HA. Prolonged and exclusive breastfeeding reduces the risk of infectious diseases in infancy. Pediatrics. 2010.
  28. Bosheva M, Tokodi I, Krasnow A, et al. Infant formula with a specific blend of five human milk oligosaccharides drives the gut microbiota development and improves gut maturation markers: a randomized controlled trial. Front Nutr. 2022.
  29. Chiang MC, Chen CL, Feng Y, et al. Lactobacillus rhamnosus sepsis associated with probiotic therapy in an extremely preterm infant: pathogenesis and a review for clinicians. J Microbiol Immunol Infect. 2021.

Found this useful? Share it with someone who needs it.

LinkedInWhatsAppEmail
Cite this article

Prevedoros, T. (2023, May 12). How breast milk vs formula shapes your baby’s gut microbiome. Gut Pathways. https://gutpathways.com/articles/breast-milk-formula-microbiome/

Portrait of Theodoros Prevedoros

Biochemist, MSc

Theodoros Prevedoros

I am a biochemist (MSc). Since 2007 I have worked alongside gastroenterologists, pediatricians, endocrinologists and other specialists, first as a scientific director and now as a scientific partner to medical practices. More about the author.

Cover of the book IBSyncrasy

IBSyncrasy

Not every IBS is the same. IBSyncrasy explains how the gut works, then walks through ten patterns that show why symptoms differ from person to person.

Get the book on Amazon

Recommended reading

All articles
Gut-brain axis11 min read

New biomarker links fibromyalgia and gut microbiome

What new studies show about fibromyalgia and the gut microbiome: neurofilament light chain as a blood marker of nerve strain, the routes from gut dysbiosis to…

Mike's case SIBONew cases, 20 min read

Gallbladder removal can lead to a fatty liver

Mike, 68, lost his gallbladder in 2014 and now has fatty liver, bloating, reflux and loose stools. His case explains the three links between the surgery…

Living with IBS? Take the 3-minute quiz and see which of the ten real cases in IBSyncrasy your story resembles most. Take the quiz

Read a free excerpt first

Leave your email to open the excerpt. You will also get occasional new articles. Unsubscribe any time.