Tips to help get rid of a stomachache
When the ache won’t stop, here’s what to know, what to consider and when to see a health care provider.
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. 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.
Some of the more common causes of an upset stomach:
- Constipation. Constipation can arise when your bowel movements are less frequent, and it’s hard to pass stool, causing abdominal discomfort. (Explore our article about laxatives to help get things moving.)
- Food allergies or intolerance. Allergies or intolerances to certain foods like lactose or gluten can trigger stomachaches, often accompanied by cramping or diarrhea.
- Food poisoning. If you eat food that’s contaminated with harmful bacteria, parasites or viruses, you may experience severe diarrhea, nausea or vomiting.
- 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. “Indigestion is one of the most common causes of upper abdominal discomfort, often related to eating habits or certain foods,” adds Dr. Robbins.
- Period cramps. Just before or during 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, diarrhea, nausea and vomiting and sometimes a fever. “It is common and usually self-limiting,” says Dr. Robbins.
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:
- 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.
- Gastroesophageal reflux disease (GERD). This is a common gastrointestinal disorder (indeed, it’s estimated that 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.
- 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, fatigue, persistent diarrhea, rectal bleeding and weight loss.
- Irritable bowel syndrome (IBS). This chronic condition affects the stomach and intestines and can cause abdominal pain, bloating, constipation, cramping, diarrhea and gas.
- Urinary tract infection. Bladder infections can cause cramping in the lower abdomen, while kidney infections can cause nausea and vomiting.
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, appendicitis, cholecystitis, 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.
How to help settle an upset stomach
When your stomach hurts, relief support is all you want. But which over-the-counter (OTC) options may be right for your symptoms? Speak with your health care provider before taking any medication or supplement, but if dealing with one of the more common and less serious causes of a stomachache outlined above, here are some options:
- Antacids. These are best for providing quick relief support from heartburn and acid indigestion associated with GERD. “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.
- Antidiarrheals. These can help slow down bowel movements to help relieve diarrhea. However, Dr. Robbins advises not to use these for infectious diarrhea or food poisoning. Bismuth subsalicylate (think Pepto Bismol) is an antidiarrheal agent that can also help with nausea and indigestion. Loperamide (Imodium) is also a common medication that can be used for diarrhea.
- 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. In certain situations like motion sickness, 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. “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.
- 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.
- Probiotics. Probiotics have shown promise in relieving constipation and antibiotic-associated diarrhea. They may also help with certain types of IBS and IBD. Talk to your health care provider about taking probiotics before getting started to help ensure you are taking the right type of probiotic.
- 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 support from symptoms most days. Keep in mind that PPIs typically take one to four days to take full effect.
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.
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.
For diarrhea, the BRAT diet (eating bananas, rice, applesauce and toast) may help provide some relief. These foods are easily digested and can help replenish minerals, potassium and vitamins, adds Dr. Robbins. 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:
- 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.
- Eat carefully. If you and your health care provider determine that certain foods trigger stomach issues, try to avoid them. (Acidic, fried, high-fat or spicy foods can also often lead to stomachaches.) You may want to stay away from stimulants like caffeine and nicotine and gut irritants like alcohol, as well.
- 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.
- Lifestyle changes. Making certain lifestyle adjustments, such as exercising regularly, managing stress, modifying your diet and not overeating may help reduce the occurrence of stomachaches.
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:
- 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.
-
FOR DIGESTIVE DISEASE STATISTIC SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Digestive diseases statistics for the United States. Updated October 2014.
-
FOR STOMACHACHES CAUSES SOURCE: Sarah Robbins, interview, September 2024.
-
FOR CONSTIPATION DEFINITION SOURCE: Johns Hopkins Medicine. Constipation. Accessed March 24, 2025.
-
FOR FOOD ALLERGIES OR INTOLERANCE SOURCE: University of Chicago Medicine. Food allergy or food intolerance? Published January 18, 2023.
-
FOR CRAMPING AND DIARRHEA SOURCE: Mount Sinai. Abdominal pain: symptoms and causes. Updated March 2024.
-
FOR FOOD POISONING SOURCE: Mount Sinai. Food poisoning. Published December 2023.
-
FOR INDIGESTION SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Definition and facts of indigestion (dyspepsia). Updated November 2016.
-
FOR ABDOMINAL DISCOMFORT SOURCE: Sarah Robbins, interview, September 2024.
-
FOR PERIOD CRAMPS SOURCE: Johns Hopkins Medicine. Dysmenorrhea. Accessed March 24, 2025.
-
FOR VIRAL GASTROENTERITIS SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIH). Symptoms and causes of viral gastroenteritis (stomach flu). Accessed March 24, 2025.
-
FOR SELF-LIMITING SOURCE: Sarah Robbins, interview, September 2024.
-
FOR RECURRING CAUSES OF AN UPSET STOMACH SOURCE: NHS Inform. Stomach ache and abdominal pain: symptoms and causes. Updated May 29, 2023.
-
FOR RISK OF GASTRITIS SOURCE: MedStar Health. What is gastritis? Accessed March 24, 2025.
-
FOR GERD DIFFICULTY SWALLOWING SOURCE: Yale Medicine. GERD (gastroesophageal reflux disease): symptoms and causes. Accessed March 2025.
-
FOR GERD CANCER SOURCE: Johns Hopkins Medicine. Gastroesophageal reflux disease (GERD): symptoms and causes. Accessed March 31, 2025.
-
FOR RECTAL BLEEDING SOURCE: Johns Hopkins Medicine. Inflammatory bowel disease (IBD). Accessed March 24, 2025.
-
FOR IBD FATIGUE SOURCE: McDowell C. Farooq U. Haseeb M. et al. Inflammatory bowel disease (IBD). StatPearls. Updated August 4, 2023.
-
FOR BLOATING SOURCE: UK National Health Service. What is IBS? Accessed March 24, 2025.
-
FOR UTI CRAMPING IN ABDOMEN SOURCE: Centers for Disease Control and Prevention (CDC). About urinary tract infections (UTIs) online. Accessed March 2025.
-
FOR ABDOMINAL AORTIC ANEURYSM SOURCE: Centers for Disease Control and Prevention (CDC). About aortic aneurysm. Accessed March 24, 2025.
-
FOR PAIN THAT NEEDS MEDICAL ATTENTION SOURCE: Johns Hopkins Medicine. Cholecystitis online. Published November 2019.
-
FOR WHEN TO SEEK MEDICAL CARE SOURCE: Sarah Robbins, interview, September 2024.
-
FOR ANTIACIDS PROVIDE QUICK RELIEF SUPPORT SOURCE: National Center for Biotechnology Information (NCBI). Antacids. Updated August 2023.
-
FOR ACTIVE INGREDIENTS HELP NEUTRALIZE STOMACH ACID SOURCE: The New York Times. For a nation on edge, antacids become hard to find. Published December 2020.
-
FOR ANTIDIARRHEAL HELP SLOW DOWN BOWEL MOVEMENTS SOURCE: FamilyDoctor.Org. Anti-diarrheal medicines: OTC relief for diarrhea. Updated September 2023.
-
FOR DON'T USE FOR INFECTIOUS DIARRHEA OR FOOD POISONING SOURCE: Sarah Robbins, interview, September 2024.
-
FOR TALK TO YOUR DOCTOR IF PREGNANT SOURCE: Constantini L. Antiemetics. Osmosis. Published January 2021.
-
FOR CONSULT WITH PROVIDER IF PREGNANT SOURCE: Rehman A, Khalili Y. Neuroanatomy, occipital lobe. StatPearls. Updated July 24, 2023.
-
FOR H2 BLOCKERS DEFINITION SOURCE: Sarah Robbins, interview, September 2024.
-
FOR H2 BLOCKERS SYMPTOMS SOURCE: Villines Z. What to know about H2 blockers. Medical News Today. Updated February 10, 2023.
-
FOR LACTOSE INTOLERANCE MEDICINE SOURCE: Johns Hopkins Medicine. Lactose intolerance. Accessed March 24, 2025.
-
FOR LAXATIVES SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Treatment for constipation. Published April 2021.
-
FOR PROBIOTICS HELP WITH IBS AND IBD SOURCE: National Center for Complementary and Integrative Health (NCCIH). Probiotics: usefulness and safety. Published August 2021.
-
FOR TALK TO YOUR DOCTOR ABOUT PPIS SOURCE: MedlinePlus. Proton pump inhibitors. Updated May 3, 2023.
-
FOR WHAT TO EAT WHEN CONSTIPATED SOURCE: University of Wisconsin-Madison. Upset stomach. Accessed March 24, 2025.
-
FOR ELECTROLYTES HELP YOUR BODY RECOVER SOURCE: : University of Wisconsin-Madison. Upset stomach. Accessed March 24, 2025.
-
FOR BRAT DIET SOURCE: The Oregon Clinic. BRAT diet. Accessed March 24, 2025.
-
FOR BRAT FOODS ARE EASILY DIGESTED SOURCE: Sarah Robbins, interview, September 2024.
-
FOR AVOID INFECTIONS SOURCE: Centers for Disease Control and Prevention (CDC). Cruise ship illness frequently asked questions. Published February 12, 2024.
-
FOR FRIED FOOD LEADS TO ACHES SOURCE: Harvard Health Publishing. What to eat when you have chronic heartburn. Published July 2023.
-
FOR FOODS THAT LEAD TO ACHES SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Eating, diet and nutrition for indigestion. Updated November 2016.
-
FOR AVOID CAFFIENE AND NICOTINE SOURCE: National Cancer Institute (NIH). Inhalation. Accessed March 24, 2025.
-
FOR AVOID ALCOHOL SOURCE: National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Eating, diet and nutrition for indigestion. Updated November 2016.
-
FOR FOODS THAT CONTAIN HARMFUL BACTERIA SOURCE: Sarah Robbins, interview, September 2024.
-
FOR LIFESTYLE CHANGES SOURCE: UK National Health Service. Diet, lifestyle and medicines. Updated February 24, 2021.
-
FOR ABDOMINAL PAIN SYMPTOMS SOURCE: Mount Sinai. Abdominal pain. Updated March 31, 2024.
-
FOR WHEN TO VISIT URGENT CARE SOURCE: Mass General Brigham. Abdominal pain. Accessed March 31, 2025.
-
FOR GUT HEALTH SOURCE: Sarah Robbins, interview, September 2024.