Stomach pain and diarrhea happening together usually point to one of a handful of causes: an infection, something you ate, a medication side effect, or an underlying digestive condition. Most cases are short-lived and resolve within a few days, but the combination can also signal something that needs medical attention, especially if symptoms are severe or persist beyond a week.
Viral and Bacterial Infections
Infections are the most common cause of sudden stomach pain with diarrhea. Viral gastroenteritis, often called the “stomach flu,” is the leading culprit, with norovirus and rotavirus responsible for most cases. Norovirus alone causes symptoms within 12 to 48 hours of exposure, bringing on watery diarrhea, vomiting, nausea, and stomach pain that typically lasts one to three days.
Bacterial infections tend to hit harder and last longer. Salmonella triggers diarrhea (sometimes bloody), fever, and stomach cramps anywhere from 6 hours to 6 days after eating contaminated food. Campylobacter takes 2 to 5 days to show up and often causes bloody diarrhea with fever. E. coli infections start 3 to 4 days after exposure and can cause severe stomach cramps with bloody diarrhea. Around 5 to 10% of people diagnosed with certain E. coli strains develop a serious kidney complication called hemolytic uremic syndrome.
Some bacteria work fast. Staph food poisoning can start within 30 minutes of eating contaminated food. Clostridium perfringens, common in improperly stored cooked meats, causes diarrhea and cramps within 6 to 24 hours but usually resolves in under a day.
Food Intolerances and Malabsorption
If your stomach pain and diarrhea keep returning without an obvious infection, a food intolerance is a likely explanation. Lactose intolerance is the most recognized form: your body can’t break down the sugar in dairy products, so it stays in your intestine and draws water into the gut. This creates what’s called osmotic diarrhea, where undigested substances pull fluid into the bowel, leading to loose, watery stools along with cramping, bloating, and gas.
Fructose causes the same problem in many people. It’s naturally present in fruits and honey but is also added to processed foods and drinks as high-fructose corn syrup. Sugar alcohols like sorbitol, mannitol, and xylitol, commonly found in sugar-free gum, candy, and protein bars, are another frequent trigger. Your gut simply can’t absorb them well, so they sit in the intestine and pull water in. If you notice symptoms after consuming these products, the connection is often straightforward.
Medications That Cause GI Distress
Several common medications can cause stomach pain and diarrhea as side effects. Antibiotics are the most well-known offenders. They work by killing bacteria, but they don’t distinguish between harmful bacteria and the beneficial ones living in your gut. This disruption allows other organisms to overgrow. In some cases, antibiotics trigger overgrowth of a bacterium called C. difficile, which can cause severe, watery, and sometimes bloody diarrhea.
NSAIDs like ibuprofen and naproxen irritate the stomach lining and can cause cramping and diarrhea, particularly with regular use. Magnesium-containing antacids, ironically taken for stomach discomfort, can also cause or worsen diarrhea. If your symptoms started around the same time as a new medication, that timing is worth noting.
IBS vs. Inflammatory Bowel Disease
When stomach pain and diarrhea become a recurring pattern over weeks or months, two conditions rise to the top of the list: irritable bowel syndrome (IBS) and inflammatory bowel disease (IBD). They sound similar but are fundamentally different.
IBS is a syndrome, meaning it’s defined by a cluster of symptoms rather than visible damage to the intestines. A colonoscopy in someone with IBS looks completely normal. The diagnostic criteria require abdominal pain or discomfort for at least 12 weeks over the past year, along with at least two of the following: pain that improves after a bowel movement, a change in how often you go, or a change in the consistency of your stool. IBS does not increase your risk of colon cancer or cause inflammation.
IBD, which includes Crohn’s disease and ulcerative colitis, is a disease that causes real, visible inflammation and can permanently damage the intestines. It shows up on imaging and during colonoscopy. Symptoms that set IBD apart from IBS include bloody stools, unexplained weight loss, anemia, and fever. IBD also raises the risk of colon cancer over time. If you’re experiencing those additional symptoms alongside chronic pain and diarrhea, that distinction matters for how aggressively it needs to be investigated.
Stress and the Gut-Brain Connection
Your gut and brain communicate constantly through a dense network of nerves, and psychological stress can directly trigger stomach pain and diarrhea. This is part of why IBS flares often coincide with periods of anxiety or high stress. The gut speeds up its contractions, fluid secretion increases, and the result is cramping with loose stools. This isn’t imaginary or “all in your head.” It’s a measurable physiological response where the brain signals the gut to change its behavior.
Staying Hydrated During an Episode
The biggest immediate risk from diarrhea isn’t the underlying cause. It’s dehydration. Your body loses water and electrolytes rapidly with each loose stool, and plain water alone doesn’t replace what’s lost. The World Health Organization’s oral rehydration formula works by maintaining a 1:1 ratio of sugar to sodium, which helps your intestine absorb water more efficiently. You can buy premade oral rehydration solutions at most pharmacies, or make a simple version at home with water, salt, and sugar.
Mild dehydration shows up as increased thirst, slightly darker urine, and a dry mouth. Moderate dehydration brings a noticeably faster heart rate, dry or cracking lips, sunken-looking eyes, and significantly reduced urination. Severe dehydration is a medical emergency: confusion, lethargy, skin that stays “tented” when pinched, and little to no urine output. In children, warning signs include no wet diaper for three or more hours, crying without tears, and unusual sleepiness or irritability.
Probiotics may help shorten a bout of diarrhea, particularly when it’s caused by antibiotics. A large meta-analysis found that probiotics reduced antibiotic-associated diarrhea by 52% and reduced the risk of acute diarrhea from various causes by 34%. The benefit was strongest in children, with a 57% reduction in risk compared to 26% in adults. Multiple strains appear to work, with no single strain proving significantly better than others in the available research.
Symptoms That Need Prompt Attention
Most episodes of stomach pain and diarrhea resolve on their own. But certain symptoms signal something more serious. Bloody or black stools suggest bleeding somewhere in the digestive tract. A fever above 102°F (39°C) points to a more aggressive infection. Severe abdominal pain that doesn’t let up, more than 10 bowel movements a day, or signs of dehydration like dizziness, dark urine, or excessive thirst all warrant medical evaluation rather than a wait-and-see approach. In children, the threshold is lower: diarrhea that doesn’t improve within 24 hours or any signs of dehydration should be assessed promptly.