Stomachaches are a common complaint in children and adults. The upper stomach houses several vital structures, including the upper intestines, gallbladder, liver, and pancreas. While many issues responsible for upper stomach pain, such as gas or a stomach virus, are not cause for concern, others may require medical treatment.

Several conditions can cause upper stomach pain. In many cases, one condition can lead to another. For example, ulcers may cause indigestion, or gallstones may cause liver dysfunction.

In this article, learn about ten possible causes of upper stomach pain, as well as treatment options and when to see a doctor.

Causes of upper stomach pain can include:

Woman with upper stomach pain
A cause of upper stomach pain may be gas.

Gas occurs naturally in the intestines and digestive tract. When this gas accumulates, it can cause feelings of pressure, bloating, or fullness.

An infection, virus, diarrhea, or constipation can cause gas pain to become very intense.

Gas may be the culprit if:

  • The pain comes in waves.
  • The pain causes the stomach to swell.
  • It feels like something is moving in the stomach.
  • There is burping or passing of gas.
  • A person has diarrhea or constipation.

Gas pain is not usually serious, and over-the-counter (OTC) medicines can help. A person can also try eating more slowly to avoid swallowing air and prevent the gas from getting worse. Some people notice that certain foods, such as broccoli, are more likely to cause gas pain.

Gas usually goes away, without treatment, within a few hours. If it occurs with a fever, uncontrolled vomiting, or intense pain, it is best to see a doctor.

Indigestion is a burning feeling in the upper stomach, and sometimes in the mouth or throat. The pain may also feel like it stems from the chest.

The medical term for indigestion is dyspepsia. It usually appears when there is too much acid in the stomach, which can happen after eating highly acidic foods.

Less commonly, indigestion can result from a stomach ulcer, acid reflux, or even stomach cancer. Frequent indigestion that is very painful or occurs with unexplained weight loss could be a sign of a more serious concern.

OTC medicines are highly effective at managing temporary indigestion. Identifying the triggers, such as certain foods, can help a person make healthful lifestyle changes.

People with frequent or severe indigestion may wish to speak to a doctor about managing their symptoms or diagnosing an underlying cause.

Gastritis causes the stomach lining to become swollen and painful.

Acute gastritis occurs in the short term and comes on quickly, usually because of a bacterial infection, such as with Helicobacter pylori bacteria.

Some conditions irritate the stomach lining, causing chronic gastritis.

Causes of chronic gastritis include:

  • Crohn's disease
  • autoimmune diseases
  • sarcoidosis
  • allergies
  • viruses in people with weakened immune systems

Antibiotics can usually treat bacterial infections. When gastritis is chronic, diagnosing and treating the underlying cause can help.

For many people, reducing stomach acid by eating a less acidic diet or taking medications can also help. Pain relievers can help with symptoms, while medicines that protect the stomach lining can prevent the symptoms from getting worse.

Stomach viruses can cause vomiting and nausea.

Gastroenteritis is a stomach virus that can cause nausea, vomiting, and diarrhea, in addition to upper stomach pain. People with a stomach virus may also have headaches, muscle aches, and low energy.

Some people call gastroenteritis the stomach flu, but it is not actually a type of flu.

For most people, symptoms go away on their own within a few days. Avoiding heavy meals and drinking only clear liquids can help a person stop vomiting.

It is vital to avoid dehydration, so consider drinking something that restores electrolytes, such as a sports drink, until the symptoms pass.

Some people may need medical treatment to avoid dehydration, including those with weakened immune systems, babies and very young children, and people with serious health conditions, such as cancer.

Appendicitis is an infection of the appendix. Without treatment, it can cause the appendix to rupture, and the condition can become life-threatening.

In the early stages of appendicitis, a person may notice a dull ache around their belly button, but this pain can radiate to the upper stomach. As the infection gets worse, the pain moves to the lower-right side.

In most cases, a doctor treats appendicitis by removing the appendix.

Gallstones are hard formations of cholesterol or bilirubin that can develop in the gallbladder. They do not always cause problems, but sometimes they block a biliary duct.

A blockage from a gallstone can cause intense pain in the upper-right stomach, as well as vomiting, fatigue, and exhaustion.

Untreated gallstones can affect the functioning of the liver and pancreas. When this happens, a person may experience jaundice, which is yellowing of the skin and eyes, or they may develop a serious infection of the pancreas.

In most cases, a doctor treats gallstones by removing the gallbladder, and a person can live a regular life without this organ. Or, a doctor may prescribe medication to dissolve the stones.

If gallstones pass on their own, a doctor may recommend lifestyle changes, such as more exercise or a lower-fat diet, to reduce the risk of the stones reoccurring.

The liver, pancreas, and gallbladder work together to support digestion. All three organs are in the upper-right side of the stomach.

Sometimes, untreated gallstones block biliary ducts, causing pain in the liver or pancreas.

Liver diseases, such as hepatitis, can cause liver pain. Pancreatitis, which is inflammation of the pancreas, may also cause pain. Some other causes, such as liver or pancreatic cancer, are less likely.

Additional symptoms of liver or pancreas problems include:

  • yellow eyes or skin
  • dark urine
  • very pale or white bowel movements
  • nausea
  • vomiting
  • pain that gets progressively worse

The right treatment depends on the underlying cause. People with pancreatitis may need to stay in the hospital for fluids and observation. Liver diseases require medication, and a liver transplant can treat advanced liver disease.

Cancers of the liver and pancreas can require chemotherapy, radiation, or surgery. Regardless of the cause of pain in the liver or pancreas, a prompt diagnosis can be life-saving.

Small pouches called diverticula can appear in the intestines, . When these pouches become inflamed or infected, a person can develop intense abdominal pain.

The location of the pain depends on where the diverticula are. While diverticula are more common in the lower intestines, they can also appear in the upper intestines, causing pain in the upper stomach.

Diverticulitis may also affect bowel function, causing symptoms such as constipation and diarrhea.

Probiotics and a high-fiber diet often help treat diverticulitis. If the infection gets worse or does not go away, a doctor may perform a surgery to remove the diverticula or a part of the intestines.

A person should see a doctor within 24 hours if they have a fever and abdominal pain.

In most cases, it is safe to wait and see if upper stomach pain goes away without treatment. If the pain persists or gets worse, it is best to see a doctor.

See a doctor within 24 hours if:

Go to the emergency room or seek urgent care if:

  • There is severe pain in the upper-right abdomen.
  • The stomach pain is unbearable.
  • There is stomach pain and white or pale stool.
  • A pregnant woman develops severe abdominal pain.
  • A person develops signs of severe dehydration, such as not urinating, chapped lips, very dry skin, confusion, dizziness, or sunken eyes.
  • A newborn has persistent vomiting or a high fever.