Why Is My Poop Green and My Stomach Hurts? Treatment

Green stool paired with stomach pain usually means food is moving through your digestive tract faster than normal, and the cause is often something you ate, a supplement you’re taking, or a mild infection. The good news: most cases resolve on their own within a day or two. Understanding what’s behind both symptoms helps you figure out whether you can manage things at home or need medical attention.

Why Stool Turns Green

Your liver produces bile, a yellow-green fluid that helps digest fats. As bile travels through your intestines, enzymes chemically alter it, gradually shifting its color from green to brown. That’s why normal stool is brown: the bile had enough transit time to fully break down.

When something speeds up digestion, whether it’s an infection, food intolerance, or stress, bile passes through too quickly and doesn’t complete that color change. The result is green stool, often loose or watery. This fast transit is also what causes the cramping and stomach pain: your intestinal muscles are contracting more aggressively than usual to push everything along.

Common Causes of Green Stool With Pain

Food and Supplements

Large amounts of green vegetables like spinach, kale, and broccoli contain chlorophyll, the pigment that makes plants green. Eat enough of it and the same pigment colors your stool. Avocados, matcha, herbs, and even pistachios can do the same thing. If you’ve recently eaten a particularly veggie-heavy meal, that’s likely your answer. Artificial food dyes, especially in brightly frosted baked goods or candy, can also tint stool green or other unusual shades.

Iron supplements are a frequent culprit. They can turn stool dark green or nearly black, and they’re well known for causing stomach cramps, nausea, and constipation or diarrhea. If you recently started an iron supplement and noticed both symptoms, the connection is almost certainly the iron. Antibiotics can also shift stool color to green or yellow by disrupting the balance of bacteria in your gut, which changes how bile gets processed.

Infections

Bacterial infections from Salmonella or E. coli can cause green diarrhea along with stomach cramps, and sometimes fever and nausea. These typically come from contaminated food or water. Viral stomach bugs work similarly: they inflame your intestinal lining, speed up transit, and produce green, watery stool with painful cramping. Most infections like these are self-limiting, meaning your body clears them within a few days without specific treatment.

Bile Acid Malabsorption

Normally, about 95% of bile acids are reabsorbed in the last section of your small intestine before reaching your colon. When that reabsorption process doesn’t work properly, excess bile acids spill into the large intestine. They irritate the colon lining, trigger it to secrete extra fluid, and speed up the muscle contractions that move stool along. The result is frequent, urgent, watery diarrhea with painful stomach cramps.

This can happen after gallbladder removal, with inflammatory bowel conditions, or as a standalone issue. A high-fat meal makes it worse because fat signals your liver to release more bile, which means even more bile acids reaching your colon. If your symptoms consistently worsen after fatty meals, bile acid malabsorption is worth investigating with a doctor.

How to Treat It at Home

If your symptoms are mild, meaning loose green stools with crampy (not severe) abdominal pain and no fever, home management is usually all you need.

Start with hydration. Diarrhea pulls water and electrolytes out of your body quickly, and dehydration can make stomach pain and fatigue worse. Water is fine, but adding an oral rehydration solution or broth helps replace lost sodium and potassium. Ease up on solid food for the first several hours if eating makes the cramping worse, then reintroduce bland, low-fiber foods like rice, toast, bananas, and plain chicken. Avoid dairy, greasy foods, caffeine, and alcohol until things settle, as all of these can worsen diarrhea and cramping.

If iron supplements are the likely cause, try taking them with a small amount of food rather than on an empty stomach. This can reduce both the stomach pain and the green color, though it may slightly reduce absorption. Switching to a different form of iron (like a liquid or lower-dose version) is another option worth discussing with your provider.

Over-the-Counter Medications

Two main options are available without a prescription: loperamide (sold as Imodium) and bismuth subsalicylate (Pepto-Bismol or Kaopectate). Loperamide slows intestinal contractions, which reduces both the frequency of diarrhea and the cramping. Bismuth subsalicylate coats the stomach lining and can help with nausea, cramping, and loose stools.

There’s an important caveat: if your symptoms are caused by a bacterial or parasitic infection, anti-diarrheal medications can actually make things worse. Diarrhea is your body’s way of flushing out the pathogen, and stopping that process can trap harmful bacteria inside. So if you have a fever, see blood or mucus in your stool, or recently ate something you suspect was contaminated, skip the anti-diarrheals.

Loperamide should not be given to children under 2 years old, and it can interact with antibiotics, blood thinners, and several other prescription medications. Bismuth subsalicylate contains a salicylate compound similar to aspirin, so avoid combining it with aspirin or aspirin-containing cold medicines. Note that bismuth subsalicylate can temporarily turn your stool black, which is harmless but can be alarming if you’re already monitoring stool color.

When These Symptoms Need Medical Attention

Green stool on its own is rarely a medical emergency. Combined with stomach pain, it still resolves on its own in most cases. But certain patterns signal something more serious:

  • Diarrhea lasting more than 2 days without improvement
  • Fever alongside the green stool and pain
  • Blood or mucus in your stool
  • Severe abdominal pain that feels sharp or constant rather than crampy and wave-like
  • Signs of dehydration like dizziness, dark urine, dry mouth, or rapid heartbeat
  • Unexplained weight loss or fatigue accompanying the color change over weeks

Sharp, steady abdominal pain is a particularly important distinction. Cramping that comes in waves is typical of diarrhea and fast transit. Pain that’s constant, localized, or severe enough that you can’t get comfortable points to something different, like appendicitis, a bowel obstruction, or gallbladder inflammation, and warrants prompt evaluation.

If your stool stays green for more than a few days after you’ve ruled out dietary causes, a stool sample can check for bacterial infections or parasites, and blood work or imaging can evaluate bile acid issues or other underlying conditions. For recurring green stools after gallbladder removal or with chronic digestive problems, treatment targeting bile acid malabsorption can significantly reduce symptoms.