Health Conditions A-Z Pain What Causes Upper Stomach Pain? By Simon Spichak Simon Spichak Simon Spichak finished his MSc at University College Cork, where he studied the interactions between the microbes in the gut and the brain. He became interested in science communication during his studies and won a national competition called FameLab in 2020. Since then, he has been covering stories in science and tech. health's editorial guidelines Updated on October 8, 2024 Medically reviewed by Jay N. Yepuri, MD Medically reviewed by Jay N. Yepuri, MD Jay N. Yepuri, MD, MS, FACG, is a board-certified gastroenterologist and member of the Digestive Health Associates of Texas Board of Directors and Executive Committee. learn more In This Article View All In This Article Types Gas Indigestion Gastritis Stomach Viruses Appendicitis Bowel Obstruction Diverticular Disease Gallstones Gastroesophageal Reflux Disease (GERD) Liver or Pancreas Problems Muscle Pain Peptic Ulcer Pregnancy Heart or Lung Problems Treatment When To Contact a Healthcare Provider SDI Productions / Getty Images Gas, indigestion, and stomach viruses are common causes of upper stomach pain. This symptom can also indicate appendicitis, bowel obstruction, or peptic ulcers in severe cases. The abdomen, or stomach, is the area below the chest that contains the liver, kidneys, and parts of the digestive system. The location, duration, and type of upper stomach pain all provide clues for its underlying causes. You may experience gas- or indigestion-related upper stomach pain after eating. Peptic ulcers can cause pain that comes and goes in waves. It's also common to feel upper stomach pain during pregnancy as the fetus grows and moves. You may develop other symptoms, like cramping or nausea. The intensity or severity of the pain doesn't necessarily mean that the issue is serious. Stomach pain is usually not a cause for concern. You may see a healthcare provider if you develop sudden, sharp pain that doesn't go away and occurs with a fever, bloating, and unexplained weight loss. Types of Upper Stomach Pain You can experience upper stomach pain in many ways. There are several terms used to describe the different types of stomach pain. The terms are based on where it occurs, how it feels, and how long it lasts. It's important to let a healthcare provider know where you're feeling stomach pain. It may occur in your: Upper left: The pancreas sits behind the stomach in the upper left quadrant of the abdomen. The spleen is also located in this quadrant, just to the right of the stomach. Upper middle: The stomach, pancreas, and liver are located in the upper middle quadrant of the abdomen. Under right: This quadrant of the abdomen contains the biliary system, which includes the gallbladder, pancreas, and liver. They may also ask what your stomach pain feels like. Upper stomach pain can be mild, moderate, or severe. You might feel a dull or sharp pain that can be cramp-like or colicky, meaning it comes and goes in waves. Generalized pain is pain that you may feel across more than half of your abdomen. This type of pain is usually acute, lasting for only a short period of time. Localized pain, in contrast, occurs in one small area. It may be a sign of a problem in a specific organ. This pain has a sudden onset and can progress to other areas. Gas Gas-related stomach pain occurs when air is trapped within the large or small bowel. Air that's stuck in the gut may cause generalized pain and discomfort. This is also a common symptom of lactose intolerance. Try drinking plenty of water and eating slowly to decrease the amount of gas trapped in the digestive tract. It's also important to avoid dairy products if you're lactose intolerant. A healthcare provider may prescribe medication if you have significant pain and bloating caused by gas. Indigestion Indigestion causes pain or burning in the upper stomach. Other symptoms include heartburn, gas, and bloating. Some people also experience nausea and vomiting. One of the best ways to treat and prevent indigestion is to avoid triggers. You may develop indigestion when you eat too much or too fast, consume high-fat foods, or are stressed. Drinking alcohol and smoking can also trigger indigestion. Indigestion can also be a symptom of an ulcer or gastroesophageal reflux disease (GERD) if it's severe or lasts two or more weeks. A healthcare provider can diagnose these conditions and prescribe treatments. Gastritis Gastritis is inflammation or swelling of the stomach. One of the most common causes is a bacterial infection caused by Helicobacter pylori. Other causes include medications like aspirin and ibuprofen and heavy alcohol drinking. Some people with gastritis don't develop symptoms. If you do have symptoms, they may include: Black stool or vomiting blood if there's bleeding from the stomach lining Loss of appetite Nausea or vomiting Pain in the upper stomach Treatment depends on the cause. A healthcare provider may prescribe antibiotics, for example, if the cause is a bacterial infection. You may need to reduce aspirin or ibuprofen use or alcohol drinking in some cases. Stomach Viruses Gastroenteritis, which is commonly known as the "stomach flu," is unrelated to influenza. Stomach viruses, such as norovirus or rotavirus, may infect the gut and cause cramps, diarrhea, nausea, and vomiting. Most stomach viruses resolve on their own. It's important to drink plenty of fluids to prevent dehydration and get rest. A healthcare provider may recommend probiotics, or helpful bacteria that might reduce diarrhea. Appendicitis Appendicitis, or inflammation of the appendix, can cause upper stomach pain in some cases. This pain starts in the upper middle stomach and can move toward the bottom right. It's typically sudden and worsens over time. You may also have symptoms like: Abdominal swellingConstipation or diarrheaLoss of appetiteLow-grade feverNausea or vomitingTrouble passing gas Appendicitis is a medical emergency that requires prompt treatment. A healthcare provider will typically need to surgically remove the appendix to resolve this condition. Bowel Obstruction Bowel obstruction is a blockage in the small or large bowel that prevents stool from passing. This causes pain in the upper stomach and belly button area. Other symptoms can include: Abdominal swelling Bloating Constipation Loud sounds from the bowel Vomiting Trouble passing gas Bowel obstruction is a medical emergency, so it's important to see a healthcare provider right away if you have these symptoms. Treatment typically involves surgery to remove the obstruction. Diverticular Disease Diverticula are small, bulging pouches in the colon. It's called diverticulitis when these pouches become inflamed. People with diverticular disease have chronic (long-term) diverticulitis, bleeding, or complications. You may develop upper stomach pain, but diverticulitis commonly affects the lower stomach. Other symptoms can include: Constipation or diarrheaFever and chillsNausea or vomiting A healthcare provider may prescribe antibiotics and anti-inflammatory drugs if you have diverticulitis. They may also recommend a high-fiber diet and probiotic supplements to prevent flare-ups. Gallstones Gallstones are blockages in the gallbladder that can cause upper stomach pain and lead to digestive issues. Other symptoms, which typically occur after eating, can include pain in the back or under the right arm, nausea, and vomiting. A healthcare provider can diagnose gallstones using imaging tests. You may not require treatment if you don't have symptoms. Surgery to remove the gallbladder might be necessary if symptoms are significant. Gastroesophageal Reflux Disease (GERD) GERD describes repeated episodes of heartburn. This condition occurs when stomach acid and other contents go back into the esophagus, which is called acid reflux. The esophagus is the tube that carries food from the mouth to the stomach. Heartburn can cause pain in the upper stomach. Other symptoms can include: Asthma-like symptoms Bad taste in your mouth Dry cough Trouble swallowing A healthcare provider can prescribe medications or, in severe cases, advise surgery. You can prevent heartburn by avoiding alcohol and acidic, fatty, and spicy foods. Eating small meals, losing weight if you have overweight or obesity, and not eating before bedtime can also help. Liver or Pancreas Problems The liver and pancreas aid in digestion, alongside the gallbladder. These organs are part of the biliary system and can impact each other. Gallstones, for example, can block bile ducts and cause liver or pancreas pain. Hepatitis (inflammation of the liver) and pancreatitis (inflammation of the pancreas) can also cause upper stomach pain. It's rare, but upper stomach pain can sometimes be a sign of liver or pancreatic cancer. Treatment for these conditions depends on the cause. Liver diseases like hepatitis can involve medication or surgery. Pancreatitis may require a hospital stay to receive intravenous (IV) fluids. Muscle Pain You may experience upper stomach pain if you have tense muscles in this region or overuse these muscles from exercise or physical labor. You can treat muscle pain by: Applying ice to the area for the first 24 to 72 hours and then switch to heat Avoiding stress Getting plenty of sleep Doing some gentle upper-body stretches Massaging the area Resting Taking pain relievers, such as acetaminophen or ibuprofen Peptic Ulcer A peptic ulcer is a sore that develops in the lining of the duodenum or stomach. The duodenum is the top part of the small intestine. A peptic ulcer can form if the stomach acid damages the lining of these organs. An H. pylori infection is the most common cause. Pain or burning in the upper stomach can come and go and start after eating or at night. This pain often lasts minutes to hours and can go away for brief periods after taking antacids. A healthcare provider can prescribe medications to reduce stomach acid and antibiotics to treat an H. pylori infection. Surgery may be required in severe cases. Pregnancy You may feel pain in your upper stomach around 18 to 24 weeks of pregnancy. This pain, which is also called ligament pain, is typically due to the fetus growing and moving. It might be helpful to wear a maternity girdle if you have ligament pain. You may also change positions or move slowly. See a healthcare provider right away if you develop severe upper stomach pain, as well as a fever and bleeding. Heart or Lung Problems It's less common, but heart and lung problems can cause upper stomach pain. A pulmonary embolism, for example, occurs if there's a blockage like a blood clot in a lung artery. Symptoms include chest discomfort, coughing up blood, and shortness of breath. A heart attack can also be mistaken for upper stomach pain. You may feel pain in the center or left side of your chest that can feel like pressure or fullness. Other heart attack symptoms include: Dizziness or lightheadednessPain in one or both arms, back, jaw, neckNausea or vomitingShortness of breath Both conditions are medical emergencies that require prompt treatment. Call 911 or visit the nearest emergency room if you or someone you love has symptoms of either a pulmonary embolism or heart attack. How To Relieve Upper Stomach Pain Upper stomach pain is usually treatable at home. Treatment depends on the cause but can include: Applying heat: You can try placing a heating pad or warm water bottle on your stomach if your pain is cramp-like. Taking a hot bath might also relieve the pain. Avoiding foods that can irritate your stomach: Citrus, high-fat, and greasy foods may upset your stomach. It may also be helpful to avoid tomato products, coffee, alcohol, carbonated beverages, and sparkling water. Avoiding solid food for a few hours: This helps the digestive system rest, especially if vomiting occurs with your stomach pain. Drinking water and other clear fluids: Take small sips of clear fluids for 24 to 36 hours. Exercising: Regularly working out might relieve some types of stomach pain, such as cramps. Taking antacids: Upper stomach pain after eating may be related to GERD or indigestion. An antacid can calm the acidity in your stomach. Speak with a healthcare provider before taking any over-the-counter drugs like Tylenol (acetaminophen) or a non-steroidal anti-inflammatory drug (NSAID) like aspirin. A provider can also address stomach pain that can't be treated at home. A healthcare provider can determine what course of treatment is necessary based on what's causing your pain. Treatments may include lifestyle changes, medications, or surgery. When To Contact a Healthcare Provider Some symptoms may prompt you to contact a healthcare provider if you have upper stomach pain. Speak with a healthcare provider if you have: Bloating for more than two days Burning or pain while urinating Diarrhea for more than five days Frequent urination Loss of appetite for a prolonged time Pain accompanied by a high fever of 100 degrees in adults or 100.4 degrees in children Pain or discomfort that lasts longer than one week Pain that becomes more frequent or severe over the course of one to two days and that's accompanied by nausea and vomiting Prolonged vaginal bleeding Unexplained weight loss When To Get Immediate Medical Attention Get immediate medical attention if you are:Experiencing chest, neck, or shoulder painFeeling firmness or tenderness in your bellyHaving pain in or between your shoulder blades and nauseaHaving sudden, sharp abdominal painHaving trouble breathingPregnant or may be pregnantProducing bloody vomit or stool (especially if the blood is bright red, dark, or tarry black)Recovering from a recent abdominal injuryUndergoing cancer treatmentVomiting but unable to make a bowel movement A Quick Review Upper stomach pain can vary in where it hurts, how it feels, how severe it is, and how long it lasts. Stomach pain can be generalized or localized, which can be spread across your belly or limited to a particular point. The pain may be cramp-like or colicky, meaning it comes and goes in waves. You may feel upper stomach pain for many reasons, including gas, indigestion, stomach viruses, and GERD. You can sometimes relieve upper stomach pain at home with dietary changes, heating pads, and exercise. More severe causes may include appendicitis, bowel obstruction, and ulcers. Medical intervention from a healthcare provider is often necessary in these cases. Was this page helpful? Thanks for your feedback! Tell us why! Other Submit 22 Sources Health.com 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. MedlinePlus. Abdominal pain. MedlinePlus. Indigestion. MedlinePlus. Gas. MedlinePlus. Peptic ulcer. MedlinePlus. Aches and pains during pregnancy. Wade CI, Streitz MJ. Anatomy, abdomen and pelvis: Abdomen. In: StatPearls. StatPearls Publishing; 2024. Mehta H. Abdominal pain. In: David SS, ed. Clinical Pathways in Emergency Medicine. Springer India; 2016:329-345. doi:10.1007/978-81-322-2710-6_26 MedlinePlus. Gastritis. MedlinePlus. Gastroenteritis. MedlinePlus. Appendicitis. MedlinePlus. Intestinal obstruction. MedlinePlus. Diverticulosis and diverticulitis. MedlinePlus. Gallstones. MedlinePlus. GERD. National Institute of Diabetes and Digestive and Kidney Diseases. Symptoms & causes of gallstones. MedlinePlus. Hepatitis. MedlinePlus. Pancreatitis. MedlinePlus. Liver cancer. MedlinePlus. Pancreatic cancer. MedlinePlus. Muscles aches. MedlinePlus. Pulmonary embolism. MedlinePlus. Heart attack.