How Do You Get Diarrhea? Infections, Food & More

Diarrhea happens when your intestines either absorb too little water or secrete too much of it, leaving you with loose, watery stools. The causes range from a stomach bug that clears up in a day to chronic conditions that persist for weeks. Understanding what triggers it helps you figure out whether you’re dealing with something routine or something that needs attention.

What Happens Inside Your Gut

Your small intestine normally absorbs far more fluid than it secretes. Diarrhea occurs when that balance tips in the wrong direction. There are two basic ways this happens.

In secretory diarrhea, something forces your intestinal lining to pump extra water and salts into the gut. Bacterial toxins are the most common trigger. Cholera is the extreme example: the toxin ramps up a chemical signal inside intestinal cells that drives massive fluid secretion. The same basic mechanism happens with food poisoning from staph or certain strains of E. coli, just on a smaller scale.

In osmotic diarrhea, something sitting in your gut pulls water in like a sponge. This happens when you eat or drink something your body can’t fully absorb. Lactose in people who are lactose intolerant is a classic example. Sugar alcohols in sugar-free candy and gum do the same thing. So does magnesium, which is why milk of magnesia works as a laxative.

Infections: The Most Common Cause

Most acute diarrhea is caused by an infection, whether viral, bacterial, or parasitic. These germs typically enter your body through what epidemiologists call the fecal-oral route: microscopic traces of infected stool reach your mouth via contaminated food, water, unwashed hands, or shared surfaces like doorknobs and utensils.

Viruses are the leading culprits. Norovirus is notorious for tearing through cruise ships, schools, and restaurants. Rotavirus is a major cause in young children. Both spread easily from person to person and through contaminated surfaces. Symptoms usually hit 24 to 48 hours after exposure.

Bacterial infections tend to come from contaminated food. Salmonella is linked to undercooked poultry and eggs, with symptoms appearing anywhere from 6 to 48 hours after eating. Campylobacter comes from poultry and unpasteurized milk. Shigella spreads through close contact and poor hand hygiene, typically causing symptoms after two to four days. E. coli strains associated with serious illness (like O157:H7) usually take three to four days to produce symptoms.

Parasites like Giardia and Cryptosporidium have longer incubation periods, often around a week. They’re commonly picked up from contaminated water, including untreated streams and lakes, and can cause diarrhea that drags on for weeks if untreated.

How Quickly Symptoms Start

The gap between swallowing a pathogen and feeling sick varies widely, and that timing can help identify the cause. Staph toxin works fast, producing nausea, vomiting, and diarrhea within two to four hours. That’s because the toxin is already formed in the food before you eat it. Clostridium perfringens, common in buffet-style meals that sit out too long, typically hits within 6 to 24 hours.

Most bacterial and viral infections cause symptoms within one to three days. Parasitic infections are slower, often taking a full week. If you got sick within hours of a meal, food poisoning from a preformed toxin is the likely explanation. If symptoms appeared days later, a bacterial or viral infection is more probable.

Food and Drink Triggers

Not all diarrhea involves an infection. Certain foods and drinks pull excess water into the intestines or speed up gut motility. Coffee stimulates contractions in the colon. Alcohol irritates the gut lining and impairs water absorption. Fructose, found naturally in fruit juice and honey, can overwhelm your small intestine’s ability to absorb it, especially in large amounts.

Dairy products cause diarrhea in people who lack enough lactase, the enzyme that breaks down milk sugar. Roughly 68% of the world’s population has some degree of lactose malabsorption. Artificial sweeteners like sorbitol and mannitol are poorly absorbed by everyone, which is why eating a handful of sugar-free gummy bears is a well-known recipe for watery stools.

Medications That Cause Diarrhea

Nearly all antibiotics can cause diarrhea by disrupting the normal balance of bacteria in your gut. The classes most often responsible include penicillins, cephalosporins, fluoroquinolones, clindamycin, and macrolides. Antibiotic-associated diarrhea is usually mild and resolves once you finish the course, but in some cases the disruption allows a harmful bacterium called C. difficile to take over, causing severe, persistent diarrhea that needs its own treatment.

Beyond antibiotics, magnesium-containing antacids, certain blood pressure medications, cancer drugs, and high-dose vitamin C supplements can all trigger loose stools. If diarrhea started shortly after beginning a new medication, that connection is worth flagging.

Traveler’s Diarrhea

Traveling to regions with less reliable water treatment and food handling significantly raises your risk. Enterotoxigenic E. coli (ETEC) is the single most common cause of traveler’s diarrhea, typically spread through contaminated food and water. Campylobacter, Salmonella, and Shigella are also frequent offenders.

The foods most likely to be contaminated include raw or undercooked poultry, unpasteurized dairy, raw seafood, and fresh produce washed in untreated water. Ice made from tap water carries the same risk as the water itself. Street food served piping hot is generally safer than a hotel buffet salad that’s been sitting at room temperature.

Chronic Diarrhea and Ongoing Conditions

When diarrhea persists beyond two to four weeks, it’s considered chronic, and the list of possible causes shifts. Irritable bowel syndrome (IBS) is the most common functional cause, meaning the gut looks structurally normal but doesn’t work properly. The diarrhea-predominant form of IBS tends to improve at night and during fasting, which distinguishes it from more serious conditions.

Inflammatory bowel disease, which includes Crohn’s disease and ulcerative colitis, involves actual damage to the intestinal lining. This can cause bloody diarrhea, weight loss, and fatigue. Celiac disease, an immune reaction to gluten, damages the small intestine and impairs nutrient absorption, often producing chronic loose stools along with bloating and fatigue. Microscopic colitis, more common in older adults, causes watery diarrhea even though the colon looks normal on a standard colonoscopy. It shares genetic overlap with celiac disease and inflammatory bowel disease, and people with one of these conditions face a higher risk of developing another.

Bile acid malabsorption is another underrecognized cause. When your body fails to reabsorb bile acids in the small intestine, they reach the colon and trigger fluid secretion. This is especially common after gallbladder removal.

Signs That Need Medical Attention

Most diarrhea resolves on its own within a few days. The real danger is dehydration, particularly in children, older adults, and people with weakened immune systems. Warning signs of dehydration include excessive thirst, dry mouth, little or no urination, dark-colored urine, dizziness, and severe weakness.

For adults, diarrhea lasting more than two days without improvement, a fever above 102°F (39°C), blood or black color in the stool, or severe abdominal pain all warrant medical evaluation. For children, the threshold is lower: seek care if diarrhea hasn’t improved in 24 hours, if the child hasn’t had a wet diaper in three or more hours, or if you notice sunken eyes, a dry tongue, or skin that stays pinched when you press it. Severe diarrhea, defined as more than 10 bowel movements a day or fluid losses far exceeding what you can drink, can become life-threatening without treatment.