The brown color of feces comes from stercobilin, a pigment produced when gut bacteria break down a component of old red blood cells. Your body destroys millions of red blood cells every day, and the waste products of that recycling process travel through your liver, into your intestines, and ultimately give stool its characteristic color.
From Red Blood Cells to Brown Pigment
Red blood cells live about 120 days before your body breaks them down and recycles their parts. When a red blood cell is retired, the iron-carrying molecule hemoglobin is dismantled. The iron gets saved for reuse, but the remaining ring-shaped structure, called heme, becomes waste that your body needs to dispose of. This disposal process is what eventually colors your stool.
Heme is first converted into biliverdin, a green pigment (this is the same compound that gives old bruises their greenish tint). Biliverdin is then quickly converted to bilirubin, which is yellow-orange. Your liver packages bilirubin and sends it into bile, the yellow-green digestive fluid that gets squirted into your small intestine to help digest fats. A healthy adult produces roughly 250 to 400 milligrams of bilirubin per day, with about 80% of it coming from hemoglobin breakdown.
Once bile reaches the lower small intestine and colon, bacteria get to work. They strip away the chemical packaging the liver added and reduce bilirubin into colorless compounds called urobilinogen and stercobilinogen. When these colorless molecules are exposed to oxygen, they oxidize into urobilin and stercobilin, both reddish-orange pigments. Stercobilin is the dominant one in feces and is responsible for the familiar brown color. A small portion of urobilinogen gets reabsorbed through the intestinal wall, filtered by the kidneys, and excreted as urobilin in urine, which is why urine is amber-yellow.
The Bacteria That Make It Happen
Without gut bacteria, bilirubin wouldn’t be converted into stercobilin at all. A 2023 study published in Nature Microbiology identified a specific enzyme, produced by intestinal bacteria, that performs the key step of reducing bilirubin to urobilinogen. The researchers found this enzyme primarily in species from a large group of gut bacteria called Firmicutes, including common human species like Faecalibacterium prausnitzii and Roseburia intestinalis, both well-known members of a healthy gut microbiome. Additional species of Clostridium and Ruminococcus were also confirmed to have this capability.
This bacterial step explains why newborn stool looks so different from adult stool. Babies are born with a sterile or nearly sterile gut. Their first bowel movements, called meconium, are almost black and tarry, consisting mainly of swallowed amniotic fluid, bile, and mucus. Over the first days and weeks, as bacteria colonize the intestines, stool transitions from dark green-black to olive green to a mustard yellow. Truly brown stools typically don’t appear until around six months of age, when the infant’s gut microbiome is mature enough to fully process bilirubin into stercobilin.
Why Stool Sometimes Isn’t Brown
Since brown color depends on bile reaching the intestines and bacteria having enough time to process it, anything that disrupts either step can change stool color.
- Green stool: Often means food moved through the colon too quickly, such as during a bout of diarrhea. Bile starts out yellow-green, and bacteria need time to convert it through the full chemical chain to brown. When transit is rapid, bile doesn’t get fully processed and the stool retains a greenish hue.
- Pale, clay-colored, or white stool: This signals that bile isn’t reaching the intestines at all. Without bilirubin delivery, there’s no raw material for bacteria to convert into stercobilin. The most common causes are blockages in the bile duct system: gallstones lodged in the common bile duct, strictures from scarring, or tumors in the pancreas or bile ducts that compress the drainage pathway. Liver diseases like hepatitis, drug-induced liver injury, or primary biliary cholangitis can also halt bile flow from the inside. Pale stool paired with dark urine and yellowing skin (jaundice) is a pattern that points strongly to a bile flow problem.
- Yellow stool: Can indicate excess fat that wasn’t properly absorbed, sometimes related to conditions affecting the pancreas or small intestine. In infants, yellow stool is completely normal.
Foods and Dyes That Override the Brown
Even when your bile pathway and gut bacteria are working perfectly, certain foods can temporarily overpower stercobilin’s brown pigment. Beets are the most well-known example. They contain a deep red pigment called betanin that can survive digestion, especially in people whose stomach acid isn’t strong enough to fully break it down. The result is stool (and sometimes urine) with a reddish or amber tint, a harmless phenomenon called beeturia. This effect comes from whole beets, not processed beet flavoring.
Other foods that can visibly alter stool color include blackberries, dragon fruit, and rhubarb, all of which can add reddish tones. Leafy greens in large quantities can push stool toward green. Artificial food dyes, particularly in brightly colored cereals, drinks, or candy, can produce stool in unexpected shades of blue, green, or even red. Iron supplements are another common culprit, often turning stool very dark green or black. These color changes are typically harmless and resolve within 48 hours of stopping the food in question.
How Much Pigment Leaves Your Body Daily
The amount of stercobilin-related pigment in stool varies quite a bit between individuals. Studies measuring fecal urobilinogen (the precursor to stercobilin) found that men excrete a median of about 101 milligrams per day, with a range of 57 to 200 milligrams. Women excrete less on average, with a median around 40 milligrams and a range of 8 to 150 milligrams. By comparison, only 1 to 4 milligrams of urobilinogen leaves the body through urine each day. The vast majority of this pigment pathway ends in the toilet, not the kidney.
These numbers reflect a continuous biological recycling operation. Your body is constantly destroying and rebuilding red blood cells, your liver is constantly packaging and excreting bilirubin, and your gut bacteria are constantly converting it into the pigments that make stool brown. It’s a collaboration between your blood, liver, bile ducts, and intestinal microbes, all working in sequence, every single day.

