Epigastric pain is a name for pain or discomfort right below your ribs in the area of your upper abdomen. There are several possible causes, and many are related to the digestive system.

Epigastric pain is not always a cause for concern. It may be due to something harmless, like overeating or lactose intolerance, or an underlying condition such as gastroesophageal reflux disease (GERD), inflammation, or infection.

Knowing what’s causing your epigastric pain is important so you can work with a doctor to manage any underlying conditions.

Keep reading to learn more about what may be causing your symptoms.

Epigastric pain is a term to describe discomfort or aching that occurs beneath your rib cage in your upper abdominal region.

How it feels exactly depends on the underlying cause, but it often happens alongside other common digestive symptoms, such as heartburn, bloating, and gas.

Epigastric pain has many possible causes, especially when it happens right after eating.

1. Acid reflux

Acid reflux is when some of your stomach acid or the food in your stomach washes back up into your esophagus. When this happens, it can cause pain in your chest and throat.

Over time, constant acid reflux can cause GERD. Your doctor can provide a treatment plan to help you manage your GERD symptoms.

Learn more about the differences between heartburn, acid reflux, and GERD.

2. Heartburn and indigestion

Heartburn is also a result of acid reflux. Indigestion (dyspepsia) is a name for digestive symptoms that happen when you eat foods that don’t seem to agree with you.

The most common symptom of heartburn is a burning feeling in your chest after you eat. This burning sensation is usually worse when you lie or bend down. This is because the acid moves farther up your esophagus in these positions.

Learn how to prevent acid reflux and heartburn.

3. Lactose intolerance

Lactose intolerance happens when your body has trouble digesting dairy products, such as milk or cheese. Dairy products all contain a type of sugar called lactose. Typically, symptoms will occur every time you eat dairy.

Lactose intolerance often develops when you don’t have enough lactase. This enzyme is important in breaking down the sugar lactose.

Learn more about the symptoms of lactose intolerance.

3. Alcohol

Drinking alcohol moderately — about one drink per day — usually doesn’t cause stomach pain.

But drinking too much alcohol at one time or over a long period of time can cause your stomach lining to become inflamed. Long-term inflammation can lead to bleeding.

Drinking too much can also cause conditions such as:

These conditions can all cause epigastric pain, too.

Read more on what to eat and avoid with gastritis.

5. Overeating

When you eat too much, your stomach can expand beyond its usual size. This puts a lot of pressure on the organs around it. This pressure can cause pain in your gut. It can also make breathing hard because your lungs have less room to expand when you inhale.

Overeating can also cause stomach acid and contents to return to your esophagus. This can cause heartburn and acid reflux. These conditions can make the epigastric pain that you feel after eating much worse.

If you have an eating disorder related to binge eating, repeated vomiting after eating can also cause epigastric pain.

Learn about 23 ways you can stop overeating.

6. Hiatal hernia

A hiatal hernia happens when part of your stomach gets pushed up toward your diaphragm through the hole that the esophagus passes through, which is called the hiatus.

Hiatal hernias don’t always cause pain or discomfort. If they do, it could feel like epigastric pain or heartburn.

Learn more about the symptoms of a hiatal hernia.

7. Esophagitis

Esophagitis occurs when the lining of your esophagus becomes inflamed.

Common causes include:

  • acid coming back up from your stomach
  • allergies
  • infection
  • chronic irritation from medications

If left untreated, esophagitis can eventually lead to scarring on your esophageal lining.

Read about the symptoms of esophagitis.

8. Gastritis

Gastritis happens when the lining of your stomach (mucosa) becomes inflamed due to a bacterial infection, an immune system disorder, or ongoing damage to your stomach.

It can be acute, last briefly, or chronic, lasting for years or more if left untreated.

Learn more about the symptoms of gastritis.

9. Peptic ulcer disease

Peptic ulcer disease happens when the lining of your stomach or small intestine gets damaged due to a bacterial infection or by taking too much of certain medications, such as nonsteroidal anti-inflammatory drugs (NSAIDs).

Learn about other symptoms of peptic ulcer disease.

10. Barrett’s esophagus

Barrett’s esophagus occurs when the tissue that lines your esophagus becomes more like the tissue lining your intestines. This is known as intestinal metaplasia.

If you develop this condition, you’ll need to work closely with your doctor to manage symptoms. Untreated Barrett’s esophagus can lead to cancer of the esophagus. GERD, smoking, drinking alcohol, and obesity are risk factors for this type of cancer.

This condition does not have any unique symptoms. If it happens because of GERD, you may have GERD-related symptoms.

Learn more about Barrett’s esophagus.

11. Gallbladder inflammation or gallstones

Epigastric pain can develop when your gallbladder becomes inflamed as gallstones block the opening of your gallbladder. The condition is known as cholecystitis.

This can be painful and may require hospitalization or surgery.

Understand the symptoms of gallbladder inflammation.

12. Epigastric pain in pregnancy

Mild epigastric pain is common while you’re pregnant due to the pressure that your pregnancy puts on your abdominal area. It’s also common because of the changes in your hormones and digestion.

You may also experience frequent heartburn while you’re pregnant.

However, significant epigastric pain in pregnancy is sometimes a symptom of a serious condition known as preeclampsia. You’ll want to work closely with your doctor, as this can become life threatening if severe.

You’ll require close observation, blood pressure checks, blood tests, and urine tests to rule this out as a cause of epigastric pain.

Learn more about the symptoms of preeclampsia.

13. Coronary artery disease

Coronary artery disease (CAD), also called ischemic heart disease, can present with what may feel like gastrointestinal symptoms, including abdominal pain. This is particularly common in females.

Read about additional symptoms of coronary artery disease.

14. Enlarged spleen

An enlarged spleen is also called splenomegaly.

The spleen is a vital part of your immune system, located on the left side of your body beneath the rib cage. Various conditions or diseases can lead to an enlarged spleen.

If it isn’t treated promptly, it can rupture, which can be life threatening.

Not everyone with an enlarged spleen will experience symptoms, but it can feel like a pain in the abdomen where the spleen is located.

Learn more about an enlarged spleen.

Treatment for epigastric pain depends on the cause. If your pain is from your diet or overeating, your doctor may recommend changing your eating habits or lifestyle.

Some changes might include:

  • exercising for about 30 minutes a day
  • eating more nutrient-dense foods that don’t upset your stomach
  • eating foods like ginger or taking vitamin B supplements to help relieve symptoms of nausea or vomiting

If the pain is from taking certain medications, such as NSAIDs, your doctor may recommend you stop and help you find another way to manage your pain. Your doctor may also suggest antacids or acid-blocking medications to relieve your pain.

If an underlying condition such as GERD, Barrett’s esophagus, or peptic ulcer disease is causing your epigastric pain, you may need antibiotics and long-term treatments to manage these conditions. Treatment may last for months or even the duration of your life, depending on the cause.

Reach out to your doctor immediately if your epigastric pain is severe, ongoing, or is interfering with your daily life.

Since there are life threatening conditions that can present with epigastric pain, such as CAD, it’s important you go to the emergency room if you have any of the following symptoms:

  • trouble breathing or swallowing
  • throwing up blood
  • blood in your stool or black, tarry stool
  • high fever
  • chest pain
  • difficulty breathing
  • passing out

You should also contact your doctor if your symptoms last over a few days without improving with over-the-counter or home treatments.

Epigastric pain is a term used to describe pain or discomfort located beneath the ribcage in your upper abdomen. It can have various causes, many associated with the digestive system.

Depending on the cause of the pain, epigastric pain may be harmless. That said, consider contacting a healthcare professional to find out what’s causing your pain. It might be something like lactose intolerance or an underlying condition like GERD, which can be treated.

Contacting your doctor as soon as you notice epigastric pain that won’t go away can help you find relief for your symptoms.