What Causes Diarrhea? Bugs, Diet, and Medications

Diarrhea happens when your intestines can’t absorb enough water from the food passing through them, or when they actively push extra fluid into the stool. The causes range from a stomach bug that clears up in a day to chronic conditions that persist for months. Clinically, diarrhea lasting under two weeks is considered acute, two to four weeks is persistent, and anything beyond four weeks is chronic.

Viruses, Bacteria, and Food Poisoning

Infections are the most common cause of sudden-onset diarrhea. Viruses, specifically norovirus, rotavirus, and adenoviruses, are the primary culprits in both adults and children. These typically resolve on their own within a few days.

Bacterial infections tend to come from contaminated food or water, and their timing can help identify the source. Staphylococcus aureus toxins can trigger symptoms within 30 minutes to 8 hours of eating contaminated food, making it one of the fastest-acting causes. Salmonella typically hits within 8 to 72 hours. Campylobacter usually takes about three days. Shigella shows up within one to three days, while E. coli averages around three days but can take up to ten.

Some bacterial infections are more serious than others. E. coli strains that produce toxins (sometimes linked to undercooked beef or contaminated produce) can cause bloody diarrhea and, in rare cases, kidney damage. Salmonella that causes enteric (typhoid) fever has a much longer incubation period of 5 to 21 days and produces systemic illness beyond the gut.

How Your Gut Produces Loose Stool

Not all diarrhea works the same way inside your body. Understanding the two main mechanisms helps explain why different triggers produce different symptoms.

Osmotic diarrhea happens when something in your intestine draws water in. Poorly absorbed sugars, certain supplements, or undigested food particles pull fluid into the bowel like a sponge. This type of diarrhea stops when you stop eating the offending substance, which is why it improves with fasting.

Secretory diarrhea works differently. Here, something forces the intestinal lining to actively pump fluid outward. Bacterial toxins from cholera and certain E. coli strains are classic triggers. Certain hormone-producing tumors can also drive this process. The hallmark of secretory diarrhea is that it continues even when you’re not eating anything, because the problem isn’t what’s in the gut but what the gut lining itself is doing.

Medications That Disrupt the Gut

Antibiotics are among the most frequent medication-related causes. They work by killing bacteria, but they don’t distinguish between harmful bacteria and the beneficial ones living in your intestine. With those protective colonies disrupted, problematic bacteria can overgrow. In some cases, a bacterium called C. difficile takes over, causing severe, watery, and sometimes bloody diarrhea. This can begin during antibiotic treatment or up to two weeks after finishing a course.

Other common offenders include magnesium-containing antacids, metformin (widely used for diabetes), NSAIDs like ibuprofen and naproxen, acid-reducing medications used for heartburn and ulcers, chemotherapy drugs, and immune-suppressing medications. Herbal teas and supplements can also be responsible, particularly those containing senna or other natural laxatives that people may not realize they’re consuming.

Lactose, Fructose, and Food Intolerances

When your body can’t break down or absorb a specific sugar, that sugar travels intact into the colon, where it pulls water in through osmosis and gets fermented by gut bacteria. The result is diarrhea, bloating, gas, and cramping, often within a few hours of eating the trigger food.

Lactose intolerance is the most well-known example. People who produce too little of the enzyme that breaks down milk sugar will develop symptoms after consuming dairy. Fructose malabsorption works similarly: the sugar in fruit juice, honey, and many processed foods overwhelms the gut’s absorption capacity and draws excess water into the bowel. These intolerances are especially common in children with recurring abdominal pain, where juice and dairy are often the unrecognized culprits.

Sugar Alcohols and Artificial Sweeteners

Sugar alcohols, found in sugar-free gum, candy, protein bars, and “diet” products, are a surprisingly common and overlooked cause of diarrhea. Because your small intestine absorbs them slowly, they accumulate in the colon and pull water in through osmosis, exactly the way undigested sugars do.

The threshold varies by type. Sorbitol can trigger osmotic diarrhea at doses as low as 20 grams, roughly what you’d get from a handful of sugar-free candies. Maltitol is particularly potent: a 45-gram dose caused diarrhea in 85% of subjects in one study. Xylitol is generally tolerated in single doses of 10 to 30 grams, and your body can adapt to higher amounts over time. Isomalt tends to cause problems above 50 grams per day for adults and 25 grams for children.

Erythritol is the notable exception. Because of its smaller molecular size, most of it gets absorbed before reaching the colon. Adults can typically handle around 0.7 grams per kilogram of body weight (about 50 grams for a 150-pound person) without laxative effects. If you’re sensitive to sugar-free products, checking ingredient labels for sorbitol and maltitol first is a good starting point.

Chronic Conditions That Cause Ongoing Diarrhea

When diarrhea persists beyond four weeks, it usually points to an underlying condition rather than an infection or dietary trigger.

Irritable bowel syndrome (IBS) is one of the most common causes of chronic diarrhea. It does not cause inflammation or physical damage to the digestive tract, which is the critical distinction between IBS and more serious conditions. IBS is considered a disorder of gut-brain communication, and its symptoms stay confined to the GI tract.

Inflammatory bowel disease (IBD), which includes Crohn’s disease and ulcerative colitis, is fundamentally different. IBD is an autoimmune condition that causes physical damage to the digestive tract, often producing bloody stools, weight loss, fatigue, and symptoms beyond the gut like joint pain or skin problems. Different types of IBD can affect various parts of the digestive system, and the damage isn’t always limited to the intestinal lining.

Celiac disease occupies its own category. It’s triggered specifically by gluten, a protein found in wheat, barley, and rye. In people with celiac disease, gluten causes the immune system to attack the lining of the small intestine, impairing nutrient absorption and producing diarrhea, bloating, and often significant nutritional deficiencies. Unlike IBD, which involves complex genetic and environmental triggers, celiac disease has a clear dietary cause and responds to strict gluten elimination.

Warning Signs That Need Prompt Attention

Most acute diarrhea resolves on its own, but certain symptoms signal something more serious. Black, tarry stools or stools containing visible blood or pus warrant immediate medical evaluation. So do severe abdominal or rectal pain, high fever, frequent vomiting, or mental status changes like unusual irritability or lethargy.

Dehydration is the most dangerous complication, particularly in young children and older adults. Signs include extreme thirst, dark urine, dizziness, fatigue, and skin that stays tented when you pinch it rather than springing back flat. In infants, watch for no wet diapers for three or more hours, no tears when crying, sunken soft spots on the skull, or unusual drowsiness.

For adults, diarrhea lasting more than two days or producing six or more loose stools per day deserves a call to a doctor. For children, the threshold is lower: more than one day of diarrhea, any fever in infants, or refusal to eat or drink for more than a few hours.