Stomach pain and diarrhea: Causes and when to see a doctor

November 4, 2025 Providence Health Team

[6 MIN READ]

In this article:

  • Viruses and foodborne illnesses are common causes of stomach pain and diarrhea. However, stomach pain coupled with diarrhea can also stem from other causes, like food intolerances, stress and medication side effects.
  • Seek medical attention if your stomach pain and diarrhea are severe, or if they’re accompanied by other concerning symptoms, like blood in the stool, dehydration or a high fever.
  • At-home care for stomach pain and diarrhea includes staying hydrated, eating bland foods, using over-the-counter remedies carefully and getting plenty of rest.

Stomach pain and diarrhea: Causes and when to see a doctor

Diarrhea may be the body’s way of flushing out something harmful, but that doesn’t make it pleasant.

Most of the time, diarrhea is triggered by a virus, bacteria or mold, says Daniald Rodrigues, M.D., a gastroenterologist at the Providence Center for Digestive Health — Mission Viejo in Mission Viejo, California. 

“Basically, your body has detected and reacted to some type of toxin in the body that it’s trying to expel,” he says. 

Yet although most causes of stomach pain and diarrhea are benign, the two symptoms can sometimes indicate a more serious condition. Dr. Rodrigues outlines common causes of stomach pain with diarrhea, how to treat them at home and when it’s time to call the doctor.  

Common causes of stomach pain with diarrhea

The causes of stomach pain with diarrhea can range from viral and bacterial infections to conditions like irritable bowel syndrome (IBS), inflammatory bowel disease (IBD) and celiac disease, an autoimmune reaction to eating the protein gluten.

Understanding each potential culprit can help you determine whether you can treat your symptoms at home or if you should seek care.

Viral gastroenteritis (stomach flu)

One of the most common causes of stomach pain and diarrhea is viral gastroenteritis — often referred to as the stomach flu. It’s typically accompanied by vomiting, fever and dehydration.

Some of the viruses that cause viral gastroenteritis include: 

You can contract viral gastroenteritis by eating or drinking something that contains the virus, or by coming into close contact with someone who’s infected with it.

Food poisoning and foodborne illness

Foodborne illness refers to any illness that results from consuming contaminated food or water. Food poisoning is a specific type of foodborne illness. It develops when you ingest toxins produced by bacteria, viruses or other organisms that have spoiled food. Both can cause an upset stomach, diarrhea and vomiting.

Frequent food poisoning offenders include:

  • Fruits and vegetables
  • Raw or untreated milk, eggs and cheeses
  • Undercooked meats, poultry and seafood

Dietary triggers and food intolerances

Food allergies and intolerances can cause diarrhea, bloating and abdominal cramps — particularly after eating.

Some common food offenders include:

  • Eggs
  • Milk
  • Seafood
  • Soy

Certain carbohydrates can also cause diarrhea. Some of these include:

  • Fructose, commonly found in fruits like apples and grapes, and vegetables like asparagus
  • Lactose, typically found in dairy products and milk
  • Sucrose, naturally occurring in fruits, vegetables and some dairy products

Stress and anxiety-related digestive issues

If you’ve heard about the mind-gut connection, you know your mental health can impact your digestive system, leading to stomach pain and diarrhea. This link also helps explain why many people with IBS and other bowel problems, like frequent diarrhea or constipation, develop depression and anxiety.

When stomach pain and diarrhea may signal something serious

When symptoms are severe, persistent or accompanied by other concerning symptoms, like fever, blood in the stool or dehydration, it’s time to seek medical attention.

Providence offers same-day and urgent care appointments for your convenience. If you’re experiencing any of these symptoms, don’t wait to get checked out! 

Signs of severe dehydration

Severe dehydration is extremely serious — even deadly. And diarrhea that comes on suddenly and lasts for several hours is certainly a potential cause. It can cause a massive loss of the water and electrolytes the body needs to function. When you pair diarrhea with vomiting, the risk for severe dehydration rises.

You should call your doctor if you notice signs of severe dehydration, which include:

  • Decreased urination
  • Dizziness
  • Dry mouth
  • Excessive thirst
  • Headache

Inflammatory bowel conditions

If you have persistent stomach pain and diarrhea, especially accompanied by other symptoms like blood in the stool or weight loss, it can signal a serious inflammatory bowel condition like IBD. IBD is a chronic disease characterized by an inflamed gastrointestinal tract. Its two main forms are ulcerative colitis and Crohn’s disease.

Diarrhea that lasts longer than four weeks — combined with abdominal pain and cramping that comes and goes and ranges in severity — should prompt you to see your doctor. If left untreated, inflammatory bowel conditions can damage the intestines and cause significant complications.

Appendicitis and other surgical emergencies

Stomach pain and diarrhea can indicate appendicitis, which is an inflamed appendix that requires emergency surgery. They can also point to a bowel obstruction or peritonitis, which is an inflamed abdominal lining — both of which require immediate medical attention and, usually, emergency surgery.  

If you experience persistent, severe abdominal pain, especially with fever and vomiting, you should call your doctor or go to an urgent care center or emergency room right away.

Medication-related side effects

Some medicines, including certain antibiotics, antacids containing magnesium and those commonly used to treat cancer, can cause diarrhea as a side effect. Liquid medicines that contain sugar alcohols — like sorbitol, mannitol and xylitol — can also cause diarrhea in some people.

But sometimes diarrhea, when linked to medication use, can be a cause for concern. For instance, if you have diarrhea that lasts longer than a week, or diarrhea that’s particularly severe, you should ask your doctor if something more might be going on beyond a typical medication side effect.

Home care and self-treatment options

If you have a mild case of diarrhea with stomach pain, you can try to treat it yourself at home.

Staying hydrated: What to drink and avoid

Hydration is critical to avoiding dehydration with diarrhea, which can cause you to lose water and electrolytes. Reach for clear drinks, like water, broth or diluted fruit juice. Also, avoid caffeinated or carbonated drinks and alcohol. They can make diarrhea worse by irritating the digestive system further.

The BRAT diet and other gentle foods

For stomach pain and diarrhea, doctors often recommend the BRAT diet, which is a mix of bananas, rice, applesauce and toast. These foods are low in fiber and easy to digest.

Other bland options to consider include oatmeal and plain crackers. Just be sure to avoid fatty, fried or spicy foods, or foods high in fiber. Also, steer clear of dairy products, which can cause gas. That said, probiotics and probiotic-rich options, like yogurt, may help restore a healthy balance in the gut.

Over-the-counter medications: When they help and when to avoid

Some over-the-counter remedies may help reduce the frequency of diarrhea. For example, Imodium® slows the movement of food through the digestive tract, giving your body more time to absorb water and electrolytes from stool before passing it. Also, medications like Pepto-Bismol® and other antacids help to relieve stomach discomfort and reduce symptoms.

On the other hand, you should avoid medicines like ibuprofen and aspirin, which can irritate the stomach lining.

Rest and recovery strategies

Diarrhea can cause fatigue, so give your body time to recover. Limit your physical activity, get plenty of sleep and drink lots of water.

Prevention and long-term management

Good hygiene is vital to preventing a future bout of stomach flu or food poisoning.

Food safety and hygiene practices

To prevent foodborne illness, make sure the foods you eat are cooked to their recommended temperatures, and avoid eating expired or spoiled food. Also, wash your hands frequently with soap and water, especially after using the restroom and before handling food.

Managing chronic digestive conditions

If your diarrhea is chronic or severe, talk to your doctor about getting to the root cause, which could range from a food intolerance or sensitivity to IBD.

Stress management for digestive health

Finally, manage your stress. Exercising and practicing relaxation techniques, like meditation, can help soothe your mind — and your gut.

If you’re dealing with stomach pain and/or diarrhea and at-home remedies haven’t helped, it may be time to schedule an appointment with your doctor.

Contributing caregiver 

Daniald Rodrigues, M.D., is a gastroenterologist at the Providence Center for Digestive Health — Mission Viejo in Mission Viejo, California.

Find a doctor

If you are looking for a primary care provider or gastroenterologist, you can search for one who’s right for you in our provider directory. You can also find out more about our gastroenterology services.

Download the Providence app

It’s all in the app: easily stay connected with Providence and your health. With the Providence app, you can schedule appointments, have virtual visits from the comfort of your own home, get health recommendations personalized for you, access your health records and so much more. Learn more and download the app.

Related resources

Understanding your stomach pain: When to worry

Upper abdominal pain: Causes, symptoms and relief

When to see your doctor about lower abdominal pain

Left-side stomach pain 

Right-side stomach pain

Sharp stomach pain

Stomach pain after eating

This information is not intended as a substitute for professional medical care. Always follow your health care professional’s instructions.

About the Author

The Providence Health Team brings together caregivers from diverse backgrounds to bring you clinically-sound, data-driven advice to help you live your happiest and healthiest selves.

More Content by Providence Health Team

No Previous Articles

Next Article
Stomach pain after eating: Causes and when to see a doctor
Stomach pain after eating: Causes and when to see a doctor

Find expert guidance related to stomach pain after eating, including common causes, warning signs and when ...