Diarrhea is most often caused by a viral infection that resolves on its own within a few days, but it can also result from something you ate, a medication you’re taking, or an underlying digestive condition. The cause usually depends on how suddenly it started and how long it’s been going on. Diarrhea lasting less than two weeks is considered acute, two to four weeks is persistent, and anything beyond four weeks is chronic.
Viral and Bacterial Infections
The most common reason for sudden diarrhea is a viral gut infection, sometimes called a “stomach bug.” Norovirus is the classic culprit, especially if you’ve been around other sick people, on a cruise, or in any group setting like a school or office. Rotavirus is more common in young children, particularly in daycare environments. These infections typically cause watery diarrhea, nausea, and sometimes vomiting, and they clear up within one to three days.
Bacterial infections tend to hit harder. Campylobacter often comes from undercooked poultry or raw dairy. Salmonella is linked to undercooked meat, poultry, and eggs. E. coli outbreaks are frequently tied to undercooked ground beef. Some bacterial toxins work fast: food contaminated with Staph aureus or Bacillus cereus (a common one in reheated fried rice) can trigger diarrhea within one to six hours of eating. If your symptoms started abruptly after a specific meal, food poisoning from a bacterial toxin is a strong possibility.
Parasites are less common but worth considering if diarrhea drags on for weeks. Giardia spreads through contaminated water, including streams, lakes, and swimming pools. Cryptosporidium is another waterborne parasite found in pools and daycares. These infections don’t resolve as quickly as viral ones and often need specific treatment.
Something You Ate or Drank
Not all food-related diarrhea involves infection. Certain foods and ingredients pull extra water into your intestines, overwhelming your body’s ability to absorb it. This is called osmotic diarrhea, and it stops once you stop eating the trigger.
Lactose intolerance is one of the most common dietary causes. If your body doesn’t produce enough of the enzyme that breaks down the sugar in milk, consuming dairy products like milk, cheese, ice cream, or yogurt can lead to cramping, gas, and diarrhea. This is especially common in people of East Asian, African, and Latino descent.
Sugar-free and “diet” products are another frequent offender. Artificial sweeteners like sorbitol, sucralose, and aspartame can be difficult for the gut to absorb. Sugar-free gum, diet sodas, and low-calorie snacks often contain enough of these sweeteners to trigger loose stools, especially if you consume them regularly or in larger amounts. Fructose, the natural sugar in fruit and honey, can also cause diarrhea when consumed in high quantities.
Medications That Cause Diarrhea
If your diarrhea started around the same time as a new medication, the drug itself may be the cause. Antibiotics are one of the most well-known triggers. They kill off beneficial gut bacteria along with harmful ones, disrupting the normal balance and often producing loose, watery stools. This can happen during treatment or shortly after finishing a course.
Several other common medications cause diarrhea as a side effect:
- Metformin, widely used for type 2 diabetes
- Heartburn and acid reflux drugs, including proton pump inhibitors like omeprazole and lansoprazole
- NSAIDs like ibuprofen and naproxen, used for pain and inflammation
- Magnesium-containing antacids, which draw water into the intestine
- Herbal teas and supplements containing senna or other natural laxatives
If you suspect a medication is the problem, don’t stop taking it without talking to your prescriber, but it’s worth bringing up at your next visit.
Chronic Conditions Behind Ongoing Diarrhea
When diarrhea keeps coming back or persists beyond four weeks, an underlying digestive condition is more likely.
Irritable bowel syndrome (IBS) is one of the most common causes of chronic diarrhea. It’s diagnosed when you’ve had recurrent abdominal pain at least one day per week for three months, with onset more than six months ago, and the pain is related to bowel movements or associated with changes in stool frequency or appearance. IBS doesn’t damage the intestines, but it can significantly affect daily life.
Inflammatory bowel disease (IBD), which includes Crohn’s disease and ulcerative colitis, involves actual inflammation and damage to the digestive tract. Unlike IBS, IBD often causes bloody stools, weight loss, and fatigue. A blood test measuring inflammation markers and a stool test measuring a protein called fecal calprotectin can help distinguish IBD from IBS. When both of those markers are low, the chance of IBD is less than 1%.
Celiac disease is an autoimmune reaction to gluten, a protein in wheat, barley, and rye. It damages the lining of the small intestine over time, leading to diarrhea, bloating, weight loss, and nutrient deficiencies. A blood test for specific antibodies is the first step in diagnosis, followed by a biopsy of the small intestine to confirm. If you’ve already been avoiding gluten on your own, genetic testing can help rule celiac disease in or out.
How Your Body Produces Diarrhea
Understanding the mechanism behind your symptoms can help you narrow down the cause. Diarrhea happens in a few distinct ways. Osmotic diarrhea occurs when something in your gut draws water in, like undigested lactose or artificial sweeteners. This type stops when you stop eating the trigger. Secretory diarrhea happens when the intestinal lining actively pumps fluid outward, driven by hormonal signals or toxins from bacteria. This type can continue even when you’re not eating. Inflammatory diarrhea results from damage to the intestinal wall itself, as in IBD or severe infections, and often includes blood or mucus in the stool.
Signs That Need Prompt Attention
Most diarrhea resolves on its own, but certain symptoms signal something more serious. You should talk to a doctor promptly if you notice:
- Duration: diarrhea lasting more than two days in adults, or more than one day in children
- Frequency: six or more loose stools per day
- Blood or pus in stool, or stools that are black and tarry
- High fever
- Severe abdominal or rectal pain
- Signs of dehydration: extreme thirst, dark urine, dizziness, urinating much less than usual, or skin that stays “tented” when you pinch it
In infants, watch for no wet diapers for three or more hours, no tears when crying, a sunken soft spot on the skull, or unusual drowsiness. Any fever in an infant with diarrhea warrants a call to the pediatrician.
Staying Hydrated While It Lasts
Whatever the cause, the most important thing you can do during a bout of diarrhea is replace lost fluids and electrolytes. Water alone isn’t enough because diarrhea also depletes sodium and potassium. Oral rehydration solutions, broth, and diluted fruit juice can help. Avoid caffeine, alcohol, and very sugary drinks, which can make things worse. Eating small, bland meals as tolerated is generally fine. The old advice to eat nothing until diarrhea stops isn’t supported by evidence; your intestines actually recover faster with some food moving through them.