How to Relieve Upper Stomach Pain? Doctor Explains.

Our content is not intended nor recommended as a substitute for medical advice by your doctor. Use for informational purposes only.

What Causes upper stomach pain

The answer to your question about upper stomach pain is impossible without knowing the origin of your pain. Your health is not a matter of assumptions.

Answering such questions is impossible without knowing you, the disease or condition causing upper stomach pain, your age, your co-existing diseases, and your current medications.

If you already know the disease-causing upper stomach pain, jump to the section below describing your disease. If you are not sure, consult your doctor to get a diagnosis.

Common causes of upper stomach pain include:

  • Gastritis: the inflammation of your gastric lining due to infection (acute viral gastroenteritis,  chronic H. pylori infection, Non-steroidal anti-inflammatory drugs use, and others).
  • Peptic ulcer disease (PUD): PUD is ulceration in the wall of your stomach or duodenum. It is often a consequence of chronic gastritis (NSAIDs use or H. pylori infection.
  • Gallbladder conditions such as gallstone disease, acute cholecystitis, and chronic cholecystitis cause upper stomach pain (in the middle of the upper-right quadrant of your abdomen).
  • Functional dyspepsia: recurrent discomfort or pain in the upper stomach area after eating. It is also called (indigestion).
  • Irritable bowel syndrome (IBS): a common functional bowel disease with recurrent stomach pain. However, IBS rarely causes isolated upper stomach pain. Instead, it tends to cause generalized or lower abdominal pain. However, Because of its high prevalence, we should consider it a cause of upper stomach pain.
  • Other less frequent causes of upper stomach pain include acute and chronic pancreatitis, coronary heart disease, acute hepatitis, liver cancer, stomach cancer, IBD, etc.

Below, you will find the symptoms suggestive for each cause and the most important pain relief strategies.

1. Gastritis and stomach ulcer pain relief.

Gastritis and peptic ulcer disease are the most common cause of localized upper stomach pain in the middle. Thus, They will be the most

Symptoms of gastritis and peptic ulcer disease (PUD):

  • Burning or gnawing upper stomach pain (epigastric pain).
  • The pain often worsens after meals (especially with fatty and spicy foods).
  • A feeling of fullness or bloating in the upper stomach area.
  • Nausea with or without vomiting.
  • Heartburn.
  • Bleeding ulcers can cause vomiting of blood (hematemesis) or passage of black stool (melena). Severe bleeding can lead to shock (low blood pressure) and anemia.
  • Gastritis and peptic ulcer disease.

How your doctor diagnoses gastritis and peptic ulcer disease:

  • Based on clinical symptoms and signs of gastritis.
  • History of Non-steroidal anti-inflammatory drugs.
  • Performing endoscopy to visualize the inflammation and ulcers.
  • Testing for H. pylori (urea breath test, stool antigen test, or taking a biopsy via the endoscope).

Best upper stomach pain relief tips for gastritis and peptic ulcer disease.

  • Avoid trigger foods such as Fatty foods, spicy foods, fried foods, acidic foods as tomatoes, caffeine, and  Citrus fruits. Learn More.
  • Use acid-neutralizing drug (antacid):
    Antiacids work instantly to relieve upper stomach pain from gastritis and peptic ulcer. Take them if the pain is severe, or take them premeal.

    However, You cannot use them for long periods due to side effects as diarrhea, kidney stone formation, and others. Learn more.

    Common Antacids that are available OTC:

  • Aluminum hydroxide gel (Alternagel, Amphojel)
  • Calcium carbonate (Alka-Seltzer, Tums)
  • Magnesium hydroxide (Milk of Magnesia)
  • Gaviscon, Gelusil, Maalox, Mylanta, Rolaids.
  • Pepto-Bismol.
  • Use H2 blocker:
    such as Famotidine (Pepcid). Famotidine acts by decreasing stomach acid secretion and relieving the pain. Thus, it is an effective drug for gastritis upper stomach pain.


  • Use a PPI (Most effective):
    Proton pump inhibitors (PPIs) are the most potent stomach acid inhibitors. They are the most potent pain upper stomach pain reliever. In addition, PPIs can heal stomach ulcers when you take them properly.
    Ask your doctor about the optimum dose and duration that fits your condition.

    They are available over-the-counter. However, Your doctor is the one who can determine the best dosing and frequency. Long-term use of PPIs can cause more harm than good. Don’t over-use any medications without permission from your doctor.

    Examples of Common PPIs to relieve upper stomach pain from gastritis:

  • Omeprazole (Prilosec ®).
  • Esomeprazole (Nexium ®).
  • Pantoprazole (ProtonIX ®).
  • Rabeprazole (Aciphex,  Pariet ®).
  • Dexlansoprazole (Dexilant ®).
  • Quit smoking and alcoholo.

2. Gallbladder Pain relief.

Gallbladder diseases are not uncommon. Gallbladder diseases such as gallstone disease or acute cholecystitis can cause severe upper stomach pain.

The treatment of upper stomach pain due to biliary colic (gallbladder pain) is entirely different from the treatment of gastritis.

For example, Non-steroidal anti-inflammatory drugs are used to relieve gallbladder pain; The same drug that worsens gastritis and peptic ulcer pain. And that’s why you must get diagnosed first.


The symptoms of gallbladder pain (biliary colic) in the upper stomach area and differences are shown below.

 Gallbladder pain (biliary colic).Peptic ulcer pain
1. Site (typical)Right-upper abdomen.Mid-upper abdomen (epigastric)
2. Spread)To the right-back and the epigastric area.Sometimes, to the mid-upper back.
3. CharacterConstant. It builds up over 30-60 minutes then resolves gradually.Constant gnawing or dull aching pain. It starts gradually and may last for several days.
4. Duration– At least 30 minutes.
– Maximum is 6 hours.
Several hours to several days or weeks.
5. Pain intensity++++++++ or ++++
6. Nausea & vomiting+++++

3. Functional dyspepsia pain relief

Functional dyspepsia is another widespread disease affecting Up to 20% of people worldwide (reference).

Functional dyspepsia is also known as (Non-ulcer dyspepsia). The name (non-ulcer dyspepsia) is used because it causes upper stomach pain (epigastric pain or discomfort) in the absence of gastritis and peptic ulcer disease.

The exact cause is still unknown. Researchers think it is due to psychological factors (stress and anxiety). Others believe it is due to multiple factors such as infections, medications, overweight, smoking, and others (reference.).


Functional dyspepsia is diagnosed based on the presence of one or more of the following (in the absence of gastritis and stomach ulcers):

  • Epigastric pain after meals.
  • Early satiety.
  • Fullness in the upper stomach area after meals.
  • The symptoms have to be recurrent at least one day per week for at least three months.
  • Also, the onset of the first symptom should be at least six months.


Functional dyspepsia is more challenging to control because we seldom understand its mechanism. Available treatments aim at symptom control rather than cure.

Examples of treatments used to relieve upper stomach pain due to functional dyspepsia:

  • H2 blockers.
  • Proton Pump inhibitors (PPIs).
  • Sticking to peptic ulcer diet (explained above).
  • Prokinetic drugs as Metoclopramide and Itopride.
  • Pain modulators such as Tricyclic Antidepressants (TCAs) and SSRIs (selective serotonin reuptake inhibitors).
  • Herbal supplements such as Peppermint oil (however, it may increase the epigastric burning in some patients, Karawi oil, and others).
  • Eating smaller, more frequent meals instead of large meals.
  • Acupuncture.
  • Psychotherapy as CBT (cognitive behavioral therapy).
  • Digestive enzyme supplements (weak evidence).

Different people respond to various combinations of treatments.

Works with your doctor:

  • First, to confirm the diagnosis of functional dyspepsia by excluding other causes of upper stomach pain.
  • Second, to determine the best treatment that fits your condition. Again, a period of trial and error is often needed to find the best medicine. Your doctor usually will start with an H2 blocker or a PPI for four weeks.

4. Other causes of upper stomach pain & What to do about them.

The first three causes are often responsible for more than 95% of the cases of upper stomach pain.

The below condition is either rare or rarely causes isolated stomach pain.

  • IBS (irritable bowel syndrome) is another functional bowel disorder characterized by recurrent stomach pain (often diffuse rather than the upper stomach area).
    IBS stomach pain is often relieved by a combination of diet restriction (low FODMAP diet) and medications such as ant-spasmodic.
  • Food intolerance is prevalent; it occurs due to difficulty digesting certain foods (the commonest is lactose intolerance).
    Upper stomach pain is relieved by avoiding the offending food. Learn More.
  • Celiac disease is a food allergy to a protein called gluten (found in wheat, rye, and barley).
  • Gastroparesis: in this condition, your stomach is unable to properly move and propel its contents. It occurs to a variety of causes. Unfortunately, 50% of the cases are for unknown reasons. Learn More.
  • Gastric cancer.
  • Pancreatic diseases such as acute pancreatitis, chronic pancreatitis, or pancreatic cancer. All pancreatic conditions can cause upper stomach pain.
  • Coronary heart disease: Narrowing or occlusion of the blood supply supplying the lowermost part of the heart can lead to severe upper stomach pain.
    The pain often affects older male smokers with risk factors such as diabetes, hypertension, and a family history of heart disease.
    The pain is often of acute onset, related to exertion or stress. And it doesn’t respond to stomach acid treatment. 

In conclusion, No single best pain relief strategy works for everyone. You have to know the exact cause of your upper stomach pain. Always consult your doctor if you are not sure what caused it.