Skip to main content

Tips to help get rid of a stomachache

When the ache won’t stop, here’s what to know, what to try and when to see a health care provider.

Published: December 20, 2023 |11 minute read

Written by: Lauren Arcuri

Illustration of a torso wearing a shirt with a sad face on it as the person holds their stomach in pain.

We’ve likely all been there: You’re somewhere important, doing something fun or just relaxing at home when stomach pain strikes.

Maybe it’s something you ate, or maybe it’s something more serious. In fact, around 60 to 70 million people in the United States live with a digestive disease.1 Whatever the cause, stomachaches can be disruptive, inconvenient and uncomfortable to your day-to-day life.

If this rings true for you, read on! This article will cover what you need to know about common stomachache causes as well as provide information about treatment and managing symptoms. And remember, when it comes to digestion, it’s not all about gut instincts, so we’ll explain when to see a health care provider, as well. 

In this article:

Why does my stomach hurt? 

The word “stomachache” can refer to several things, including diarrhea, gas pain, nausea and vomiting.

“Stomachaches can have a variety of causes that range from benign and self-limiting to more severe and requiring immediate medical intervention,” says Sarah Robbins, MD, MSc FRCPC, a gastroenterologist, member of the Royal College Gastroenterology Examination Committee, clinical assistant professor at the University of British Columbia and founder of Well Sunday, a platform for evidence-based nutrition and lifestyle advice.2

Some of the more common causes of an upset stomach:

  • Constipation. Constipation can arise when your bowel movements aren’t frequent, and it’s hard to pass stool, causing abdominal discomfort.3 (Explore our article about laxatives to help get things moving.)
  • Food allergies or intolerance. Allergies or intolerances to certain foods like lactose or gluten4 can trigger stomachaches, often accompanied by cramping or diarrhea.5
  • Food poisoning. If you eat food that’s contaminated with harmful bacteria, parasites or viruses, you may experience severe diarrhea, nausea and/or vomiting.6
  • Indigestion. Eating too much, eating food that’s spicy or greasy or eating too quickly can all lead to indigestion, which causes discomfort and pain.7 “Indigestion is one of the most common causes of upper abdominal discomfort, often related to eating habits or certain foods,” adds Dr. Robbins.8
  • Period cramps. Just before or during9 a menstrual period, people may experience cramps or pain in the lower abdomen.
  • Stomach flu (viral gastroenteritis). The stomach flu is an infection that causes stomach upset in the form of cramps, nausea, diarrhea and vomiting and sometimes a fever.10 “It is common and usually self-limiting,” says Dr. Robbins.11

Most of these can be managed at home and will resolve on their own, but if symptoms persist, you should always consult a health care professional. Other recurring causes of an upset stomach:12

  • Gastritis. Gastritis includes a group of conditions that cause inflammation of the stomach lining. It typically occurs from a bacterial infection, frequent use of pain relievers, old age and drinking too much alcohol. Crohn’s disease can also increase the risk of gastritis.13
  • Gastroesophageal reflux disease (GERD). This is a common gastrointestinal disorder (indeed, about 20 percent of Americans have it) that occurs when stomach contents move up into the esophagus, which can cause a burning sensation in your chest and throat and a sour taste in your mouth. If reflux of stomach acid happens frequently, it can lead to esophageal ulcers, cancer and difficulty swallowing.14,15
  • Irritable bowel syndrome (IBS). This chronic condition affects the stomach and intestines and can cause abdominal pain, bloating, constipation, cramping, diarrhea and gas.16
  • Inflammatory bowel disease (IBD). Characterized by chronic inflammation (pain and swelling) in the intestines, IBD includes Crohn’s disease and ulcerative colitis and can cause abdominal pain, persistent diarrhea, fatigue, rectal bleeding and weight loss.17,18
  • Urinary tract infection. Bladder infections can cause cramping in the lower abdomen, while kidney infections can cause nausea and vomiting.19

For these, symptoms can often be managed or eliminated by working with a health care professional.

Lastly, there are some causes of stomachaches and abdominal pain that require immediate medical attention, including abdominal aortic aneurysms,20 appendicitis, cholecystitis,21 heart attack intestinal obstruction and more.

“If you experience intense, persistent or worsening abdominal pain, especially if accompanied by other symptoms like fever, vomiting or blood in the stool, seek emergency medical care immediately,” says Dr. Robbins.22

How to help settle an upset stomach

When your stomach hurts, relief is all you want. But which over-the-counter (OTC) options are right for your symptoms? If dealing with one of the more common, less serious causes of a stomachache outlined above, here are some options:

  • Antacids. These are best for providing quick relief from heartburn and acid indigestion associated with GERD.23 “The active ingredients help neutralize stomach acid on contact,” says Lauren M. Bleich, MD, MPH, a board-certified gastroenterologist and a member of the American College of Gastroenterology, the American Society for Gastrointestinal Endoscopy and the American Gastroenterological Association.24
  • Antidiarrheals. These can help slow down bowel movements to relieve diarrhea.25 However, Dr. Robbins advises not to use these for infectious diarrhea or food poisoning.26 Bismuth subsalicylate (think Pepto Bismol) is an antidiarrheal agent that can also help with nausea and indigestion. 
  • Antiemetics. These can be used to manage nausea and vomiting. There are many classes of antiemetics, however, so you should consult your health care professional to determine the underlying cause of your nausea and vomiting and if antiemetics are the proper response. You should also not take these if you are pregnant without consulting your health care provider.27,28 In certain situations like motion sickness or, alas, a hangover, an OTC nausea medication could help get the job done.
  • Histamine type 2 receptor antagonists. Also known as H2 blockers, these work by decreasing the amount of acid produced by the stomach and can help with heartburn, sour stomach and acid indigestion.29,30 “If you require daily dosing of these medications for longer than two weeks, it is recommended you speak with your health care provider,” says Dr. Bleich.
  • Lactose intolerance medicine. There are some OTC products available that contain the lactase enzyme that may help you digest dairy products. These don’t work for everyone, however, so reaching out to your health care provider is the best course of action.31
  • Laxatives. These can help target constipation by either softening stool or increasing bowel movements but should only be used short term unless under your physician’s supervision.32
  • Probiotics. Probiotics have shown promise in relieving constipation and antibiotic-associated diarrhea. They may also help with IBS and IBD.33 Talk to your doctor about taking probiotics before getting started.
  • Proton pump inhibitors (PPIs). These can help reduce the amount of acid in the stomach and can be used for GERD symptoms and stomach ulcers. While some brands are available without a prescription, talk to your doctor if you need relief from symptoms most days.34

What to eat with an upset stomach

Eating certain foods (or not eating others) can help manage different types of stomach problems. But different symptoms require different foods, so consult your health care provider before making any drastic changes to your diet.

In general, if constipation is the culprit, fiber-rich foods, such as fruits, vegetables and whole grains, may help.35

If nausea and vomiting are at play, sometimes it’s best to give your stomach some time to recover. Or Dr. Robbins recommends sticking with plain, nonacidic foods. “Bland, starchy foods low in dietary fiber and dairy are often easiest to tolerate,” she says. “They provide some calories in the form of carbohydrates that are easy to digest.” She also advises eating small portions of food and staying hydrated.

Pedialyte and other hydration tools contain electrolytes that may help your body recover.36

For diarrhea, the BRAT diet (eating bananas, rice, applesauce and toast) may provide some relief.37 These foods are easily digested and can help replenish minerals, potassium and vitamins, adds Dr. Robbins.38 But “it is not recommended for extended periods or as a complete nutritional solution,” she says, “as it lacks a range of nutrients like protein and healthy fats that are necessary for long-term health. Patients with chronic gastrointestinal issues should consult a health care provider for a more comprehensive treatment and dietary plan.”

In addition, talk to your health care provider about following certain diets that may help target and reduce your particular stomach problems. For example, if lactose is the cause, following a diet that eliminates dairy products may help.

How to help prevent an upset stomach

You can’t stop every stomachache, but following these general guidelines will help reduce the likelihood that you’ll experience one:

  • Lifestyle changes. Making certain lifestyle adjustments, such as managing stress, exercising regularly, not overeating and modifying your diet, may help reduce the occurrence of stomachaches.39
  • Avoid infections. Taking basic steps to reduce your chances of getting the stomach flu can help, explains Dr. Robbins. The easiest way to do this is by frequently washing your hands with soap, staying away from food or water that could be contaminated, and keeping your hands away from your mouth.40
  • Food safety. While you can’t always control the quality of food you’ll be served when you eat out, handling food properly when you cook at home (and washing utensils and kitchen surfaces thoroughly) can help prevent food poisoning. Make sure to cook meat thoroughly and to avoid cross-contamination. “Foods like raw oysters, uncooked meats and unpasteurized milk are more likely to contain harmful bacteria,” says Dr. Robbins.41
  • Eat carefully. If you and your health care provider determine that certain foods trigger stomach issues, try to avoid them. (acidic, fried,42 high-fat or spicy foods can also often lead to stomachaches.43) You may want to stay away from stimulants like caffeine and nicotine44 and gut irritants like alcohol, as well.45

When to seek medical attention for stomach pain

With stomach pain, it’s important to see a doctor or seek immediate medical attention if you experience any of the following:46,47,48

●       Abdominal pain that lasts more than a few days

●       Abdominal swelling

●       Severe abdominal tenderness

●       Blood in vomit

●       Bloody stool

●       Discolored skin

●       High fever

●       Persistent nausea and vomiting

●       Pain after trauma or injury to the abdomen

●       Severe or sudden pain

●       Shortness of breath or difficulty breathing

●       Weight loss

*This content is for informational purposes only and is not medical advice. Consult your health care provider before taking any vitamins or supplements and prior to beginning or changing any health care practices.