Some infections are common.
Stomach Flu
Gastroenteritis, also called the stomach flu, can cause foamy diarrhea.
This happens when infection in the gastrointestinal tract leads to gas bubbles that are passed along with loose stools.

Calvin Chan Wai Meng / Getty Images
Viral and bacterial gastroenteritis can be prevented with good hygiene practices like hand washing.
Cooking food to a safe internal temperature and taking steps to prevent cross-contamination can preventfoodborne illness.
Steatorrhea and Malabsorption
Steatorrheadescribes an increased amount of fat or mucus passed in the stool.
Steatorrhea is a key symptom of fatmalabsorption, which means the body does not fully absorb certain fats.
Irritable Bowel Syndrome
Irritable bowel syndrome (IBS)is a common disorder of the gastrointestinal system.
Symptoms typically include abdominal pain and discomfort, gas, bloating, and constipation and/or diarrhea.
Psychological factors like stress and anxiety may also contribute to this condition.
An IBS diagnosis is usually made based on your symptoms and medical history after other conditions are excluded.
Does Healthy Poop Float or Sink?
Some people may find their poop floats while others notice their poop sinks.
It can also be due to the nursing parent switching from one breast to the other during a feed.
In babies, foamy poop can be related to nursing and lactation.
Treatment specific to the cause of your foamy stools will alleviate most gastrointestinal symptoms.
Penn Medicine.The scoop on poop: what does your poop say about your health?
Centers for Disease Control and Prevention.Giardia.
Loma Linda University.Exocrine pancreatic insufficiency (EPI).
Stanford Medicine Children’s Health.Cystic fibrosis and the digestive system.
The National Pancreas Foundation.Chronic pancreatitis causes and symptoms.
National Institute of Diabetes and Digestive and Kidney Diseases.Definition & facts for celiac disease.
NHS.Overview - celiac disease.
2017;152(5):1055-1067.e3.
National Institute of Diabetes and Digestive and Kidney Diseases.Treatment for celiac disease.
NHS.Treatment - chronic pancreatitis.