Doctors Note Logo

Published on: 9/13/2026

Can gallstones or an ulcer cause upper stomach pain and nausea?

Yes, both gallstones and peptic ulcers are common causes of upper abdominal pain paired with nausea, though the pattern of symptoms differs in important ways. Gallstone pain often strikes the upper right abdomen after fatty meals, can radiate to the right shoulder or back, and may last from 30 minutes to several hours, sometimes with vomiting, fever, or yellowing skin. Ulcer pain is usually centered in the upper middle abdomen, may feel burning or gnawing, and can improve or worsen with eating, occasionally accompanied by bloating, dark stools, or vomiting blood. Other conditions such as gastritis, pancreatitis, acid reflux, and even heart problems can mimic these symptoms, so there are several factors to consider before assuming a cause, and the warning signs that require urgent care are outlined below.

Because these conditions overlap so closely yet call for very different treatment, from dietary changes and acid-reducing medication to surgery, sorting out the likely source of your pain matters. A free, instant, online symptom check takes only a few minutes, helps you organize what you are feeling into clear possibilities, and shows you which next step makes sense, whether that is monitoring at home, booking a visit, or seeking emergency care now.

Last reviewed for medical accuracy: 09/13/2025

answer background

Explanation

Can Gallstones or an Ulcer Cause Upper Stomach Pain and Nausea?

Upper stomach pain and nausea are common complaints that can disrupt daily life. Two possible sources of these symptoms are gallstones and peptic ulcers. Understanding how each condition leads to discomfort, what other signs to watch for, and when to seek medical help can empower you to take appropriate action.

How Gallstones Lead to Upper Stomach Pain and Nausea

Gallstones are hardened deposits of bile that form in the gallbladder. When they block the normal flow of bile, they can trigger a range of digestive symptoms, including upper stomach pain and nausea.

Key points about gallstones:

  • Location of pain
    Pain is often felt in the upper right or center of the abdomen, just below the ribs. It may also radiate to the back or right shoulder blade.
  • Nature of pain
    Often described as a steady, severe ache or pressure. Attacks (biliary colic) can last from 30 minutes to several hours.
  • Triggers
    Fatty or rich meals can provoke pain, as bile is released to digest fats.
  • Associated nausea
    Bile backup irritates the stomach and small intestine, leading to queasiness and sometimes vomiting.
  • Other possible signs
    • Yellowing of the skin or eyes (jaundice)
    • Dark urine or pale stools
    • Fever and chills (if infection develops)

Clinical resources such as the American College of Gastroenterology note that up to 20% of adults develop gallstones by age 65, and many are asymptomatic. When symptoms do occur, they typically involve the pattern above.

How an Ulcer Causes Upper Stomach Pain and Nausea

Peptic ulcers are sores in the lining of the stomach (gastric ulcers) or the first part of the small intestine (duodenal ulcers). They develop when stomach acid damages the protective mucosal layer.

Ulcer-related upper stomach pain and nausea often present as follows:

  • Pain location and timing
    • Gastric ulcer pain: felt in the upper middle abdomen, usually worse shortly after eating.
    • Duodenal ulcer pain: may improve with eating but returns 2–3 hours later or during the night.
  • Quality of pain
    • Burning, gnawing or aching sensation.
    • May last minutes to hours.
  • Nausea
    • Irritation and inflammation of the stomach lining can trigger queasiness.
    • Sometimes accompanied by a feeling of fullness or bloating.
  • Warnings signs
    • Vomiting blood or coffee-ground–like material
    • Black, tarry stools
    • Unintentional weight loss
    • Severe, unrelenting abdominal pain

According to guidelines from the U.S. National Institutes of Health, Helicobacter pylori infection and long-term nonsteroidal anti-inflammatory drug (NSAID) use are the most common causes of peptic ulcers.

Comparing Gallstones and Ulcers

Feature Gallstones Peptic Ulcer
Pain location Upper right or center, may reach back/shoulder Upper middle, depends on ulcer location
Timing Often after fatty meals Related to meal timing or nighttime
Nature of pain Steady, severe ache or pressure Burning, gnawing or aching
Nausea Common, may lead to vomiting Common, often with bloating
Other signs Jaundice, dark urine, pale stools, fever Vomiting blood, black stools, weight loss

Other Potential Causes of Upper Stomach Pain and Nausea

While gallstones and ulcers are important considerations, other conditions can cause similar symptoms:

  • Gastritis: inflammation of the stomach lining, often from stress, alcohol, or medications
  • Pancreatitis: inflammation of the pancreas, characterized by intense pain radiating to the back
  • Gastroesophageal reflux disease (GERD): acid reflux causing heartburn and upper abdominal discomfort
  • Functional dyspepsia: chronic upper abdominal discomfort without an identifiable cause
  • Food intolerances or infections: can trigger transient pain and nausea

If you’re uncertain which applies to you, consider a free, online symptom check, using the doctor approved Ubie Symptom Checker.

When to Seek Medical Help

Most cases of mild, infrequent upper stomach pain and nausea can be monitored at home with dietary adjustments and over-the-counter remedies. However, certain “red flag” symptoms warrant prompt evaluation:

  • Severe or sudden pain
  • Pain combined with lightheadedness or fainting
  • Persistent vomiting (especially vomiting blood)
  • Black or bloody stools
  • Jaundice (yellowing of skin or eyes)
  • Unexplained weight loss
  • High fever or chills

If you experience any of these warning signs, speak to a doctor right away or go to the nearest emergency department.

Managing Symptoms at Home

For mild or occasional episodes of upper stomach pain and nausea, you might try:

  • Dietary changes
    • Eat smaller, more frequent meals
    • Limit fatty, spicy, or acidic foods
    • Avoid alcohol and caffeine
  • Lifestyle adjustments
    • Maintain a healthy weight
    • Stop smoking
    • Reduce stress through relaxation techniques
  • Over-the-counter options
    • Antacids (for ulcer or mild heartburn)
    • H2 blockers or proton pump inhibitors (for ulcers or GERD)
    • Pain relief only with doctor’s approval (avoid NSAIDs if you suspect an ulcer)

These measures can ease discomfort, but they don’t replace a medical evaluation if symptoms persist or worsen.

Diagnosis and Treatment

Gallstones

  • Ultrasound is the primary tool to detect gallstones.
  • Medical management may include dietary fat restriction.
  • Surgical removal of the gallbladder (cholecystectomy) is often recommended if stones cause recurrent pain or complications.

Peptic Ulcer

  • Endoscopy helps visualize and biopsy the ulcer.
  • H. pylori testing guides antibiotic therapy if infection is present.
  • Acid-reducing medications (proton pump inhibitors) promote healing.
  • Avoidance of NSAIDs and ulcer-triggering foods is essential.

Most people recover fully with appropriate treatment. Regular follow-up ensures complications don’t arise.

Take Charge of Your Health

Upper stomach pain and nausea can stem from a variety of causes, including gallstones or a peptic ulcer. Paying attention to the pattern, timing and accompanying signs helps narrow down the possibilities. While mild cases can improve with home care, persistent or severe symptoms deserve prompt medical attention.

If you’re unsure what’s causing your discomfort, consider doing a free, online symptom check, using the doctor approved Ubie Symptom Checker. And if you ever experience life-threatening or worrisome signs—such as severe pain, vomiting blood or black stools—speak to a doctor immediately. Your health and peace of mind are worth it.

(References)

  • * Doldi SB, Micheletto G, Montorsi W. [Bile-dependent gastrointestinal dyspepsia]. Minerva Med. 1984 Sep 8;75(34):1911-9. PMID: 6483249.

  • * Cheer SM, Goa KL. Parecoxib (parecoxib sodium). Drugs. 2001;61(8):1133-41; discussion 1142-3. doi: 10.2165/00003495-200161080-00010. PMID: 11465874.

  • * Mackay S, Dillane P. Biliary pain. Aust Fam Physician. 2004 Dec;33(12):977-81. PMID: 15630917.

  • * Jayant M, Kaushik R, Attri AK. Spontaneous cholecystocutaneous abscess. Indian J Gastroenterol. 2014 Sep;33(5):498. doi: 10.1007/s12664-013-0401-7. PMID: 24037766.

  • * Burmeister G, Hinz S, Schafmayer C. [Acute Cholecystitis]. Zentralbl Chir. 2018 Aug;143(4):392-399. doi: 10.1055/a-0631-9463. Epub 2018 Aug 22. PMID: 30134498.

  • * Guest RV, Søreide K. Pain after cholecystectomy for symptomatic gallstones. Lancet. 2019 Jun 8;393(10188):2280-2281. doi: 10.1016/S0140-6736(19)30959-6. Epub 2019 Apr 27. PMID: 31036335.

  • * Dilmaghani S, Sweetser S. Dropping the Diagnosis. Gastroenterology. 2021 Feb;160(3):e10-e11. doi: 10.1053/j.gastro.2020.06.051. Epub 2020 Jun 27. PMID: 32598886.

  • * Lax Y, Singh A. Referred Abdominal Pain. Pediatr Rev. 2020 Aug;41(8):430-433. doi: 10.1542/pir.2019-0221. PMID: 32737258.

  • * Comes DJ, Wennmacker SZ, Latenstein CSS, van der Bilt J, Buyne O, Donkervoort SC, Heisterkamp J, In't Hof K, Jansen J, Nieuwenhuijs VB, Steenvoorde P, Stockmann HBAC, Boerma D, Drenth JPH, van Laarhoven CJHM, Boermeester MA, Dijkgraaf MGW, de Reuver PR. Restrictive Strategy vs Usual Care for Cholecystectomy in Patients With Abdominal Pain and Gallstones: 5-Year Follow-Up of the SECURE Randomized Clinical Trial. JAMA Surg. 2024 Nov 1;159(11):1235-1243. doi: 10.1001/jamasurg.2024.3080. PMID: 39167382; PMCID: PMC11339699.

  • * Vakil N. Peptic Ulcer Disease: A Review. JAMA. 2024 Dec 3;332(21):1832-1842. doi: 10.1001/jama.2024.19094. PMID: 39466269.

Thinking about asking ChatGPT?Ask me instead

Tell your friends about us.

We would love to help them too.

smily Shiba-inu looking

For First Time Users

What is Ubie’s Doctor’s Note?

We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.

Was this page helpful?

Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.