Diarrhea happens when your intestines push food through too quickly, absorb too little water, or both. The World Health Organization defines it as three or more loose or liquid stools per day. The causes range from a virus you picked up yesterday to a medication you’ve been taking for months, and understanding which one is behind your symptoms helps you figure out what to do about it.
Infections: The Most Common Cause
Germs are the single biggest reason people get diarrhea, especially when it comes on suddenly. Bacteria, viruses, and parasites all cause it, and they typically get into your system through contaminated food, water, or contact with an infected person.
Among bacteria, Salmonella and Campylobacter are the most frequent culprits. You pick them up from undercooked poultry, raw eggs, unpasteurized dairy, or contaminated produce. Among viruses, norovirus is the dominant player. It spreads incredibly easily through person-to-person contact, contaminated surfaces, and food handled by someone who’s infected. Rotavirus used to be a major threat to young children before widespread vaccination.
How quickly symptoms hit depends on the pathogen. Salmonella and norovirus both act fast, typically within 6 to 48 hours of exposure. Toxin-producing E. coli takes one to three days, while the more dangerous strain E. coli O157:H7 can take up to eight days. This timeline matters because it helps you trace what made you sick. If diarrhea started 12 hours after a restaurant meal, a virus or Salmonella is more likely than E. coli.
Food and Diet Triggers
Sometimes the problem isn’t a germ but something your body simply can’t digest well. Lactose intolerance is the classic example: your small intestine doesn’t produce enough of the enzyme needed to break down milk sugar, so it passes into the large intestine undigested. Bacteria there ferment it, producing gas, cramps, and loose stools. Fructose, the sugar naturally found in fruit and added to many processed foods, causes the same problem in people who absorb it poorly.
Sugar alcohols are another overlooked trigger. These are the sweeteners (sorbitol, mannitol, xylitol) used in sugar-free gum, candy, protein bars, and “diet” products. They pull water into the intestines, which is exactly what a laxative does. Studies suggest that 10 to 15 grams a day is the safe upper range, but many people blow past that without realizing it. The FDA actually requires products containing sorbitol or mannitol to carry a warning that excessive consumption can have a laxative effect.
Caffeine, alcohol, and spicy foods can also speed up gut motility enough to cause loose stools, especially in large amounts or on an empty stomach. High-fiber foods do the same if you ramp up your intake too quickly.
How Your Gut Produces Loose Stools
Regardless of the trigger, diarrhea boils down to three basic mechanisms happening inside your intestines. Understanding them helps explain why your symptoms look different depending on the cause.
Osmotic diarrhea occurs when something in your gut draws water in. Undigested lactose, sugar alcohols, and certain laxatives all do this. The extra water makes stools loose and watery. A hallmark of this type is that it stops when you stop eating the offending substance, like during fasting.
Secretory diarrhea happens when your intestinal lining actively pumps fluid into the gut. Bacterial toxins (like those from cholera or certain E. coli strains) trigger this. It produces large volumes of watery stool, often more than a liter per day, and it continues even if you stop eating. It can also wake you up at night, which osmotic diarrhea rarely does.
Motility-related diarrhea is the third type. Here, the muscles of your intestines contract too frequently or too forcefully, pushing food through before enough water can be absorbed. Stress, anxiety, caffeine, and conditions like irritable bowel syndrome all work this way.
Medications That Cause Diarrhea
Nearly all medications list diarrhea as a possible side effect, but certain drug classes are notorious for it. Antibiotics top the list. They kill harmful bacteria but also wipe out beneficial gut bacteria, disrupting the balance that keeps digestion running smoothly. This can happen during a course of antibiotics or in the weeks after finishing one.
Other common offenders include metformin (widely prescribed for type 2 diabetes), magnesium-containing antacids, proton pump inhibitors and other heartburn medications, NSAIDs like ibuprofen and naproxen, and chemotherapy drugs. Even herbal teas containing senna or other plant-based laxatives can cause it, as can high-dose magnesium or vitamin C supplements.
If diarrhea started shortly after beginning a new medication, that connection is worth noting. The fix is sometimes as simple as adjusting the dose or timing, but don’t stop a prescribed medication on your own.
Chronic Conditions Behind Ongoing Diarrhea
When diarrhea keeps coming back or never fully goes away, an underlying condition is usually involved. Irritable bowel syndrome (IBS) is one of the most common, affecting the way your gut muscles contract and how your brain and digestive system communicate. It tends to flare with stress, certain foods, or hormonal changes, and it doesn’t cause visible damage to the intestines.
Inflammatory bowel disease (IBD), which includes Crohn’s disease and ulcerative colitis, is a different story. These are autoimmune conditions where the immune system attacks the lining of the digestive tract, causing inflammation, ulcers, and chronic diarrhea that often contains blood or mucus. IBD is thought to result from a complex interaction between genetics and environmental triggers.
Celiac disease is another immune-driven condition, but this one has a clear trigger: gluten, the protein found in wheat, barley, and rye. When someone with celiac disease eats gluten, their immune system damages the lining of the small intestine, impairing nutrient absorption and causing diarrhea, bloating, and fatigue. All three of these conditions are chronic and require long-term management.
Stress and the Gut-Brain Connection
Your brain and your gut are in constant communication through a network of nerves, and emotional stress can directly speed up intestinal contractions. This is why anxiety before a big event, a stressful workday, or a period of grief can send you to the bathroom. The effect is real and physiological, not imagined. For people with IBS, this connection is amplified, and stress is one of the most reliable triggers for flare-ups.
Warning Signs That Need Attention
Most bouts of diarrhea resolve on their own within a day or two. But certain symptoms signal something more serious. Stools that are black, tarry, or contain visible blood or pus point to bleeding or infection in the digestive tract. A high fever alongside diarrhea suggests a bacterial infection that may need treatment. Six or more loose stools in a single day, severe abdominal pain, signs of dehydration (dark urine, dizziness, dry mouth), or a noticeable change in mental state like unusual irritability or low energy all warrant prompt attention.
For adults, diarrhea lasting more than two days without improvement is the general threshold for seeking help. For children, that window is shorter: one day. Infants under 12 months, premature babies, or children with other medical conditions need even faster evaluation, particularly if they’re refusing to drink fluids.