Causes of Stomach Pain and Treatment Options

Everything You Need to Know About Stomach Pain

Stomach pain is often caused by something you ate, an infection, or a gastrointestinal condition. Depending on the cause, stomach pain may also be accompanied by other gastrointestinal symptoms, such as nausea, bloating, gas, or indigestion.

At-home treatments and lifestyle modifications can sometimes be enough to ease your stomach pain. If they aren't, or if symptoms are severe, persistent, or worsening, you need to see a healthcare provider to investigate the cause.

This article covers several possible causes of stomach pain. It also explains how those conditions may be treated, along with when to see a healthcare provider.

Stomach Pain Causes
Illustrated by Alexandra Gordon, Verywell

Understanding Stomach Pain

The stomach, of course, is its own unique organ. But when people use the term "stomach pain," many mean pain related to the gastrointestinal tract. As such, we also do so here.

Typically speaking, perceived stomach pain that occurs in the part of the abdomen nearer to the ribs involves the upper gastrointestinal (GI) tract, which includes the esophagus, stomach, and small intestines.

Pain occurring in the lower abdomen tends to be related to the lower GI tract, which is comprised of the large intestine (colon), rectum, and anus.

When you are experiencing stomach pain, it can be hard to pinpoint exactly where the pain is located. If you have any concerns about what you are feeling, don't hesitate to reach out to a healthcare provider.

Upper Gastrointestinal Tract

Besides the stomach bug or the occasional bout of indigestion, here are some health conditions that cause more persistent stomach pain in the upper gastrointestinal tract:

Peptic Ulcer

Peptic ulcer is an open sore in the stomach or duodenum (the first part of the small intestine).

Peptic ulcer pain is typically felt in the upper mid-abdomen. It may occur at night and wake you up. It may also occur about one to three hours after a meal, or when you have an empty stomach.

Other possible symptoms of peptic ulcer disease include:

  • A feeling of fullness
  • Problems drinking as much fluid as usual
  • Nausea and vomiting
  • Bloody or dark, tarry stools
  • Chest pain
  • Fatigue
  • Vomiting, possibly bloody
  • Weight loss
  • Ongoing heartburn

Most peptic ulcers are caused by either the bacterium Helicobacter pylori or the use of nonsteroidal anti-inflammatory drugs, which may irritate and alter the protective mucosal layer of the digestive tract.

Anytime you have blood in your stool or vomit, you need to get medical attention immediately. Bloody stool or vomit can be a sign of a life-threatening medical condition.

Gastritis

Gastritis is the medical term for inflammation in the lining of the stomach. Gastritis can be caused by many things, such as:

  • Drinking too much alcohol
  • Smoking
  • Extreme stress
  • Long-term use of aspirin and over-the-counter pain medications
  • Infections caused by bacteria and viruses
  • Major surgery
  • Traumatic injury and burns

In some cases, the condition will be idiopathic (meaning no cause is ever found).

Gastritis pain is typically felt in the upper part of the abdomen or belly. There may be other symptoms, too, such as:

  • Loss of appetite
  • Nausea and vomiting
  • Blood in stools or vomit

Again, if you vomit blood or notice it in your stools, do not wait to see a healthcare provider.

Gastroparesis

Gastroparesis, also called delayed gastric emptying, is a condition in which the stomach is slow to empty its contents into the small intestine. This condition is common in people with diabetes, but may also occur idiopathically (without an identified cause).

Besides aching or cramping pain in the upper abdomen, other symptoms of gastroparesis include:

  • Feeling full long after eating a meal
  • Nausea or vomiting
  • Excessive bloating
  • Excessive belching
  • Heartburn
  • Poor appetite

Some medications can worsen gastroparesis symptoms, such as:

  • Narcotic pain medications, like codeine
  • Some antidepressants, like amitriptyline
  • Some anticholinergics (medicines that block certain nerve signals)
  • Some medicines used to treat overactive bladder
  • Pramlintide, a blood pressure-lowering medication

Gastroesophageal Reflux Disease

Gastroesophageal reflux disease (GERD), a more serious form of acid reflux, is a condition in which stomach acid leaks back into the esophagus, causing a burning sensation in the chest or throat.

GERD pain may be felt in the upper abdomen or chest. Some other symptoms of GERD include:

  • Regurgitation
  • Trouble swallowing
  • Heartburn
  • Hoarseness
  • Cough
  • A feeling like there is a lump in the throat

Chest pain can sometimes be a sign of heart attack or another life-threatening medical emergency. Get medical attention immediately if you are experiencing new or unusual chest pain.

Esophagitis

Your esophagus is the tube that carries food from your mouth to your stomach. Esophagitis refers to irritation and inflammation of the lining of the esophagus, which may occur for many reasons, including:

  • GERD
  • Chronic vomiting
  • Some anti-inflammatory medications like aspirin
  • Some medical procedures, like radiation therapy
  • Infections that weaken the immune system
  • Allergies, especially food allergies

Esophagitis pain is felt behind the breastbone and is sometimes described as a burning, heavy, or sharp sensation that may be constant or come and go. The pain may also be worse after meals or when you lie flat.

Left untreated, esophagitis can progress to a condition called Barrett's esophagus. This condition may increase your risk for esophageal cancer.

Gallstones

Gallstones are caused by the crystallization of bile in the gallbladder. Gallstones often do not cause symptoms at first. Symptoms usually begin when gallstones grow larger, or when they start to obstruct the bile ducts (a condition called acute cholecystitis).

Gallstone "attacks" commonly occur at night or after a fatty meal. The pain is felt in the upper abdomen which increases rapidly and may persist from 30 minutes to several hours.

Other symptoms of gallstones include:

  • Pain in the back between the shoulder blades
  • Pain in the right shoulder
  • Nausea or vomiting
  • Fever and chills
  • Jaundice (yellowing of the skin and eyes)
  • Abdominal bloating
  • Intolerance of fatty foods
  • Belching or gas
  • Indigestion

The symptoms of gallstones can resemble other life-threatening medical conditions, like heart attack or appendicitis. Know the signs of these conditions, and get help right away if you suspect one is occurring or are not sure.

Pancreatitis

Pancreatitis refers to inflammation of the pancreas, a small gland that releases insulin to regulate your blood sugar levels and also aids in the digestion of fat. Pancreatitis can be acute (sudden) or chronic (long-term).

Alcohol abuse and gallstone disease are the two most common causes of pancreatitis.

Most people with acute pancreatitis develop severe, constant pain in the upper belly. The pain may spread to the back or chest, and it may feel worse after you eat.

Other possible symptoms of pancreatitis include:

  • Nausea or vomiting
  • Rapid heart rate
  • Fever
  • Swelling and tenderness in the upper belly
  • Fluid buildup in the belly
  • Lowered blood pressure
  • Jaundice

Celiac Disease

Celiac disease is an autoimmune disorder in which the consumption of gluten causes the immune system to attack the small intestine.

Celiac pain varies. It can manifest as:

  • Recurring stomach pain
  • Muscle cramps or bone pain
  • Joint pain
  • Painful, itchy rash

Other possible symptoms of celiac disease include:

  • Constant diarrhea or constipation
  • Weight loss
  • Gas
  • Pale, foul-smelling stool
  • Anemia
  • Tingling and numbness in the legs
  • Missed menstrual periods (due to too much weight loss)
  • Infertility
  • Early osteoporosis
  • Teeth changing color

Lactose Intolerance

Lactose intolerance is a condition in which a person lacks the enzyme needed to digest the sugars found in dairy products. People with lactose intolerance typically experience stomach pain, diarrhea, gas, or bloating soon after eating foods like milk or cheese.

Lower Gastrointestinal Tract

Here are some of the more common health conditions that arise within the colon and rectum.

Constipation

Constipation is very common and often associated with uncomfortable or even painful abdominal bloating from excess gas. Some people with constipation also have:

  • Very hard or small stools
  • Increased straining
  • A feeling that their bowels do not completely empty

Some of the most common causes of constipation include:

  • Medications
  • Lack of exercise
  • Not drinking enough liquids
  • Not eating enough fiber
  • Abuse of laxatives

Diverticulosis

Diverticulosis refers to the development of little pouches within the lining of the colon. The exact cause of diverticulosis is unclear, although it is widely believed to be caused by a lack of adequate fiber in the diet.

Most people with diverticulosis have no symptoms. Those who do may experience pain and cramps in the stomach, especially in the lower left abdomen.

Infection and inflammation (called diverticulitis) may lead to symptoms ranging from lower abdominal tenderness to severe pain, fever, nausea, and vomiting.

Appendicitis

The most common symptom of appendicitis is abdominal pain, which usually begins as a dull ache around the belly button. Over time, the pain moves to the lower-right part of the abdomen and becomes sharp.

Other associated symptoms include:

  • Pain that worsens when coughing or walking
  • Loss of appetite
  • Nausea or vomiting
  • Fever

Both GI Tracts

Some health conditions that cause perceived stomach pain may affect both the upper and lower digestive system.

Inflammatory Bowel Disease

Inflammatory bowel disease (IBD), which includes Crohn's disease and ulcerative colitis, manifests with a wide range of gastrointestinal and non-gastrointestinal symptoms.

The hallmark symptoms of Crohn's disease include crampy abdominal pain along with non-blood diarrhea, while the cardinal symptoms of ulcerative colitis include colicky abdominal pain and bloody diarrhea.

Keep in mind that, while Crohn's disease may affect the entire GI tract from mouth to anus, ulcerative colitis only affects the lower GI tract (colon and rectum).

Irritable Bowel Syndrome

Irritable bowel syndrome (IBS) is characterized by a cluster of symptoms, including:

  • Crampy stomach pain
  • Constipation or diarrhea
  • The feeling that you haven't finished a bowel movement
  • Whiteish mucus in stool

IBS symptoms tend to come and go. Although it can be a painful condition, it is not known to damage your digestive tract or lead to other health problems.

Abdominal Hernia

An abdominal hernia, which may cause stomach pain and a visible bulge, occurs when fatty tissue or an organ pokes through a weak or torn area within the abdominal wall.

There are different types of abdominal hernias; for example, an umbilical hernia occurs around the belly button, while an epigastric hernia occurs above the belly button. In men, inguinal hernias (near the groin) are the most common.

Other symptoms of an abdominal hernia include:

  • Constipation
  • Narrow or thin stool
  • Nausea or vomiting
  • Fever
  • Rapid heart rate
  • Pain around the bulge

Cancer

While less common, upper and lower abdominal pain may be a sign of cancer, including cancer of the:

  • Ovaries
  • Pancreas
  • Stomach
  • Colon
  • Liver

Be sure to see your healthcare provider if your pain is persistent or you are experiencing other unusual symptoms like a change in bowel habits, blood in your stool or urine, excessive fatigue, or unexplained weight loss.

When to See a Healthcare Provider

If you ever have sudden and severe stomach pain, seek immediate medical treatment. Other symptoms that warrant getting medical attention right away include:

  • Chest pain
  • Vomiting up blood or dark-colored flecks
  • Having black, maroon, or bloody stools
  • Severe and/or persistent constipation
  • New-onset pain or swelling around an abdominal hernia site
  • Dizziness and/or feeling faint
  • Inability to keep down food or fluids

Diagnosis

After asking about your medical history, your healthcare provider will likely perform a physical examination. The provider may listen to your abdomen with a stethoscope, and press on different areas of your abdomen to evaluate for tenderness, swelling, rigidity, or masses.

If your provider suspects a run-of-the-mill stomach bug, constipation, or another mild condition, they may recommend an over-the-counter medication or a simple lifestyle change.

If your provider suspects a more serious issue is at play, or if they need more information to get to the bottom of your pain, they will likely order further diagnostic tests. Tests a provider may order include:

Blood Tests

Depending on your suspected condition, your healthcare provider may order one of many blood tests.

For example, if your healthcare provider suspects gallstones, you will undergo a liver function and bilirubin blood test.

Other blood tests that may be ordered include:

For a diagnosis of peptic ulcer disease, your healthcare provider will test you for H. pylori infection. You may be tested for H. pylori through an endoscopic biopsy of the stomach (performed during upper endoscopy), a urea breath test, or a stool H. pylori antigen test.

Imaging

Several imaging tests may be used to evaluate the cause of your stomach pain, including an abdominal ultrasound and a computed tomography (CT) scan. Two other tests you may not be as familiar with include a barium swallow test and an upper endoscopy.

Barium Swallow

The barium swallow test is an X-ray imaging test sometimes used to evaluate disorders of swallowing, stomach ulcers, and hiatal hernia. During this test, a person drinks a thick liquid called barium while X-rays are taken, allowing the esophagus and stomach to be visualized clearly.

Upper Endoscopy

In order to confirm a suspected or potential diagnosis, your healthcare provider may refer you to a gastroenterologist (a healthcare provider who specializes in treating diseases of the digestive tract) for an upper endoscopy.

During an upper endoscopy, while you are sedated, a gastroenterologist inserts a long tube with a camera attached to it into your mouth and down through your esophagus into your stomach. During this test, your healthcare provider visualizes the inside of your upper digestive tract and looks for abnormalities. The provider can also use surgical tools passed through the tube to take a biopsy (tissue samples).

Differential Diagnoses

It's possible to have what you think of as stomach pain that doesn't stem from the GI tract at all, but rather from another system.

For example, stomach pain can be easily confused with chest pain. In the event of unexplained chest pain or stomach pain without other classic gastrointestinal symptoms, heart disease needs to be considered. In this case, an electrocardiogram, exercise stress test, and cardiac enzymes may be ordered.

Pelvic pain can also be confused with lower stomach or abdominal pain. Some possible causes of pelvic pain include:

Likewise, upper stomach or abdominal pain could stem from the lungs and might be a symptom of pneumonia or pulmonary embolism.

The above list of stomach pain causes is not exhaustive. In the end, don't self-diagnose or self-treat—seek out the advice of a healthcare professional.

Treatment

Treatment of stomach pain depends on the underlying diagnosis.

Lifestyle Treatment Options

Several lifestyle modifications may help manage your condition. For example, in the case of celiac disease, a strictly gluten-free diet is essential to treatment, just as restricting lactose (milk products) ingestion is how most people manage lactose intolerance.

Treating GERD may require several lifestyle changes, such as:

  • Losing weight if you are overweight or recently gained weight
  • Elevating the head of your bed (for example, placing a foam wedge underneath the top of the mattress)
  • Avoiding meals two to three hours before going to bed

Lifestyle behaviors are also at the crux of treating constipation.

They include:

  • Eating foods high in fiber, such as prunes and breakfast cereals
  • Drinking 6 to 8 glasses of water per day
  • Engaging in daily physical activity

These are just a few of many examples.

Medications

Some gastrointestinal-related conditions can be managed with over-the-counter or prescription medications.

Acid-Reducing Medications

The occasional heartburn may be treated with over-the-counter antacids like Tums, Maalox, and Mylanta. GERD, peptic ulcer disease, and gastritis require taking a medication called a histamine blocker or a proton pump inhibitor.

Laxatives

For constipation-related stomach discomfort, laxatives may be recommended by your healthcare provider, particularly if lifestyle changes are not helping. Discuss which laxative to take with your healthcare provider, as they work differently and some may not be safe for you.

Antibiotics

For infectious-related sources of abdominal pain, like diverticulitis, or for the management of H. pylori (when it is the culprit behind a person's gastritis or peptic ulcer disease), antibiotics will be prescribed. While oral antibiotics for H. pylori and mild diverticulitis can be taken at home, moderate-to-severe cases of diverticulitis require hospitalization with antibiotics given through the vein.

Steroids and Immunosuppressants

Treatment of inflammatory bowel disease may involve steroids and immunosuppressants to slow the progression of the disorder.

IBS Medications

Treatment of IBS is complex and may entail taking one or more medications, depending on a person's unique symptoms. While not an exhaustive list, some medications used to ease the symptoms of IBS include:

  • Anti-diarrheal drugs like Imodium (loperamide)
  • Anti-constipation drugs like Miralax (polyethylene glycol)
  • Antispasmodics like Bentyl (dicyclomine)
  • Tricyclic antidepressants like Elavil (amitriptyline)

Surgery

While surgery is the first-line treatment for some gastrointestinal conditions, such as appendicitis, symptomatic gallstones, and abdominal wall hernias, it may be the last resort option for other gastrointestinal problems. For example, a surgery called a Nissen fundoplication may be recommended for refractory GERD.

Surgery may also be indicated for complications that occur as a result of a gastrointestinal condition—for instance, a perforated peptic ulcer (when a hole forms in the stomach or small intestines) or abscess formation in acute diverticulitis.

Summary

The gastrointestinal system involves numerous organs. Issues with any of these organs can lead to pain in various parts of the abdomen, including the stomach. Stomach pain can also be confused with pelvic pain or heart issues. Furthermore, symptoms of milder conditions like IBS or gallstones can overlap with symptoms of life-threatening conditions like appendicitis or cancer.

For this reason, any time you have sudden or severe pain in the chest, pelvic area, or abdomen, it's important to seek immediate medical attention. Passing dark, tarry stool or vomiting blood warrants an immediate trip to the emergency room as well.

28 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Johns Hopkins Medicine. Upper gastrointestinal series.

  2. National Institute of Diabetes and Digestive and Kidney Diseases. About the lower GI tract.

  3. Penn Medicine. Peptic ulcer disease.

  4. Fashner J, Gitu AC. Diagnosis and treatment of peptic ulcer disease and H. pylori infection. Am Fam Physician. 2015;91(4):236-42.

  5. Johns Hopkins Medicine. Gastritis.

  6. Stein B, Everhart KK, Lacy BE. Gastroparesis: A review of current diagnosis and treatment options. J Clin Gastroenterol. 2015;49(7):550-8. doi:10.1097/MCG.0000000000000320

  7. National Institute of Diabetes and Digestive and Kidney Diseases. Symptoms & causes of gastroparesis.

  8. National Institute of Diabetes and Digestive and Kidney Diseases. Acid reflux (GER & GERD) in adults.

  9. Johns Hopkins Medicine. Esophagitis.

  10. Harvard Health. Esophagitis.

  11. Johns Hopkins Medicine. Gallstones.

  12. Johns Hopkins Medicine. Pancreatitis.

  13. Feagan BG, Kahrilas PJ, Jalan R, McDonald JWD. Evidence‐Based Gastroenterology and Hepatology. 4th ed. Hoboken, NJ: John Wiley & Sons; 2019. doi:10.1002/9781119211419

  14. Leonard MM, Sapone A, Catassi C, Fasano A. Celiac disease and nonceliac gluten sensitivity: A review. JAMA. 2017;318(7):647-656. doi:10.1001/jama.2017.9730

  15. Johns Hopkins Medicine. Celiac disease.

  16. Deng Y, Misselwitz B, Dai N, Fox M. Lactose intolerance in adults: Biological mechanism and dietary management. Nutrients. 2015;7(9):8020-35. doi:10.3390/nu7095380

  17. Johns Hopkins Medicine. Constipation.

  18. Mount Sinai. Diverticulosis.

  19. Feuerstein JD, Falchuk KR. Diverticulosis and diverticulitis. Mayo Clin Proc. 2016;91(8):1094-104. doi:10.1016/j.mayocp.2016.03.012

  20. Bhangu A, Søreide K, Di Saverio S, Assarsson JH, Drake FT. Acute appendicitis: modern understanding of pathogenesis, diagnosis, and management. Lancet. 2015:386(10000);1278-1287. doi:10.1016/S0140-6736(15)00275-5

  21. Fujii T, Watanabe M. Definition and epidemiology of inflammatory bowel disease. Nippon Rinsho. 2017;75(3):357-363.

  22. Johns Hopkins Medicine. Ventral (abdominal) hernia.

  23. Cervellin G, Mora R, Ticinesi A, et al. Epidemiology and outcomes of acute abdominal pain in a large urban emergency department: Retrospective analysis of 5,340 cases. Ann Transl Med. 2016;4(19):362. doi:10.21037/atm.2016.09.10

  24. Gans SL, Pols MA, Stoker J, Boermeester MA. Guideline for the diagnostic pathway in patients with acute abdominal pain. Dig Surg. 2015;32(1):23-31. doi:10.1159/000371583

  25. Levine MS, Rubesin SE. History and evolution of the barium swallow for evaluation of the pharynx and esophagus. Dysphagia. 2017;32(1):55-72. doi:10.1007/s00455-016-9774-y

  26. Muthusamy VR, Lightdale JR, Acosta RD, et al. The role of endoscopy in the management of GERD. Gastrointest Endosc. 2015;81(6):1305-10. doi:10.1016/j.gie.2015.02.021

  27. Gionchetti P, Rizzello F, Annese V, et al. Use of corticosteroids and immunosuppressive drugs in inflammatory bowel disease: Clinical practice guidelines of the Italian Group for the Study of Inflammatory Bowel Disease. Dig Liver Dis. 2017;49(6):604-617. doi:10.1016/j.dld.2017.01.161

  28. Oor JE, Roks DJ, Broeders JA, Hazebroek EJ, Gooszen HG. Seventeen-year outcome of a randomized clinical trial comparing laparoscopic and conventional Nissen fundoplication. Ann Surg. 2017;266(1):23-28. doi:10.1097/SLA.0000000000002106

Additional Reading
Barbara Bolen, PhD

By Barbara Bolen, PhD
Barbara Bolen, PhD, is a licensed clinical psychologist and health coach. She has written multiple books focused on living with irritable bowel syndrome.