Why Did I Have Diarrhea? Food, Bugs, and Stress

A single episode of diarrhea almost always traces back to something you ate, a virus you picked up, stress, or a medication you’re taking. Most cases resolve on their own within a few days and never happen again. Figuring out what triggered yours comes down to timing, what else you were feeling, and whether it keeps coming back.

Something You Ate

Food is the most common culprit behind a sudden bout of diarrhea, and the timing of your symptoms can help you narrow down what went wrong. Staph toxins from improperly stored food hit fast, sometimes within 2 to 4 hours. Norovirus, the classic “stomach bug” often picked up from contaminated food or surfaces, takes 12 to 48 hours to cause symptoms. Salmonella typically shows up 6 to 48 hours after exposure, while Campylobacter can take 2 to 5 days. If you’re trying to trace the meal that got you, think further back than your last one.

Not all food-related diarrhea comes from germs. Certain ingredients pull water into your intestines the same way a laxative does. Sugar alcohols like sorbitol, commonly found in sugar-free candy, gum, and protein bars, are a well-documented trigger. As little as 10 grams of sorbitol can cause bloating and gas, and 20 grams reliably causes cramping and diarrhea in most people. A few pieces of sugar-free candy can easily reach that threshold. Fructose in fruit juice and high-fructose corn syrup can do the same thing in people who absorb it poorly.

Lactose intolerance is another frequent explanation. If your body doesn’t produce enough of the enzyme that breaks down milk sugar, dairy products will send water rushing into your gut. The result is bloating, cramping, and loose stools, usually within a couple of hours of eating ice cream, milk, or soft cheese.

A Virus or Stomach Bug

Viral gastroenteritis is the single most common infectious cause of diarrhea in adults. Norovirus spreads easily in restaurants, cruise ships, offices, and households. It tends to come on suddenly with nausea, vomiting, watery diarrhea, and sometimes a low fever. The worst of it passes in 1 to 3 days. Rotavirus is the leading cause in young children, though adults can catch it too.

Bacterial infections from contaminated food or water, including Salmonella, E. coli, and Shigella, often produce more intense symptoms: higher fevers, abdominal cramps, and sometimes bloody stool. Parasites like Giardia and Cryptosporidium have longer incubation periods (around a week on average) and can cause diarrhea that drags on for weeks if untreated. These are more common after travel or exposure to untreated water.

Medications You’re Taking

Antibiotics are one of the most reliable triggers of diarrhea. They kill off beneficial bacteria in your gut alongside the ones causing your infection, which lets opportunistic organisms overgrow. In some cases, this leads to a serious overgrowth of a bacterium called C. difficile, which causes severe, watery, and sometimes bloody diarrhea. Antibiotic-related diarrhea can start during treatment or even a few weeks after finishing a course.

Other common medication triggers include metformin (widely prescribed for diabetes), ibuprofen and naproxen, magnesium-containing antacids, and chemotherapy drugs. Proton pump inhibitors used for heartburn can occasionally cause it too. Even herbal teas containing senna act as natural laxatives. If your diarrhea started around the same time as a new medication or supplement, that connection is worth investigating.

Stress and Anxiety

Your gut and brain are in constant communication. During a stress response, your nervous system redirects blood flow away from your digestive tract and toward your heart, lungs, and muscles. At the same time, stress stimulates your large intestine, speeding up contractions and creating that urgent need to find a bathroom. This is why diarrhea before a job interview, exam, or flight is so common. It’s a real physiological response, not something you’re imagining.

For people with irritable bowel syndrome, this gut-brain connection is amplified. Stress doesn’t just trigger occasional loose stools; it can set off prolonged flares of diarrhea, cramping, and bloating. If you notice a clear pattern between stressful events and digestive problems, IBS may be part of the picture.

How Long Is Too Long

Acute diarrhea lasts less than a week and accounts for the vast majority of cases. If yours cleared up within a day or two, it was likely a mild food reaction, a short-lived virus, or a stress response. Persistent diarrhea lasts between 2 and 4 weeks. Anything lasting 4 weeks or more is considered chronic and points toward conditions like IBS, inflammatory bowel disease, celiac disease, or ongoing food intolerances that need evaluation.

One pattern that catches people off guard: post-infectious IBS. After a bout of food poisoning or gastroenteritis, some people develop recurring diarrhea, bloating, and cramping that persists long after the original infection has cleared. This can last for years. About half of cases resolve on their own within six to eight years, but it can be frustrating when the original bug is gone and your gut still isn’t right.

Signs That Need Attention

Most diarrhea is uncomfortable but harmless. A few red flags signal something more serious:

  • Blood or pus in your stool, or stools that are black and tarry
  • High fever alongside diarrhea
  • Six or more loose stools per day
  • Signs of dehydration: extreme thirst, dark urine, dizziness, urinating much less than usual, or skin that stays pinched when you pull it up

In infants and young children, watch for no wet diapers for 3 hours or more, no tears when crying, sunken eyes, or unusual drowsiness. Any fever in an infant with diarrhea warrants prompt attention.

Recovering Faster

Dehydration is the main risk with diarrhea, not the diarrhea itself. Plain water replaces fluid but not the electrolytes you’re losing. The World Health Organization’s oral rehydration formula is simple: about 4 cups of water, half a teaspoon of salt, and 2 tablespoons of sugar. The sugar isn’t just for taste; it helps your intestines absorb the salt and water more efficiently. Commercial electrolyte drinks work too, though many contain more sugar than necessary.

While your gut is recovering, bland foods like rice, bananas, toast, and broth are easier to tolerate. Dairy, fatty foods, caffeine, and alcohol tend to make things worse. Most acute episodes resolve within a few days without any specific treatment. If yours happened once and passed, it was likely one of the triggers above, and knowing which one can help you avoid a repeat.