What Gives You Diarrhea: Foods, Infections, and More

Diarrhea happens when your intestines can’t absorb water properly, or when they actively push extra fluid into stool. The triggers range from something you ate last night to an infection, a medication, or a chronic digestive condition. Most cases resolve on their own within a day or two, but knowing the cause helps you avoid it next time and tells you when something more serious is going on.

How Diarrhea Actually Works in Your Gut

Your intestines normally reabsorb most of the water that passes through them. Diarrhea happens when something disrupts that process, and there are four basic ways it can go wrong.

The first is osmotic pull. When your gut contains substances it can’t absorb well, like certain sugars or sugar alcohols, those molecules draw water into the intestine by osmosis. This is why sugar-free candy sweetened with sorbitol can send you to the bathroom. The second is active secretion, where something stimulates the intestinal lining to pump fluid outward. Cholera is the extreme example, but milder bacterial toxins do a version of this too.

The third mechanism is inflammation or damage to the intestinal wall. When the lining is compromised, fluid, mucus, and even blood can leak into the intestine. This is what happens in conditions like ulcerative colitis or certain bacterial infections. The fourth is a motility problem: food moves through too fast for water to be absorbed. Caffeine, stress, and some medications speed up gut contractions, which means looser, more frequent stools. Most real-world cases of diarrhea involve more than one of these mechanisms at once.

Infections: Viruses, Bacteria, and Parasites

Infections are the most common cause of sudden-onset diarrhea. Norovirus is the leading culprit in adults, spreading rapidly through contaminated food, surfaces, and close contact. Rotavirus is especially common in young children. Both tend to come on fast, with watery diarrhea, nausea, and sometimes vomiting, and typically run their course within one to three days.

Bacterial infections from Salmonella, Campylobacter, E. coli, and Shigella usually come from undercooked meat, contaminated produce, or unsafe water. These tend to cause more severe symptoms, sometimes including fever and bloody stool, and can last longer than viral infections. Parasites like Giardia and Cryptosporidium are less common but can cause diarrhea that drags on for weeks if untreated, often picked up from contaminated water sources during travel or outdoor recreation.

Food Poisoning vs. Stomach Bugs

The timing of your symptoms tells you a lot. Toxin-based food poisoning, like the kind caused by Staphylococcus bacteria growing in improperly stored food, hits fast. Symptoms typically start within 30 minutes to 8 hours of eating the contaminated meal. The toxin is already in the food, so your body reacts almost immediately.

Infections from bacteria like Salmonella, by contrast, take longer because the bacteria need time to multiply inside your gut. Symptoms usually appear 12 to 72 hours after exposure. If you got sick within a few hours of eating, it was likely a preformed toxin. If it took a day or two, an active infection is more probable.

Foods and Drinks That Trigger Loose Stools

Certain foods cause diarrhea not because they’re contaminated, but because your body can’t absorb them well. Lactose, the sugar in dairy products, is the classic example. If you don’t produce enough of the enzyme that breaks it down, undigested lactose pulls water into your intestine. An estimated 65 to 70 percent of the global population has some degree of lactose malabsorption after childhood.

Fructose, found in fruit juice, honey, and high-fructose corn syrup, works the same way when consumed in amounts that exceed your gut’s absorption capacity. Sugar alcohols like sorbitol, mannitol, and xylitol, common in sugar-free gum and candy, are poorly absorbed by design and are well-known offenders. Even a moderate amount can trigger osmotic diarrhea in sensitive people.

Caffeine speeds up contractions in the colon, which is why a strong coffee can send you to the bathroom. Alcohol irritates the gut lining and increases motility, particularly in large amounts. Spicy foods containing capsaicin can also accelerate transit time. High-fat meals slow stomach emptying but can trigger a strong contraction reflex in the colon, sometimes causing urgency shortly after eating. An elimination approach, cutting out suspected triggers one at a time, is often the most practical way to identify which foods are causing problems.

Medications That Cause Diarrhea

Antibiotics are one of the most common medication-related causes. They kill beneficial gut bacteria along with the harmful ones, disrupting the microbial balance that keeps digestion running smoothly. This can allow opportunistic bacteria to overgrow, sometimes leading to persistent or severe diarrhea even after the antibiotic course is finished.

Magnesium-based antacids and supplements draw water into the intestine through osmosis, producing loose stools at even moderate doses. Metformin, widely prescribed for type 2 diabetes, causes diarrhea in a significant percentage of people who take it, particularly early in treatment. Colchicine, used for gout, causes diarrhea in 5 to 10 percent of patients because it disrupts cellular processes across multiple organ systems, including the gut lining. If a medication you recently started correlates with new digestive symptoms, that’s worth flagging with your prescriber.

Chronic Conditions Behind Ongoing Diarrhea

When diarrhea keeps coming back or never fully resolves, an underlying condition is usually responsible. Irritable bowel syndrome with diarrhea (IBS-D) is one of the most common. It involves heightened gut sensitivity and motility changes, often worsened by stress, certain foods, or hormonal shifts. There’s no structural damage to the intestine, but the symptoms are real and disruptive.

Inflammatory bowel diseases, including Crohn’s disease and ulcerative colitis, involve chronic inflammation that damages the intestinal lining. This leads to exudative diarrhea, where fluid, mucus, and sometimes blood leak through the compromised wall. Celiac disease, an autoimmune reaction to gluten, damages the small intestine and impairs nutrient absorption, causing osmotic diarrhea along with bloating, fatigue, and weight loss.

Microscopic colitis is a lesser-known but surprisingly common cause of chronic watery diarrhea, especially in older adults. The colon looks completely normal during a colonoscopy, and it can only be diagnosed by examining a tissue sample under a microscope. Symptoms include watery diarrhea, cramping, weight loss, and nausea, and they tend to come and go over time.

Exercise, Stress, and Other Lifestyle Triggers

Runner’s diarrhea is a well-documented phenomenon. The physical jostling of organs, reduced blood flow to the intestines during exertion, hormonal shifts, and pre-race anxiety all contribute. Eating high-fat foods or consuming caffeine in the three to six hours before a run increases the risk. Dehydration during exercise makes it worse, though drinking warm fluids can also speed food through the digestive tract.

Psychological stress and anxiety activate the gut-brain connection, increasing intestinal contractions and fluid secretion. This is why you might experience loose stools before a job interview or during a high-pressure week. For people with IBS, stress is one of the most reliable triggers.

Recognizing Dehydration

The biggest immediate risk from diarrhea isn’t the diarrhea itself but the water and electrolytes you lose with it. If you’re thirsty, you’re already mildly dehydrated. Early signs in adults include headache, fatigue, dizziness, dry mouth, and dark-colored urine. In children, watch for dry lips and tongue, no tears when crying, fewer than six wet diapers per day in infants, and sunken eyes.

Oral rehydration is the standard approach. Water alone isn’t ideal because it doesn’t replace lost sodium and potassium. The World Health Organization’s oral rehydration formula uses a specific ratio of sodium and glucose to maximize fluid absorption in the small intestine. Store-bought electrolyte solutions follow similar principles. For mild cases, broth, diluted juice, and salty crackers alongside water can be enough.

Symptoms That Need Prompt Attention

Most diarrhea resolves without treatment, but certain signs indicate something more serious. In adults, seek care for diarrhea lasting more than two days, a high fever, six or more loose stools per day, severe abdominal or rectal pain, black or tarry stools, visible blood or pus in stool, or signs of significant dehydration. In infants, any fever alongside diarrhea warrants a call to the pediatrician, as does refusing to eat or drink for more than a few hours. For older children, diarrhea lasting more than a day or accompanied by high fever needs evaluation. Changes in mental state, like unusual irritability or lack of energy in a child, are particularly important to act on quickly.