Sometimes, you can’t help but notice that instead of brown poop, what you’ve just dumped into the toilet has a distinctly green twinge. It might even have a St. Patrick’s Day type of bright neon green color.

Seems alarming, but that might just mean you’re normal. To understand why green’s OK sometimes, you have to know why it’s typically brown. Normally, your liver helps you digest the fats you’ve eaten by producing a greenish fluid called bile. That fluid does many helpful things: It helps you break down fat for the rest of your body to absorb, it has anti-microbial properties, can neutralize acidity or pH for vitamin absorption and enzyme activity, and it keeps you regular.

Bile mixes with food and waste products to form stool in your large intestine. When things in your gut are working as they should, bacteria in your large intestine break down the bile through a process called oxidation, which helps turn the whole mixture brown.

When bile does not have time to be broken down, green happens. Some foods—like spicy foods, coffee, and alcohol—make your body fast-forward through the digestion process, so there’s not enough time for bile to be broken down. This may happen if you don’t usually consume these foods and drinks, or if you suddenly consume a large quantity of them. Most of the time, your body will adjust and slow digestion down accordingly so it can break down that bile. But not every time is “most of the time.” Your gut may not respond to these foods the same way each time, so don’t be alarmed by the occasional color change.

In addition to spicy foods, coffee, and alcohol speeding transit time, there are some other reasons your poop might be green:

  • Artificial coloring in candy or processed foods. But you’re not eating those, right?
  • A higher-than-usual volume of leafy greens. If you decided to change things and go all-in on greens like spinach or kale, or even green foods like kiwi, avocado, or cucumbers, you may have green poop until your digestive tract adjusts.
  • Diarrhea. Ingredients like senna, which can be found in digestive enzyme/probiotic/health products claiming to help you lose weight, will increase transit time and could affect the color of your stool.
  • You’re on antibiotics. Any antibiotics—maybe you’ve been taking them for bronchitis or a skin infection—can alter the microbiome and may also increase the speed of transit.
  • Food allergies or celiac disease. If you have these conditions, food may not be digested properly and may pass through your colon quickly.
  • Gallbladder surgery. The gallbladder usually stores bile, but without it, there is more bile in the GI tract that may not be broken down. People without a gallbladder may not always have green poop, but they’re more likely than the average person to have it be that color.

Some sources suggest that iron supplements or bismuth subsalicylate (Pepto-Bismol) could give you green poop, but those are more likely to make waste turn a dark color, not necessarily green.

If you experience an occasional green bowel movement—occasional being once every few weeks or month—it's probably okay, especially if you have a diet high in vegetables. However, if it's consistently green when you flush, you should consider seeing your doctor especially if your stools are liquid in consistency and are more frequent than your normal bowel habits. It could be a sign of a number of things, including carbohydrate enzyme deficiency, pancreatic disease, irritable bowel syndrome, or an infection. Best to get it checked out.

Chethan Ramprasad. M.D. is an internal medicine resident physician at NYU Langone.

Baha Moshiree M.D., is a gastroenterologist and internist and director of the Motility Program at the University of North Carolina in Charlotte, NC. She also works with the International Foundation for GI disorders patient advocacy groups.