What Causes Stool to Be Green? Diet, Bile, and More

Green stool is almost always caused by something you ate. The most common trigger is chlorophyll, the pigment in green vegetables, which passes through your digestive system and tints your stool on the way out. Less often, green poop signals that food is moving through your intestines faster than usual, giving bile pigments less time to break down from green to their typical brown.

Green Foods and Food Dyes

Spinach, kale, broccoli, avocados, herbs, pistachios, and matcha are all rich in chlorophyll. Eat enough of any of them and the green pigment will carry straight through to your stool, sometimes producing a surprisingly vivid color. This is completely harmless and resolves once the food clears your system, typically within a day or two.

Artificial food coloring is the other major dietary culprit. Bright frosting on cupcakes, candy, fruit snacks, freeze pops, and colored drinks can all turn stool green (or blue-green). The dye keeps tinting whatever it touches as it moves through your gut. If you recently ate something with intense coloring and your stool looks strange, that’s almost certainly the explanation.

Iron Supplements and Medications

Iron supplements frequently cause dark green stool that can look nearly black. This is normal and some physicians actually consider it a sign the supplement is being absorbed properly. If the color bothers you, lowering your dose with your doctor’s guidance will usually lighten things up.

Certain antibiotics can also turn stool green by disrupting the balance of bacteria in your gut. Those bacteria play a role in breaking down bile, which starts out green and gradually turns brown during normal digestion. When antibiotics reduce their numbers, bile passes through with more of its original green color intact.

How Bile Affects Stool Color

Your liver produces bile to help digest fats. Bile is initially a yellow-green color. As it travels through your intestines, bacteria chemically transform it into the brown pigment that gives stool its usual appearance. Anything that speeds up transit time, or anything that reduces the bacterial population doing that conversion, can leave your stool green.

This is why diarrhea so often comes with green stool regardless of the cause. When food and liquid rush through your intestines quickly, bile doesn’t have time to complete that color change. The faster the transit, the greener the result. A stomach bug, food poisoning, or even stress-related digestive upset can all produce green stool for this reason alone.

Infections and Digestive Conditions

Bacterial infections like salmonella and parasitic infections like giardia can cause green diarrhea because they dramatically speed up how fast material moves through the intestines. In these cases, green stool usually comes alongside other symptoms: cramping, nausea, fever, or watery diarrhea that lasts several days.

Conditions that affect how well your body absorbs nutrients can also play a role. When fats aren’t properly absorbed in the small intestine, bile acids pass into the colon in higher concentrations than normal. This can produce loose, discolored stools that may appear green or yellowish. People with chronic digestive conditions like celiac disease or irritable bowel syndrome sometimes notice this pattern.

Green Stool in Babies

Green poop in infants is extremely common and rarely a concern. Several baby-specific causes exist:

  • Switching breasts too early. If a baby doesn’t finish nursing on one side before being moved to the other, they may get more of the thinner, lower-fat milk at the start of a feeding and miss the higher-fat milk that comes later. This can affect digestion and produce green stool.
  • Specialty formulas. Protein hydrolysate formulas, used for babies with milk or soy allergies, commonly cause green poop.
  • Developing gut bacteria. Breastfed infants may not yet have the full complement of intestinal bacteria needed to convert bile to its brown form.
  • Diarrhea. Just like in adults, faster transit time in babies means greener stool.

How Long Green Stool Typically Lasts

If the cause is dietary, green stool usually clears up within one to three days once you stop eating the trigger food. Your digestive system processes and eliminates food on a roughly 24 to 72 hour cycle, so the color change is temporary by nature.

Green stool from an infection tends to last longer, often persisting for several days alongside diarrhea. The Mayo Clinic recommends contacting a healthcare professional if green stool continues for more than a few days, especially if it comes with diarrhea. Dehydration is the main risk with prolonged diarrhea, so staying on top of fluid intake matters more than the color itself. If you notice blood in your stool, persistent fever, or signs of dehydration like dizziness and dark urine, those warrant prompt attention regardless of stool color.