If you have the occasional green stool—don't panic! Most likely it is normal, and there is a perfectly reasonable explanation. Think about the foods you ate, any vitamins or supplements you took—even if they're not green in color.
There can be many reasons why stool appears to be green. The first and most obvious reason is eating green foods. Green, leafy vegetables contain chlorophyll which could be coloring the stool green. Foods with dark purple coloring like Kool-Aid, popsicles, and gelatin (Jell-O) can also result in rainbow-colored stools. Iron supplements or even foods that are rich in iron can also give stool a green tinge.
Stool can also appear green for physical reasons, and not just from what you've been eating. We think of a healthy stool as being brown. Bile that is secreted in the first part of the small intestine is actually green. As stool is digested and passed through the large intestine it is turned into a darker brown color.
If stool is still green by the time it is excreted, it could mean that it went through the large intestine too fast to be changed in color. This is often called "rapid transit" or "decreased colonic transit time" and diarrhea that is green in color could be the result.
In breast-fed babies, green stool is a normal occurrence, especially right after delivery. In older children, the reason could be food-related as described above, or even from non-food items. Eating or sucking on colored non-food items such as crayons might also turn stools different colors.
If green stool continues, or your bowel habits have changed in other ways, you may want to call your doctor. This is especially true if you are experiencing diarrhea which can be an indication of other problems or could lead to dehydration.