Doctors Note Logo

Published on: 9/14/2026

Why does the pain under my right rib get worse when I lie on my right side?

Pain under the right rib that intensifies when you lie on your right side often points to the gallbladder, liver, or lower right lung, since direct pressure and gravity compress these organs and can stretch an inflamed capsule or shift gallstones into the duct. Other common contributors include acid reflux, a strained or bruised intercostal muscle, costochondritis, an irritated diaphragm, or trapped gas in the ascending colon, each of which can feel sharper when compressed against a mattress. Warning signs such as fever, yellowing skin, vomiting, shortness of breath, or pain spreading to the right shoulder blade suggest a cause that needs prompt evaluation. There are several important distinctions between these possibilities, including how long the pain lasts and what relieves it, so review the complete details below before drawing conclusions. Because position-related rib pain can stem from anything from a pulled muscle to gallstones, a free, instant, online symptom check can help you organize your symptoms, understand the likeliest explanations, and decide whether to monitor at home or see a clinician now.

Last reviewed for medical accuracy: 09/13/2026

answer background

Explanation

Pain under the right rib can be unsettling, especially when it worsens on your right side. Understanding what’s happening in that area—and why lying on your right side makes it worse—can help you decide what to do next. This guide explains common causes, why position matters, when to get help and how to explore your symptoms safely.

Anatomy of the right upper abdomen
Under your right ribcage you’ll find several organs and structures, including:

  • The liver and gallbladder
  • The right lung and lining (pleura)
  • The upper part of the right kidney
  • Portions of your large and small intestine
  • Muscles, ribs and intercostal nerves

Any irritation, inflammation or injury in these areas can cause “pain under right rib.”

Why lying on your right side makes pain worse

  • Mechanical pressure: Lying on the right side presses the ribcage into the liver, gallbladder or inflamed tissues, increasing discomfort.
  • Organ shift: Gravity may pull inflamed organs (like an irritated gallbladder) downward, stretching surrounding ligaments or nerves.
  • Reduced space: An already tight or inflamed space under the ribs gets even tighter when you lie on that side.

Common causes of pain under right rib
Below are frequent reasons for pain under right rib. Many are mild, but some need prompt medical attention.

  1. Gallbladder issues

    • Gallstones (cholelithiasis): Hardened deposits block bile ducts, causing sharp, crampy pain that often radiates to the back or shoulder blade.
    • Gallbladder inflammation (cholecystitis): Infection or constant obstruction leads to steady, severe pain, fever and sometimes nausea.
  2. Liver-related problems

    • Hepatitis: Viral or toxic injury inflames the liver, leading to dull, aching pain and possible yellowing of skin or eyes.
    • Liver abscess or tumors: Localized infections or growths can cause persistent discomfort and systemic symptoms like fever or weight loss.
  3. Lung and pleural conditions

    • Pleurisy: Inflammation of the lung lining causes sharp pain that worsens with breathing or coughing; lying on the affected side amplifies it.
    • Pneumonia: Infection in the right lung may present with chest pain, fever, cough and shortness of breath.
  4. Kidney issues

    • Kidney stones: Sharp, colicky pain may start in the back and move forward, sometimes felt under the ribs if stones are high in the ureter.
    • Kidney infection (pyelonephritis): Dull ache with fever, chills and urinary symptoms.
  5. Musculoskeletal causes

    • Costochondritis: Inflammation of rib cartilage—pain is often reproducible by pressing on the chest wall and worsens with movement or certain positions.
    • Muscle strain: Overuse or injury to intercostal muscles can cause localized soreness that’s position-sensitive.
  6. Digestive tract issues

    • Peptic ulcer or gastritis: Ulcers in the stomach or first part of the small intestine can radiate pain to the right upper quadrant.
    • Irritable bowel or colitis: Cramping lower down can sometimes be perceived higher, especially if gas or bloating pushes upward.

How position influences specific conditions

  • Gallbladder inflammation: Lying on the right side pushes the gallbladder against the abdominal wall, intensifying spasms.
  • Pleurisy/pneumonia: The weight of your lung and pleural fluid may press on irritated tissues, making breathing and movement painful.
  • Costochondritis: Lying directly on an inflamed rib joint increases pressure on the sensitive cartilage.

When to seek medical evaluation
If you have any of these warning signs along with your pain under right rib, see a doctor right away or go to the nearest emergency department:

  • Severe, unrelenting pain
  • High fever, chills or sweats
  • Persistent vomiting or inability to eat/drink
  • Yellowing of skin or eyes (jaundice)
  • Shortness of breath or chest tightness
  • Blood in urine or stool
  • Rapid heartbeat or lightheadedness

Evaluating your pain under right rib
A healthcare provider will typically start with:

  • Medical history: Onset, character, duration and factors that help or worsen pain.
  • Physical exam: Palpating the abdomen and chest, listening to lungs and heart, checking for jaundice or swelling.
  • Laboratory tests: Liver function tests, blood counts, kidney function, infection markers.
  • Imaging: Ultrasound for gallbladder, CT or MRI for organs and kidneys, chest X-ray for lung issues.

Home care and symptom relief
While awaiting evaluation or for mild discomfort, you can try:

  • Rest: Avoid activities or positions that worsen pain, especially lying on your right side.
  • Heat or cold packs: A warm compress can ease muscle tension; ice packs can reduce inflammation.
  • Over-the-counter pain relief: Acetaminophen or NSAIDs (ibuprofen) can help—but check with a pharmacist or provider if you have liver, kidney or stomach issues.
  • Gentle stretching: If muscle strain is suspected, light rib stretches may relieve tension.
  • Dietary adjustments: For gallbladder symptoms, reduce fatty foods; for gastritis, avoid spicy or acidic meals.

When to consider an online symptom tool
If you’re unsure about the cause of your pain under right rib or how urgently you need care, you might try a free, online symptom check, using the doctor approved Ubie Symptom Checker. It’s quick, confidential and can point you toward appropriate next steps. free, online symptom check, using the doctor approved Ubie Symptom Checker

Never delay care for serious signs
This guide is for informational purposes and doesn’t replace professional evaluation. If you experience any life-threatening symptoms—like severe pain, breathing difficulty, high fever or jaundice—please seek immediate medical attention.

Speak to a doctor about anything that could be serious. Only they can perform the exams and tests needed for a definitive diagnosis and safe treatment plan.

Understanding your body and when to get help ensures you stay safe and recover more quickly. Take any new or worsening pain under right rib seriously, and don’t hesitate to reach out to a healthcare professional.

(References)

  • * Kadzombe EA, Robson WJ. Perichondritis. Lancet. 1988 Oct 29;2(8618):1010-1. doi: 10.1016/s0140-6736(88)90755-6. PMID: 2902441.

  • * Wright JT. Slipping-rib syndrome. Lancet. 1980 Sep 20;2(8195 pt 1):632-4. doi: 10.1016/s0140-6736(80)90294-9. PMID: 6107417.

  • * Croom RD 3rd, Donovan ML, Schwesinger WH. Intestinal endometriosis. Am J Surg. 1984 Nov;148(5):660-7. doi: 10.1016/0002-9610(84)90347-7. PMID: 6496859.

  • * Sorrentino D, Bazzocchi M, Badano L, Toso F, Giagu P. Heart-touching Chilaiditi's syndrome. World J Gastroenterol. 2005 Aug 7;11(29):4607-9. doi: 10.3748/wjg.v11.i29.4607. PMID: 16052699; PMCID: PMC4398719.

  • * Wroclawski ML, Peixoto GA, Moschovas MC, Carneiro A, Borrelli M Jr, Colombo JR Jr. Robot-Assisted Nephropexy. Int Braz J Urol. 2018 Sep-Oct;44(5):1047-1048. doi: 10.1590/S1677-5538.IBJU.2017.0390. PMID: 29211400; PMCID: PMC6237538.

  • * Sood A, Rogers C. Floating kidney. BMJ Case Rep. 2018 Apr 17;2018. doi: 10.1136/bcr-2018-224921. Epub 2018 Apr 17. PMID: 29666105; PMCID: PMC5905778.

  • * Rocha M, Dias AM, Coimbra J. A Challenging Abdominal Pain. Gastroenterology. 2020 May;158(6):e11-e13. doi: 10.1053/j.gastro.2019.11.022. Epub 2019 Nov 16. PMID: 31743733.

  • * Alani M, Rentea RM. Midgut Malrotation. 2026 Jan. PMID: 32809723.

  • * Su X, Wang Z, Wu B, Song K, Chen Y, Zhang C, Xue C, Ge L, Liu Y. Care of abdominal skin in ankylosing spondylitis patients undergoing corrective spinal surgery. Exp Ther Med. 2021 Dec;22(6):1350. doi: 10.3892/etm.2021.10785. Epub 2021 Sep 23. PMID: 34659496; PMCID: PMC8515506.

  • * Schep LJ, Slaughter RJ, Watts M, Mackenzie E, Gee P. The clinical toxicology of ketamine. Clin Toxicol (Phila). 2023 Jun;61(6):415-428. doi: 10.1080/15563650.2023.2212125. Epub 2023 Jun 2. PMID: 37267048.

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.