We include products we think are useful for our readers. If you buy through links on this page, we may earn a small commission. Here’s our process.

While normal stool is usually solid and brown, there can be many variations. Foamy or frothy stool is typically diarrhea-like and may appear to have bubbles in it. It may also seem oily or contain mucus.

A reaction to certain foods often causes foamy stool. If this is the case, it will be an isolated incident and resolve with time and hydration. Generally speaking, foamy stools can result from consuming more fat than the body can digest.

However, foamy stool can also signal an underlying medical condition. Read on to learn more about causes and treatments and when to see a doctor.

Washing hands thoroughlyShare on Pinterest
PeopleImages/Getty Images

The five most common causes of foamy stool include:

1. Malabsorption disorder

When the body cannot effectively absorb or use nutrients in food, this is known as malabsorption disorder.

One common malabsorption disorder is celiac disease. This involves a person having an autoimmune reaction to consuming gluten, leading to intestines becoming inflamed and other gastrointestinal symptoms such as changes in stools.

Dietary intolerances to other foods can cause similar symptoms. These foods include:

  • eggs
  • fructose
  • lactose
  • seafood
  • sugar alcohols, such as mannitol, sorbitol, and xylitol

A person may have foamy stool after eating a certain type of food. They may also feel bloated or nauseous.

2. Pancreatitis

Pancreatitis can be an acute or chronic condition. It can hinder a person’s ability to digest fats.

This condition can cause significant pain, especially in the upper abdominal region, and pain can spread to the back.

Causes of pancreatitis include gallstones, alcohol misuse, pancreatic cancer, or genetic disorders that affect the pancreas.

In addition to foamy stool, pancreatitis may also include the following symptoms:

Pancreatitis may require admission to a hospital for treatment.

3. Infection

A bacterial, parasitic, or viral infection in the gastrointestinal tract can create gas bubbles, making stool appear foamy.

A common source of infection is the Giardia parasite. Consuming contaminated water or food may result in infection. A person may also come into contact with contaminated water when swimming, for example.

Other symptoms of an infection include:

  • fatigue
  • gas
  • nausea
  • stomach cramping
  • unexplained weight loss

It can take anywhere from 2–6 weeks for symptoms of an infection to resolve.

4. Irritable bowel syndrome

People with irritable bowel syndrome (IBS) may have mucus in their stool, which can make the stool appear foamy.

Additional symptoms of IBS include:

5. Abdominal surgeries

Abdominal surgeries can affect digestion. These may include operations to remove a portion of the large or small intestine.

Surgeries may cause short bowel syndrome, which can lead to chronic diarrhea and foamy stool. This condition may be temporary and resolve once the body heals.

However, if a person has this syndrome in the long term, a doctor will usually recommend supplements to ensure that the individual receives adequate nutrition.

Frothy or foamy stool is especially common in babies and is not usually a cause for concern.

Foamy stool in babies is often a sign that they are getting an overload of lactose, a sugar found in breast milk.

Breast milk consists of two parts: foremilk and hindmilk. Foremilk comes out for several minutes as the baby begins to feed. The richer and thicker hindmilk then follows.

Foremilk has fewer nutrients than hindmilk, and if a baby is getting too much foremilk, they will not be able to digest lactose correctly, which may cause stool changes.

If a baby has foamy stool frequently, it may be a good idea to breastfeed for at least 20 minutes on one side before switching to the other. This will ensure that the baby is receiving enough hindmilk.

Treatments for foamy stool depend on the underlying cause.

A doctor may recommend eliminating foods that often cause intolerances. This can help determine whether one or more of these foods is responsible for the symptom.

If a doctor or dietitian diagnoses someone with IBS, they can also help develop a diet plan that will reduce the person’s symptoms. A person may want to avoid foods that commonly cause gas, as well as fried foods.

It may be helpful to keep a food diary to determine which foods lead to IBS symptoms.

For Giardia infections, a doctor will prescribe antibiotics and recommend drinking plenty of water and beverages with electrolytes to avoid dehydration from diarrhea.

A person can use electrolyte powder to make rehydrating drinks. Electrolyte powder is available for purchase online.

Healthcare professionals usually treat pancreatitis with intravenous fluids and pain medications. In some cases, antibiotics may be necessary. If a person has chronic pancreatitis, a doctor may recommend surgery, though this is rare.

If a person has foamy stool on more than two occasions, they should see a doctor.

Seek immediate medical attention if any of the symptoms below accompany foamy stool:

  • a temperature higher than 100.4°F (38°C)
  • bloody stool
  • dizziness
  • severe abdominal pain
  • severe diarrhea that occurs for more than 2 days

A doctor can evaluate a person’s symptoms and recommend tests to determine the underlying cause.

While foamy stool may be concerning, a change in diet may help reduce the amount of mucus causing the symptom.

If foamy stool is signaling a more serious condition, such as pancreatitis, a doctor can provide treatment and recommend methods for pain management and prevention.

Read this article in Spanish.