Metformin and the gut

Hussain Abdeh, Pharmacist
Written by Hussain Abdeh, MPharm Published 1 September 2026
Sonia Khan, Pharmacist
Medically reviewed by Sonia Khan, Pharmacist Last reviewed 1 September 2026

Metformin changes your gut. The tablets build up in the gut lining at far higher levels than in the blood, and a randomised trial has shown that metformin changes the mix of gut bacteria. Researchers now think part of its effect on blood sugar happens in the gut itself. The diarrhoea and nausea some people get are part of the same gut effect, usually settle, and are never a reason to stop taking the medicine. This guide covers what metformin does to your gut bacteria, why the side effects happen, and what a gut test can and cannot show.

What does metformin do to your gut?

Metformin is swallowed and absorbed slowly, so it spends a long time in the intestine on its way into the body. It builds up in the gut lining at far higher levels than in the blood. Its best-known action is on the liver, where it reduces the amount of glucose released into the blood, but a large share of what the drug does happens in the gut.

Researchers at the University of Dundee and Aston University set out metformin's actions on the gut in a 2016 review. Metformin changes how gut cells take up and use glucose. It raises levels of GLP-1, a gut hormone involved in blood sugar control. It alters the bile acids in the intestine, and it shifts the balance of gut bacteria.

The gut may be doing part of the drug's work on blood sugar. A delayed-release form of metformin stays almost entirely in the gut, with very little reaching the bloodstream, and in trials it still lowered blood glucose. That is hard to explain unless the gut itself contributes to the effect. The question is not fully answered, but researchers now treat the gut as a site of action in its own right.

Does metformin change your gut bacteria?

Yes. For most medicines, the evidence comes from comparing people who happen to take the drug with people who do not. Metformin has been tested more rigorously than that. In a double-blind study published in Nature Medicine, people with newly diagnosed type 2 diabetes were randomly assigned to metformin or a placebo for four months. The gut bacteria of the metformin group changed markedly. The placebo group's did not.

The same trial went a step further. The researchers transferred gut bacteria from the treated participants into mice, and the mice handled glucose better afterwards. That finding comes from animals. It cannot be assumed to happen in people. It is the main reason gut bacteria are now considered a serious candidate for part of how metformin works.

The changes begin quickly. In a small study of healthy volunteers who took metformin for a week, the variety of gut bacteria fell within a day of the first dose. Only a handful of people took part, and there was no placebo group. Larger studies are needed to confirm how fast the change happens.

A large analysis of human gut samples, published in Nature, looked at which bacteria change. People taking metformin carried more of the bacteria that produce short-chain fatty acids, the compounds gut bacteria make when they break down fibre. Those compounds may contribute to the drug's benefit. Metformin users also carried more bacteria from the Escherichia group, which includes E. coli.

Nobody can yet read a person's gut bacteria and predict how they will respond to metformin. A systematic review of the four most widely prescribed non-antibiotic drug groups, covering metformin alongside proton pump inhibitors, statins and anti-inflammatory painkillers, concluded that the bacterial signature of each drug is not yet fully described. Acid-reducing medicines shift gut bacteria too, which we cover in our guide to how proton pump inhibitors affect the gut microbiome, as do anti-inflammatory painkillers such as ibuprofen and naproxen.

Antibiotics remain the medicines with the biggest effect, and our guide to what antibiotics do to the gut microbiome covers how that damage happens and how long recovery takes. If you want to know what an altered balance of gut bacteria can look like day to day, we cover the signs of an imbalance in your gut bacteria separately.

Why does metformin cause diarrhoea and other gut side effects?

Around one in four people taking metformin get digestive side effects, most often diarrhoea, nausea, wind or stomach discomfort. Around one in twenty stop the drug because of them. Both figures come from a large study of Scottish GP records. Most people take metformin long term with no gut trouble at all.

The build-up of the drug in the gut explains part of it. Metformin sitting in the gut lining can irritate the intestine directly. The change in gut bacteria may add to that. The authors of the Nature analysis suggested that the rise in Escherichia could be behind the intestinal side effects, and in the volunteer study the rise was biggest in the people with the worst symptoms. These findings show an association. People with worse symptoms may differ in other ways. The studies cannot prove the bacteria caused the symptoms.

Inheritance plays a part too. Metformin is carried into cells by a transporter protein, and some people inherit gene versions that make the transporter work less well. In the Scottish study, people carrying two of those versions were about two and a half times more likely to be intolerant of metformin, probably because more of the drug stays in the gut. Some other common medicines block the same transporter and raise the risk further. Women and older people reported intolerance more often.

If loose stools are your main symptom, timing is a useful clue. Diarrhoea that started when you began metformin, or when the dose changed, points at the medicine. Diarrhoea that arrives with certain meals may have a different explanation, and we cover the possibilities in our guide to diarrhoea after eating. Diarrhoea appearing for the first time after years on a stable dose deserves the same attention as any other change in bowel habit. Either way, mention it to your GP or pharmacist rather than working it out alone.

Do the side effects settle down?

Usually, yes. Side effects cluster in the first weeks of treatment and after dose increases, and for most people they fade as the gut adjusts. A 2017 review of metformin intolerance describes the approach prescribers use to prevent them. Start at a low dose, increase slowly, and take the tablets with or just after meals. The NHS gives the same advice about taking metformin with food.

A rough first fortnight does not predict how you will get on at a steady dose. If symptoms persist, prescribers can slow the increases, revisit the dose, or offer modified-release metformin, which releases the drug gradually. In trials comparing the two forms at equal doses, the modified-release form roughly halved the rate of indigestion. Diarrhoea and nausea were much the same, and so was blood sugar control. Whether to switch is a decision for your GP or diabetes team. Do not change the dose, split it differently or pause the tablets yourself.

A 2026 review sets out the order clinicians work through when symptoms will not settle. The dose, the speed of increases, the formulation, whether the tablets are taken with meals, kidney function and other medicines are all checked before individual factors such as the state of the gut microbiome. The review repeats one message throughout. Stopping the drug is a last resort, not a first step.

Metformin and vitamin B12

Metformin's gut effects reach nutrient absorption too. Long-term use can lower vitamin B12, most likely because the drug reduces how well the vitamin is absorbed in the small intestine. The clearest evidence comes from a study that followed people on metformin or a placebo for more than a decade. After five years, low B12 was roughly twice as common in the metformin group, and each extra year on the drug nudged the risk up further. Nerve symptoms were more common in metformin users with low B12.

UK regulators have acted on this evidence. Since 2022, MHRA guidance has advised that people on metformin with symptoms of B12 deficiency have their levels checked, and that periodic checks are considered for people at higher risk. The symptoms include unusual tiredness, pins and needles, a sore or red tongue, and mouth ulcers. If they sound familiar, ask your GP about a blood test. Do not start a B12 supplement on your own. Taking one before the test can hide the blood changes a GP uses to find the deficiency.

Can a test show what metformin has done to your gut?

A stool test can show the make-up of your gut bacteria at the moment you take the sample. That includes how varied they are and the levels of the fibre-fermenting groups that both diabetes and metformin are known to influence. What it cannot do is separate cause from effect. The Nature analysis found that type 2 diabetes changes gut bacteria and metformin changes them again, partly in opposite directions. No test can tell you which of the two, or your diet, produced the picture it finds. A test does not diagnose anything, and it is not a way of monitoring diabetes or a medicine.

Within those limits, a snapshot has uses. If you have taken metformin for years and want a picture of your gut bacteria as they are now, a gut microbiome test measures a wide range of gut bacteria using a sample collected at home. The result gives a conversation with a clinician something concrete to start from. If your interest is the imbalance side of the picture, our page on gut microbiome testing for a gut imbalance explains what the results do and do not cover.

How can you look after your gut while taking metformin?

Metformin only works while it is taken as prescribed, so nothing here is a reason to stop it, reduce it or space out doses. If side effects are not settling, the plan gets adjusted by your GP or diabetes team, not at home. Within that:

  • Take the tablets with or just after a meal, never on an empty stomach. This is the single change most likely to calm metformin's stomach effects, and it is the NHS's own advice
  • Report side effects rather than quietly putting up with them. Slower dose increases and the modified-release form exist for exactly this problem, and prescribers use them
  • Ask your pharmacist to check any new medicine or supplement against what you already take, because some common drugs use the same transporter as metformin and can make gut side effects worse. That includes anti-diarrhoea remedies such as loperamide (Imodium). If you keep reaching for one because of diarrhoea you blame on metformin, ask the pharmacist first
  • Eat a wide mix of plant foods, which gives the fibre-fermenting bacteria that metformin appears to encourage something to work with. We cover the detail in our guide to the best foods for gut health. Discuss any larger dietary change with your diabetes team first, since food and diabetes care are closely linked
  • Mention persistent tiredness, pins and needles, or a sore tongue to your GP, with the B12 question in mind

When should you see a GP?

The symptom that matters most on metformin is fluid loss. Diarrhoea or vomiting that is persistent or severe needs advice the same day, because dehydration while on metformin can affect your kidneys. The NHS advises telling your doctor if you cannot keep fluids down. Alongside that, contact your GP, or NHS 111 when the surgery is closed, about:

  • Blood when you go to the toilet, or stools that look black and tarry
  • Unexplained weight loss
  • A change in bowel habit that has gone on for more than three weeks
  • Difficulty swallowing, or vomiting that keeps returning
  • Unusual tiredness, breathlessness or paleness, which can point to anaemia
  • Digestive symptoms appearing for the first time over the age of 50, or if bowel or ovarian cancer runs in your family

Lactic acidosis is a very rare but serious side effect of metformin. Call 999 or go to A&E if you have a combination of fast or deep breathing, severe drowsiness, muscle cramps with unusual tiredness, feeling cold, and a slow heartbeat. It is most likely during a severe illness with dehydration, which is another reason persistent vomiting or diarrhoea on metformin needs a same-day conversation with a clinician.

This guide is for information only and does not replace medical advice. Speak to your GP, diabetes team or pharmacist about your own treatment.

Sources

  • Dujic T, et al. (2015). Association of organic cation transporter 1 with intolerance to metformin in type 2 diabetes: a GoDARTS study. Diabetes. PubMed | DOI
  • McCreight LJ, Bailey CJ, Pearson ER (2016). Metformin and the gastrointestinal tract. Diabetologia. PubMed | DOI
  • Bonnet F, Scheen A (2017). Understanding and overcoming metformin gastrointestinal intolerance. Diabetes, Obesity and Metabolism. PubMed | DOI
  • Abrilla AA, Pajes ANNI, Jimeno CA (2021). Metformin extended-release versus metformin immediate-release for adults with type 2 diabetes mellitus: a systematic review and meta-analysis of randomized controlled trials. Diabetes Research and Clinical Practice. PubMed | DOI
  • Wu H, et al. (2017). Metformin alters the gut microbiome of individuals with treatment-naive type 2 diabetes, contributing to the therapeutic effects of the drug. Nature Medicine. PubMed | DOI
  • Forslund K, et al. (2015). Disentangling type 2 diabetes and metformin treatment signatures in the human gut microbiota. Nature. PubMed | DOI
  • Elbere I, et al. (2018). Association of metformin administration with gut microbiome dysbiosis in healthy volunteers. PLoS One. PubMed | DOI
  • Le Bastard Q, et al. (2021). Impact of non-antibiotic drugs on the human intestinal microbiome. Expert Review of Molecular Diagnostics. PubMed | DOI
  • Aroda VR, et al. (2016). Long-term metformin use and vitamin B12 deficiency in the Diabetes Prevention Program Outcomes Study. Journal of Clinical Endocrinology and Metabolism. PubMed | DOI
  • Chen S, Xu B, Lu M (2026). Metformin-associated gastrointestinal intolerance: a narrative review of mechanisms and clinical management. Clinical Medicine Insights: Endocrinology and Diabetes. PubMed | DOI
  • NHS. Metformin: side effects and how to take it. nhs.uk
  • MHRA Drug Safety Update (2022). Metformin and reduced vitamin B12 levels: new advice for monitoring patients at risk. gov.uk

Reading next