Doctors Note Logo

Published on: 9/13/2026

Can gallstones cause sharp pain under my right rib cage when I breathe?

Yes, gallstones can cause sharp pain under the right rib cage that worsens with deep breaths, because an inflamed gallbladder sits directly beneath the ribs and presses against the diaphragm as your lungs expand. This pain, often called biliary colic or a sign of cholecystitis, may last minutes to hours, spread to the right shoulder blade, and follow fatty meals, sometimes with nausea, fever, or yellowing skin. However, several other conditions can mimic it, including liver inflammation, pleurisy, pneumonia, rib injury, muscle strain, kidney stones, and acid reflux, so the details matter. There are important distinctions to consider, including which symptoms signal an emergency, so see below to understand more.

Because right-sided rib pain has many possible causes and a few of them need urgent care, the fastest way to sort out what is likely happening is to review your specific symptom pattern rather than guess. Take a free, instant, online symptom check to see which conditions match your pain, what red flags to watch for, and which type of doctor to see next.

Last reviewed for medical accuracy: 09/13/2026

answer background

Explanation

Can Gallstones Cause Sudden Sharp Pain Under Right Rib Cage When Breathing?

Experiencing a sudden sharp pain under your right rib cage when breathing can be unsettling. While gallstones are often blamed for upper abdominal discomfort, it’s important to understand how gallstones behave, when they might irritate nearby structures, and what other conditions can mimic this symptom. This guide will help you sort through the facts, recognize warning signs, and decide when to seek medical care.

How Gallstones Typically Present

Gallstones are hardened deposits of bile that form in the gallbladder. They most often lead to symptoms when a stone lodges in the cystic or common bile duct.

Common gallstone symptoms include:

  • Steady, intense pain (biliary colic) in the right upper abdomen
  • Pain that often starts 30 minutes to several hours after a fatty meal
  • Pain that may radiate to the right shoulder or back
  • Nausea, vomiting, or indigestion

Key points about gallstones and breathing pain:

  • Pure gallbladder colic rarely worsens with deep breaths.
  • Irritation of the diaphragm (the muscle beneath the lungs) by an inflamed gallbladder can cause sharp, pleuritic-type pain.
  • Acute cholecystitis (gallbladder inflammation) may inflame nearby tissues, leading to discomfort on deep inhalation.

Why Deep Breathing Can Trigger Pain

When you inhale, your diaphragm contracts and moves downward. If the gallbladder is inflamed or enlarged:

  1. It can press directly on the diaphragm.
  2. Inflamed tissues may become more sensitive to the movement of surrounding organs.
  3. Irritation in the right upper abdomen can feel like a sharp jabbing stitch with each breath.

In acute cholecystitis, you might notice:

  • A constant ache under the right ribs that intensifies with breathing
  • Low-grade fever, chills, or sweating
  • Tenderness when pressing on the right upper abdomen

If you’re having fever or persistent pain, it’s important to get checked promptly.

Other Causes of Sudden Sharp Pain Under Right Rib Cage When Breathing

Gallstones are not the only culprits. Here are other potential causes to consider:

1. Pleurisy or Pleuritic Pain

Inflammation of the lining around your lungs can lead to:

  • Sharp, stabbing pain worsened by deep breaths or coughing
  • Often accompanied by respiratory infection symptoms (cough, fever)

2. Pulmonary Embolism (PE)

A blood clot in the lung arteries may present with:

  • Sudden onset of sharp chest or upper abdominal pain
  • Shortness of breath, rapid heartbeat, lightheadedness
  • Risk factors: recent surgery, long flights, clotting disorders

3. Pneumonia or Lung Infection

Infection in the right lung lobe can irritate the pleura:

  • Sharp pain on inhalation, often with cough and sputum
  • Fever, chills, sweating, and overall fatigue

4. Costochondritis

Inflammation of the rib cartilage causes:

  • Sharp or aching pain at the front of the rib cage
  • Pain worsened by deep breaths, movement, or pressure on the chest wall
  • No fever or signs of infection

5. Muscle Strain or Rib Injury

Overuse or trauma to intercostal muscles or ribs can lead to:

  • Localized sharp pain with breathing or twisting motions
  • Tenderness to touch, swelling or bruising if injured

6. Liver and Biliary Tract Disorders

Beyond gallstones, other biliary or liver issues include:

  • Cholangitis (bile duct infection): fever, jaundice, severe pain
  • Hepatitis or liver abscess: generalized discomfort, fever, altered liver tests

When to Seek Urgent Medical Attention

Certain red flags mean you should seek immediate help:

  • Sudden, severe chest or abdominal pain
  • Difficulty breathing or shortness of breath
  • High fever (above 38°C/100.4°F) or chills
  • Rapid heartbeat or fainting spells
  • Jaundice (yellowing of skin or eyes)
  • Pain following trauma to the ribs or back

If any of these occur, call emergency services or go to the nearest emergency department.

Diagnostic Approach

Your healthcare provider may take the following steps:

  1. Medical history and physical exam
  2. Blood tests (liver enzymes, white blood cell count)
  3. Ultrasound of the gallbladder and bile ducts
  4. Chest X-ray or CT scan if lung issues are suspected
  5. ECG or cardiac enzymes if heart-related pain is a concern

Accurate diagnosis is key to effective treatment.

Treatment Options

For Gallstones and Cholecystitis

  • Pain relief (NSAIDs or acetaminophen)
  • Antibiotics if infection is present
  • Surgical removal of the gallbladder (cholecystectomy)
  • Dietary modifications to reduce fatty foods

For Pleuritic or Lung-Related Pain

  • Treat underlying infection (antibiotics for pneumonia)
  • Anti-inflammatory medications
  • Anticoagulation if pulmonary embolism is confirmed

For Musculoskeletal Causes

  • Rest and avoidance of aggravating activities
  • Heat or ice packs
  • Physical therapy or gentle stretching exercises

Self-Care Tips

While awaiting medical evaluation, you can:

  • Take over-the-counter pain relievers as directed
  • Apply a warm compress to the painful area
  • Practice gentle breathing exercises to maintain lung expansion
  • Avoid heavy meals, lying flat immediately after eating, or activities that worsen pain

Check Your Symptoms Online

If you’re unsure what might be causing your sudden sharp pain under the right rib cage when breathing, consider a free, online symptom check, using the doctor approved Ubie Symptom Checker. It can help guide your next steps and prepare you for a discussion with your healthcare provider.

Final Thoughts

Gallstones can indirectly cause sharp, pleuritic pain under the right rib cage by irritating the diaphragm, especially if the gallbladder is inflamed. However, many other conditions—from lung infections to musculoskeletal strains—can present with similar symptoms. Paying attention to the full picture of your symptoms, including fever, cough, or trauma history, will help you and your doctor find the right diagnosis and treatment.

Remember: If you experience any life-threatening or serious symptoms—such as severe chest pain, difficulty breathing, high fever, or signs of jaundice—seek medical attention immediately. Always speak to a doctor about any concerns to ensure you get the care you need.

(References)

  • * Kimura Y, Takada T, Kawarada Y, Nimura Y, Hirata K, Sekimoto M, Yoshida M, Mayumi T, Wada K, Miura F, Yasuda H, Yamashita Y, Nagino M, Hirota M, Tanaka A, Tsuyuguchi T, Strasberg SM, Gadacz TR. Definitions, pathophysiology, and epidemiology of acute cholangitis and cholecystitis: Tokyo Guidelines. J Hepatobiliary Pancreat Surg. 2007;14(1):15-26. doi: 10.1007/s00534-006-1152-y. Epub 2007 Jan 30. PMID: 17252293; PMCID: PMC2784509.

  • * Berkley T, Klamut K. Acute pancreatitis. Nursing. 2009 Jun;39(6):64. doi: 10.1097/01.NURSE.0000352346.90642.98. PMID: 19474621.

  • * Veloso N, Silva JD, Pires S, Godinho R, Medeiros I, Gonçalves L, Viveiros C. Bouveret's syndrome. Gastroenterol Hepatol. 2014 Nov;37(9):523-4. doi: 10.1016/j.gastrohep.2013.05.004. Epub 2014 Aug 15. PMID: 25131318.

  • * 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.

  • * 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.

  • * McNamee M, Chambers JG. Spilled Gallstones Presenting as Left Lower Quadant Abdominal Pain Consistent With Diverticulitis. Am Surg. 2022 Jul;88(7):1530-1531. doi: 10.1177/00031348221080422. Epub 2022 Mar 13. PMID: 35282711.

  • * Tomassen T, Matthée EPC, Venderink DJ, Keemers-Gels ME, Polle SW. [Gallbladder torsion]. Ned Tijdschr Geneeskd. 2023 Feb 8;167. Epub 2023 Feb 8. PMID: 36752660.

  • * Yew KS, George MK, Allred HB. Acute Abdominal Pain in Adults: Evaluation and Diagnosis. Am Fam Physician. 2023 Jun;107(6):585-596. PMID: 37327158.

  • * 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.

  • * Mingo PT, Buel KL. Abdominal Pain Syndromes: Gallstone Disease. FP Essent. 2026 Jan;560:15-21. PMID: 41569908.

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.