What Could Cause Diarrhea? From Infections to IBS

Diarrhea has dozens of possible causes, ranging from something you ate a few hours ago to a chronic condition that needs long-term management. Most cases are acute, lasting 2 days to 2 weeks, and resolve on their own. When diarrhea persists for 2 to 4 weeks it’s classified as persistent, and anything beyond 4 weeks is considered chronic, which points to a different set of causes entirely.

Infections: The Most Common Short-Term Cause

Viruses are responsible for the majority of acute diarrhea cases. Norovirus and rotavirus spread easily through contaminated food, water, or surfaces and typically cause watery diarrhea along with nausea and vomiting that lasts a few days. These infections are especially common in group settings like schools, cruise ships, and daycare centers.

Bacterial infections tend to cause more intense symptoms. Salmonella infects the intestines and causes diarrhea, fever, and stomach cramps within 12 to 72 hours of exposure, usually through undercooked poultry, eggs, or contaminated produce. Most strains of E. coli are harmless residents of your gut, but certain strains produce a toxin that triggers severe diarrhea, sometimes with blood. Other common bacterial culprits include Campylobacter (often from undercooked chicken) and Clostridioides difficile, which frequently takes hold after antibiotic use disrupts the normal balance of gut bacteria.

Parasitic infections like Giardia and Cryptosporidium are less common but worth knowing about, particularly if you’ve traveled internationally or consumed untreated water. These tend to cause diarrhea that drags on longer than viral or bacterial infections, sometimes for weeks.

Food Intolerances and Malabsorption

If diarrhea shows up repeatedly after eating certain foods, a food intolerance is a likely explanation. Lactose intolerance is the most common example: your body lacks enough of the enzyme needed to break down the sugar in milk and dairy products. When that undigested lactose reaches your colon, bacteria ferment it, producing gas, bloating, and loose stools.

Fructose malabsorption works similarly. Fructose that isn’t fully absorbed in the small intestine passes into the colon, where bacteria break it down into gases and short-chain fatty acids. The gases cause bloating, and the fatty acids pull extra water into the bowel, producing watery or fatty stools. This can happen with fruit juice, honey, high-fructose corn syrup, or certain fruits eaten in large amounts.

Sugar alcohols like sorbitol and xylitol, common in sugar-free gum, candy, and protein bars, are another frequent trigger. Studies suggest that as little as 10 to 15 grams per day is the safe threshold, but many processed foods marketed as sugar-free contain amounts well above that. These sweeteners draw water into the intestines by osmosis, which is why even a modest handful of sugar-free candy can send you to the bathroom.

Medications That Cause Diarrhea

Medications are one of the most overlooked causes of diarrhea. Antibiotics are the classic offender. They kill the helpful bacteria in your gut that assist with digestion, which can lead to loose stools during or even after a course of treatment. This disruption also creates an opening for C. difficile infections, which can cause severe, persistent diarrhea.

Several other medication classes commonly cause diarrhea:

  • Metformin, widely prescribed for type 2 diabetes, causes diarrhea in a significant number of users, especially early in treatment.
  • SSRIs (a common type of antidepressant) affect serotonin levels in the gut as well as the brain, and diarrhea is a frequent side effect.
  • Antacids containing magnesium draw water into the intestines, which is why they can cause loose stools.
  • NSAIDs like ibuprofen and naproxen can irritate the digestive tract.
  • Chemotherapy drugs change how the body breaks down food, disrupting normal small intestine function.
  • Magnesium supplements at higher doses act as an osmotic laxative.

If diarrhea started shortly after beginning a new medication, that connection is worth discussing with whoever prescribed it. Adjusting the dose or switching to an alternative often resolves the problem.

Chronic Conditions Behind Ongoing Diarrhea

When diarrhea lasts beyond four weeks, the cause is usually something structural or autoimmune rather than an infection. Three conditions account for a large share of chronic diarrhea cases, and they’re often confused with each other.

Irritable bowel syndrome (IBS) is the most common functional gut disorder. The diarrhea-predominant form causes frequent loose stools, urgency, and cramping, but it does not cause inflammation or physical damage to the intestines. Symptoms tend to flare with stress, certain foods, or hormonal changes. IBS is a disorder of how the gut functions, not an autoimmune disease.

Inflammatory bowel disease (IBD), which includes Crohn’s disease and ulcerative colitis, is fundamentally different. IBD is an autoimmune condition that causes real, measurable inflammation and physical damage to the digestive tract. Unlike IBS, IBD can produce symptoms beyond the gut, including joint pain, skin problems, and fatigue. Crohn’s can affect any part of the digestive system, while ulcerative colitis is limited to the colon.

Celiac disease is an autoimmune reaction to gluten, a protein in wheat, barley, and rye. It damages the lining of the small intestine, reducing its ability to absorb nutrients. This leads to diarrhea, but also to weight loss, anemia, and bone thinning over time. Unlike IBD, celiac disease has a clear dietary trigger and is managed by eliminating gluten entirely.

Excess bile acids are another underrecognized cause of chronic watery diarrhea. When the small intestine doesn’t reabsorb bile properly, the excess spills into the colon and triggers active fluid secretion, producing urgent, watery stools, often right after meals.

Stress and the Gut-Brain Connection

Anxiety, acute stress, and chronic psychological pressure can all trigger diarrhea even in people without a diagnosed gut condition. The gut has its own extensive nervous system that communicates directly with the brain. When you’re stressed or anxious, signals from the brain speed up the contractions of your intestines, pushing food through faster than normal. Less time in the colon means less water is absorbed, and the result is loose or watery stools. This is why diarrhea before a job interview, exam, or flight is so common.

Post-Infection Bowel Changes

Some people develop ongoing digestive problems after a bout of food poisoning or stomach flu, even after the infection itself has cleared. This is called post-infectious IBS, and a large meta-analysis found it affects roughly 11.5% of people who’ve had acute gastroenteritis. Symptoms can include diarrhea, bloating, and abdominal discomfort that persist for months. The infection appears to change how the gut nerves and immune cells function, leaving the bowel more sensitive and reactive long after the original bug is gone.

How to Tell What’s Causing Yours

The timeline and pattern of your diarrhea are the most useful clues. Acute diarrhea that starts suddenly and comes with nausea, vomiting, or fever points to an infection or something you ate. Diarrhea that reliably follows dairy, wheat, or sugar-free products suggests an intolerance. Diarrhea that started after beginning a new medication has an obvious suspect.

Chronic diarrhea requires more detective work. Keeping a food and symptom diary for two to three weeks can reveal patterns you wouldn’t notice otherwise. Pay attention to whether symptoms improve on weekends or vacations (suggesting stress), worsen after specific meals (suggesting intolerance or bile acid issues), or come with blood, mucus, weight loss, or joint pain (suggesting IBD or celiac disease).

For adults, diarrhea that persists more than two days without improvement, produces bloody or black stools, or comes with a fever above 102°F warrants medical evaluation. Signs of dehydration, including excessive thirst, dark urine, dizziness, or very little urination, are also reasons to seek care promptly. For children, the timeline is shorter: diarrhea that doesn’t improve within 24 hours, no wet diaper for three or more hours, or unusual drowsiness all call for a doctor’s attention.