HomeBlog › Medications That Cause Gas
Pharmacist's RxJune 10, 2026 · 10 min read · By Isaac Annan, RPh

6 common medications that cause gas and bloating — a pharmacist's insider guide

Every week for 22 years, someone has leaned over my pharmacy counter and quietly asked: “Is it normal that this makes me feel… bloated?” Almost always, the answer is yes — it's a known side effect nobody warned them about. Let's fix that.

Your doctor handed you a prescription, mentioned the headline side effects, and sent you on your way. Meanwhile your gut is staging a full rebellion and nobody told you why. This is the conversation I have at the counter more than almost any other — so here's the guide I wish came stapled to every prescription bag.

One rule before we start, and it's non-negotiable: don't stop any prescription medication on your own based on this article. Every drug below is on this list because it works — these are valuable, often life-changing medicines. The goal is managing the side effects, not abandoning the treatment. Talk to your doctor or pharmacist about anything here.

#1: Antibiotics — the gut bacteria apocalypse

Antibiotics are genuinely miraculous — and completely indiscriminate. They can't tell the E. coli causing your infection from the Bifidobacteria peacefully helping you digest breakfast. Broad-spectrum antibiotics like amoxicillin, ciprofloxacin, or clindamycin essentially drop a bomb on your microbiome: populations crash in days, and the chaos shows up as diarrhea (so common that “antibiotic-associated diarrhea” is an official medical term), gas, bloating, or sometimes constipation — the orchestra lost its conductors and nobody knows when to come in.

The serious version: when protective bacteria are wiped out, opportunists like C. difficile can move into the empty real estate and cause severe, genuinely dangerous diarrhea.

What helps: Only take antibiotics when truly needed (they do nothing for viral colds — you'd trash your microbiome for zero benefit). Consider specific probiotics — Lactobacillus species and Saccharomyces boulardii have the best evidence — taken at least two hours away from each antibiotic dose. After finishing the course, feed your recovering bacteria with varied fiber and fermented foods, and be patient: full recovery can take weeks to months. (My complete take on probiotics is here.)

#2: NSAIDs — the stomach irritators

Ibuprofen, naproxen, and their prescription cousins work by blocking COX enzymes that produce inflammatory prostaglandins. The catch: prostaglandins also protect your stomach lining by promoting mucus and moderating acid. Blocking them is like shutting off your home security system to save on electricity — technically it works, but you've created a new problem.

The fallout can include gastritis (irritated stomach lining), nausea, bloating, upper-abdominal pain, slowed motility — and with heavy long-term use, actual ulcers. NSAIDs can also temporarily increase intestinal permeability, a real phenomenon the wellness industry has aggressively rebranded (my honest take on “leaky gut” is here).

What helps: Never take NSAIDs on an empty stomach — even crackers help. Use the lowest effective dose for the shortest time. If you need them constantly, talk to your doctor about alternatives like acetaminophen or different pain strategies. And know the red flags: black, tarry stools, severe persistent stomach pain, or vomiting blood or what looks like coffee grounds means stop and get medical help immediately — those are signs of bleeding.

#3: PPIs — the acid blockers

Omeprazole, esomeprazole, lansoprazole, pantoprazole — superb for healing ulcers and taming severe GERD. But stomach acid exists for good reasons: it breaks down food, activates protein-digesting enzymes, and kills bacteria hiding in your meals. Suppress it long-term and things get weird: food arrives in your intestines less digested (more bacterial fermentation, more gas), bacterial overgrowth becomes more likely — including SIBO, small intestinal bacterial overgrowth, a notorious bloating machine — and absorption of B12, magnesium, calcium, and iron can suffer over months and years.

What helps: Use PPIs only as long as genuinely needed, at the lowest effective dose — many people can step down to every-other-day or as-needed use with their doctor's guidance. Address root causes of reflux where you can (late-night eating, trigger foods, weight around the middle). If you've been on one for years, ask about checking B12 and magnesium. And don't quit cold turkey after long-term use — rebound acid hypersecretion will make you temporarily worse. Taper with your doctor.

#4: Metformin — the diabetes workhorse

Metformin is the most prescribed type 2 diabetes medication for good reason: effective, decades of safety data, even heart and kidney benefits. It's also notorious for digestive side effects — up to 30% of people get diarrhea, especially in the first weeks, along with nausea, bloating, and gas, partly because it speeds gut motility and shifts how your intestines handle glucose.

What helps: Start low and titrate slowly (your doctor should anyway — ask for slower if you're struggling). Take it with your largest meal. Ask about extended-release metformin, which is absorbed gradually and causes noticeably fewer gut problems. And give it a fair month or two — many people's side effects fade as the body adapts. If they don't, there are alternatives; talk to your prescriber rather than quietly skipping doses.

#5: Iron supplements — the constipation culprit

If you're iron-deficient, supplementation can transform how you feel. It is also remarkably good at causing constipation, nausea, cramping, and bloating — iron is simply harsh on the digestive tract. And a warning I give constantly at the counter: iron turns your stool dark, sometimes nearly black. That's normal and harmless — but terrifying if nobody told you. (I've taken the panicked phone calls.)

What helps: Take iron with food if it wrecks your stomach (slightly less absorption, much better tolerability — you can't benefit from iron you can't keep down). Increase fiber and water deliberately. Ask your doctor about every-other-day dosing — recent research suggests it may absorb better with fewer side effects. If ferrous sulfate is brutal, gentler forms exist (ferrous gluconate, chelated iron). And don't take it forever — once your levels are replenished, your doctor should tell you when to stop.

#6: Opioids — the gut paralyzers

Opioid pain medications bind to receptors throughout your digestive tract and dramatically slow motility — so much that opioid-induced constipation has its own name and treatment guidelines. Stool sits, hardens, and fermentation gas builds behind it. Unlike most side effects, this one usually does not fade with time.

What helps: If you're prescribed opioids for more than a few days, be proactive from day one — fluids, fiber, movement as you're able, and ask your doctor or pharmacist about starting a gentle laxative preventively rather than waiting for misery. For longer-term opioid therapy, specific prescription treatments for opioid-induced constipation exist. This is a solved problem; nobody should suffer through it silently.

The golden rules (read this before changing anything)

  • Never stop or change a prescription on your own. There's almost always a fix: with food vs. without, timing changes, dose adjustments, extended-release versions, or alternatives.
  • Tell every provider everything you take — including over-the-counter drugs and supplements. Interactions hide in the gaps.
  • Your pharmacist is free. No appointment, no copay — just walk up and ask. Questions about digestive side effects are what we're standing there for.
Your medication and your comfort aren't enemies. Most digestive side effects have a management strategy — the tragedy is how many people suffer in silence because nobody told them to ask.

Quick answers (FAQ)

Why do antibiotics cause gas and diarrhea?

Antibiotics can't distinguish the bacteria causing your infection from the trillions of beneficial bacteria in your gut — they kill both. The population crash disrupts digestion, water absorption, and motility, commonly causing diarrhea, gas, and bloating. Taking specific probiotics at least two hours away from each antibiotic dose may reduce the risk, and your microbiome typically rebuilds over weeks with fiber and fermented foods.

Can I stop a medication that's causing bloating?

Never stop a prescription on your own — talk to your doctor or pharmacist first. There's almost always a better answer: taking it with food, adjusting the dose, switching to an extended-release form, changing the timing, or trying an alternative. Stopping some medications abruptly (like PPIs after long-term use) can actually make symptoms rebound worse.

Does metformin bloating go away?

Often, yes. Up to 30% of people get digestive side effects when starting metformin, but for many they improve substantially within the first month or two as the body adjusts. Taking it with your largest meal, titrating the dose slowly, or switching to the extended-release version all noticeably reduce symptoms — ask your prescriber.

Isaac Annan, RPh

Isaac Annan, RPh

Registered Pharmacist with 22+ years of clinical experience across long-term care and retail pharmacy. Author of From Chew to Phew and founder of Laughing Gut Media. Chapter 5 — “Medicine and Musical Side Effects” — is the full pharmacist's tour of how prescriptions affect your gut. Get it on Kindle.

Medical disclaimer: This article is for educational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. If you have a specific health condition, talk with your doctor or pharmacist before making significant changes. See our full medical disclaimer. Affiliate disclosure: Some links on this page (including links to Amazon) are affiliate links. As an Amazon Associate, Isaac Annan earns from qualifying purchases. This doesn't affect the price you pay and helps support free content like this article.