Pain under the rib cage can stem from various sources, ranging from a pulled muscle to conditions affecting the liver, gallbladder, lungs, or kidneys.
This guide is for adults experiencing pain beneath the right rib cage who want to better understand its possible causes and recognise when medical attention is needed. While this discomfort can have many explanations, knowing which symptoms may require prompt action can help you make informed decisions about your health.

Sudden, severe pain in the chest or under the ribs accompanied by difficulty breathing, chest pressure, or pain spreading to the jaw or left arm is a medical emergency. Call 999 or attend A&E immediately, as pain spreading to the jaw or left arm may indicate a heart attack.
Right-sided rib cage pain most commonly arises from gallbladder problems, liver conditions, musculoskeletal strain or lung-related causes, but only a proper medical assessment can confirm the exact diagnosis.
Red-flag symptoms, including high fever, jaundice, vomiting blood, coughing up blood, blood in the urine or unexplained weight loss, must prompt urgent medical review. Coughing up blood requires urgent medical attention and can indicate a serious condition.
Persistent rib pain lasting over two weeks needs evaluation, and unexplained weight loss with rib pain warrants medical assessment even if the discomfort feels mild.
Understanding Pain Under the Right Rib Cage
Pain under the right rib cage refers to discomfort or pain felt beneath the lower right ribs. This area houses several vital organs, including the liver, gallbladder, part of the right lung and portions of the digestive system.
The right rib cage extends from the breastbone at the front, across the right side of the upper body, and around to the spine at the back. Its lower margin sits just above the upper abdomen, so pain in this region can be felt at the front, side, back or deep beneath the lower ribs.
The rib cage also protects the stomach, liver, gallbladder, part of the right lung, diaphragm and upper digestive system.
The pain itself can vary considerably. Some people describe a sharp or stabbing sensation, while others feel a dull ache, burning discomfort or generalised pressure.
It may feel worse with movement, deep breathing, coughing, eating or lying down. Cardiac conditions can also sometimes manifest as discomfort under the lower rib cage, which is why location alone, whether on the right or left side, offers clues but is never enough for a diagnosis.
People whose symptoms extend around the side or towards the back may also experience pain around the ribs from musculoskeletal or thoracic causes.
Want a specialist opinion on your condition?
Get a clear answer from a surgeon who will be with you throughout.
When Right Rib Cage Pain Is an Emergency
Do not ignore severe or rapidly worsening pain under the ribs, especially when it comes with breathing difficulty or collapse.
Seek immediate help for sudden severe chest pain. Rib pain can indicate serious lung or heart problems, and delays can be dangerous.
Call 999 or go to A&E if you experience any of the following:
Sudden severe chest pain or rib pain, particularly with breathlessness or collapse;
Pain spreading to the jaw, arm or back, which may signal a heart attack or aortic dissection;
Severe shortness of breath or difficulty breathing that comes on quickly;
Coughing up blood;
Fainting or sudden collapse;
Direct trauma to the chest from a road traffic collision, high fall or contact sports;
Abdominal symptoms may also require urgent attention.
Abdominal emergency signs include:
Intense right upper abdominal pain with high fever and vomiting, which may indicate acute cholecystitis or cholangitis;
A rigid, “board-like” abdomen suggesting peritonitis;
Vomiting blood or passing black, tarry stools, which may signal a bleeding ulcer;
Yellowing of the skin and eyes, known as jaundice, with severe pain, pale stools and dark urine;
High fever with chest pain, which may indicate severe pneumonia or sepsis.
If these symptoms are present, call 999. Do not drive yourself to hospital and do not wait for symptoms to settle.
"I was diagnosed in March with a rare condition. My local hospital said it was inoperable due to the size of the mass. Mr Scarci reassured me the thymoma was resectable. I was booked for surgery the following week where he successfully removed the entire tumour."
Anatomy Under the Right Rib Cage
The rib cage consists of twelve pairs of ribs on each side, connected by intercostal muscles and costal cartilage.
Ribs 8, 9 and 10 are known as false ribs because they attach to the sternum indirectly through cartilage rather than directly to bone. The diaphragm, a large dome-shaped muscle, sits beneath the lower ribs, separating the chest from the abdomen and playing a central role in breathing.
Key organs lying beneath the right ribs include:
The liver, particularly the right lobe;
The gallbladder and bile ducts;
The head of the pancreas, which is positioned more centrally but can refer pain towards the right;
The right kidney, positioned towards the back behind the lower ribs;
The hepatic flexure of the colon and loops of the small intestine;
The lower part of the right lung and the pleura.
Pain felt “under the right breast” or deep beneath the right rib can therefore be referred from deeper structures.
For example, gallbladder inflammation may cause discomfort between the shoulder blades or in the back, while kidney pain may wrap from the flank towards the front.
Have a question about your diagnosis?
A consultation gives you a personalised plan — not a generic estimate.
Common Musculoskeletal Causes: Muscle, Bone and Joint
Muscle strain and minor rib injuries are among the most common and least serious causes of pain under the right rib cage.
Musculoskeletal issues such as rib fractures can cause localised pain under the rib cage, while the surrounding muscles and bones are vulnerable to everyday stress.
Intercostal Muscle Strain
Intercostal muscle strain often follows severe coughing, heavy lifting or sudden twisting.
Pulled chest or intercostal muscles can cause pain after physical strain, and muscle tension in the affected area typically produces sharp pain with movement, deep breathing or laughing. Localised tenderness and swelling may accompany the rib pain.
It usually improves over days to weeks with appropriate rest and gradual return to activity.
Rib Bruises and Minor Fractures
Rib bruises and fractures can result from direct trauma, including a fall, blow during contact sports or prolonged forceful coughing.
Severe pain following chest trauma may indicate rib fractures. Small fractures may not always appear clearly on a standard X-ray.
Osteoporosis can also contribute to rib fractures, particularly in older adults, sometimes producing pain that seems disproportionate to the original injury.
Costochondritis and Chest Wall Inflammation
Costochondritis produces sharp, well-localised pain where the ribs join cartilage.
Understanding the symptoms of costochondritis can help distinguish this form of chest wall inflammation from other causes of chest and rib pain.
Pain may worsen with deep breathing, coughing or twisting movements, and sharp or stabbing pain around the rib cage is common.
When musculoskeletal rib pain is mild, it can often be managed conservatively. Persistent pain, muscle tension that does not ease, or discomfort interfering with everyday life still warrants assessment.
"After two years of being told my symptoms were anxiety, Mr Scarci identified the problem immediately. The surgery was straightforward and I was discharged after three days. I only wish I had found him sooner."
Gallbladder Problems and Right Rib Cage Pain
The gallbladder sits under the right side of the liver, tucked beneath the right rib cage, and is one of the leading causes of acute pain in this area.
Gallstone pain typically occurs under the right rib cage and can be intense.
Biliary colic from gallstones causes sudden, severe pain in the upper right abdomen or beneath the right ribs. Symptoms often begin after eating a fatty meal, and the pain may radiate towards the right shoulder blade or back.
Nausea and vomiting are also common.
Gallstones can block the opening of the gallbladder, leading to escalating symptoms. Around 15% of UK adults have gallstones, although many remain asymptomatic.
Acute cholecystitis, an inflamed gallbladder, causes severe right upper abdominal pain that is constant and may last several hours. Fever and feeling generally unwell are common, and urgent hospital assessment is required.
Watch for jaundice, pale stools and dark urine, which may indicate obstruction of the bile duct and potentially serious complications such as cholangitis.
Typical investigations include blood tests, abdominal ultrasound and sometimes MRCP. Definitive treatment for symptomatic gallbladder disease may involve surgical removal of the gallbladder.
Acute pancreatitis can also cause severe upper abdominal pain that radiates into the back. Treatment frequently requires hospitalisation and careful medical management.
Not sure about your treatment options?
Mr Scarci provides expert consultations typically within one week of contact.
Liver Conditions Causing Pain Under the Right Ribs
The liver fills much of the space under the right rib cage. When it becomes enlarged, or its capsule is stretched, the result can be a dull ache or feeling of fullness beneath the ribs.
Common liver-related causes include:
Fatty liver disease, which is often asymptomatic but can sometimes produce dull discomfort and fatigue
Viral hepatitis, which may cause discomfort beneath the right ribs with nausea, malaise and sometimes jaundice
Alcohol-related liver disease, which can produce progressive symptoms as underlying disease worsens
Liver congestion from heart failure, which can cause swelling and pressure within the liver capsule
Worrying associated symptoms include jaundice, unexplained weight loss, persistent nausea, ascites, easy bruising or bleeding, and itchy skin.
Liver tumours, whether benign or malignant, can also cause persistent discomfort, sometimes radiating towards the shoulder or back.
Diagnostic tools include liver blood tests, ultrasound, CT and MRI scans. Patients with suspected liver disease are usually referred to hepatology or hepatopancreatobiliary specialists. If imaging suggests involvement of the chest, multidisciplinary thoracic input may also be required.
Lung, Pleura and Diaphragm Causes on the Right Side
Some right-sided rib cage pain actually arises from the lower part of the right lung or pleura, particularly when symptoms worsen with deep breathing or coughing.
Pneumonia and Pleurisy
Pneumonia and pleurisy can produce sharp pain during breathing. Pneumonia may cause pain in the chest or back accompanied by cough, fever and feeling acutely unwell. High fever with chest pain can indicate a significant respiratory infection. Patients experiencing pain specifically triggered by breathing may find the symptoms overlap with pleuritic chest pain.
Pneumothorax
A pneumothorax, or collapsed lung, can cause sudden-onset sharp chest or rib pain on one side accompanied by shortness of breath and a fast heart rate. The causes of pneumothorax vary, and significant cases may require a chest drain or surgery. Sudden chest pain with difficulty breathing requires urgent medical assessment.
Pulmonary Embolism
A pulmonary embolism is a blood clot affecting the vessels within the lungs. Symptoms can include sharp pleuritic pain, breathlessness and occasionally coughing up blood. Emergency assessment is essential, particularly in people with risk factors such as recent immobility, surgery or cancer. Diaphragm irritation from infection, surgery or neighbouring inflammation can also cause right shoulder-tip or rib cage pain that changes with posture or breathing.
Want a specialist opinion on your condition?
Get a clear answer from a surgeon who will be with you throughout.
Digestive System Causes: Stomach, Intestines and Acid Reflux
Digestive conditions frequently cause upper abdominal pain that feels as though it sits under the ribs, sometimes more towards the right or centre. Acid reflux and heartburn typically produce a burning sensation. This discomfort may feel worse when lying down or following large, spicy or fatty meals. Some people notice the pain more prominently on the right side.
Peptic ulcers and gastritis can cause gnawing or burning pain in the upper abdomen, sometimes waking the person at night. The discomfort may radiate beneath either side of the rib cage or through towards the back. Severe complications include bleeding. If you notice vomiting blood or black stools, seek urgent medical attention.
Trapped gas can produce sharp, pressure-like abdominal pain, while irritable bowel syndrome may cause intermittent discomfort around the rib area that worsens after eating or during periods of stress. These conditions are generally less serious but can still affect everyday quality of life.
Right Kidney and Urinary Tract Causes
The upper part of the right kidney lies behind the lower ribs, so kidney problems often present as pain in the back or flank rather than at the front of the rib cage. Kidney stones can cause severe, cramping or colicky pain starting in the side or back beneath the ribs. Pain may radiate towards the groin and may be accompanied by nausea, restlessness or blood in the urine.
Kidney infections, also called pyelonephritis, can produce constant aching or sharp flank pain, high temperature, chills, burning when passing urine and increased urinary frequency. This requires prompt medical treatment with antibiotics and may sometimes require hospital care.
More chronic kidney problems may cause vague flank discomfort alongside fatigue, ankle swelling or changes in urination. Typical investigations include urine analysis, blood tests and ultrasound or CT imaging.
Less Common Causes: Slipping Rib Syndrome and Other Conditions

When scans and blood tests are normal, less common underlying conditions may be responsible for persistent right-sided rib cage pain, particularly unexplained discomfort lasting weeks or months.
Slipping rib syndrome involves hypermobility of the lower ribs, usually the eighth, ninth or tenth ribs, where the costal cartilage attachments become abnormally mobile.
It is frequently underdiagnosed and may be mistaken for gallbladder, stomach or other upper abdominal problems.
Intercostal neuralgia, or nerve irritation or entrapment, can follow shingles, surgery or trauma. It typically produces burning or shooting pain following the line of a rib, often with unusually sensitive skin over the affected area.
Chest wall or rib tumours, whether benign or malignant, are much less common but can also produce persistent localised pain, particularly if there is a palpable lump or night pain.
When standard investigations have not found a cause, a broader assessment of unexplained chest and rib pain can help identify chest wall, nerve or structural conditions that may otherwise be missed.
How Doctors Diagnose Pain Under the Right Rib Cage
Diagnosis usually follows a stepwise approach involving medical history, physical examination and targeted investigations. Doctors will ask about the exact location of pain, including whether it is at the front, side or back, as well as its onset, triggers, severity and whether it is constant or intermittent.
Other important symptoms include fever, weight loss, jaundice, cough, breathlessness and urinary changes. Physical examination may involve checking the rib cage, pressing on the abdomen, listening to the heart and lungs, and looking for swelling, rash or deformity.
Common investigations include:
Test | Used For |
Blood tests | Infection, liver disease, inflammation and kidney problems |
Urine tests | Kidney stones and urinary tract infections |
Chest X-ray | Pneumonia, pneumothorax and some rib fractures |
Abdominal ultrasound | Gallstones and liver conditions |
CT or MRI scan | Complex causes, tumours and structural problems |
ECG | Assessing possible cardiac causes |
In complex or unexplained cases, referral to a thoracic specialist may be appropriate when the symptoms or imaging suggest that the pain originates from the ribs, chest wall, pleura or lungs.
Persistent symptoms can also be assessed through a chest wall pain review, particularly after urgent cardiac causes have already been excluded.
Have a question about your diagnosis?
A consultation gives you a personalised plan — not a generic estimate.
Treatment Options and Self-Care
Treatment depends entirely on the underlying cause of the pain, so accurate diagnosis must come first.
For mild musculoskeletal pain, conservative management may include a short period of rest, avoiding heavy lifting or twisting, gentle stretching, heat or ice packs, and over-the-counter pain relief.
Costochondritis and other inflammatory chest wall conditions may also improve with anti-inflammatory treatment when this is medically appropriate.
Medical Treatments
Treatment may include:
Antibiotics for infections such as pneumonia, kidney infection or gallbladder infection
Acid-suppressing medicines for acid reflux or peptic ulcers
Anti-inflammatory medicines for chest wall inflammation
Nerve-pain medicines such as gabapentin or pregabalin for selected cases of intercostal neuralgia
When medication and conservative care are not sufficient, treatment depends on the specific diagnosis.
Surgery or Interventional Procedures
Surgical treatment may be required for unstable or complex rib fractures. Selected injuries may require rib fracture surgery to stabilise the chest wall, while symptomatic gallstones may be treated with gallbladder removal. Thoracic conditions affecting the lung, pleura or chest wall may sometimes require keyhole VATS, robotic techniques or other specialist procedures.
Lifestyle Changes
Measures that may help reduce recurrent right rib cage discomfort include maintaining a healthy weight, moderating alcohol intake, avoiding heavy late-night meals, stopping smoking and staying physically active with good posture. These adjustments may reduce digestive symptoms, help protect underlying organs and limit recurrent muscular strain.
Specialist Thoracic Care with Mr Marco Scarci in London
Mr Marco Scarci is a consultant thoracic surgeon based in London, providing NHS and private care for patients with complex chest, lung and rib cage problems.
His practice includes assessment of lung disease, pneumothorax, hyperhidrosis, rib fractures, thymoma, chest infections, pleural disease, chest wall tumours and structural rib disorders.
When symptoms suggest a thoracic rather than abdominal cause, assessment may involve detailed imaging and, when necessary, minimally invasive diagnostic or surgical procedures.
Patients with ongoing or unexplained right rib pain may also require input from radiologists, pain specialists, respiratory physicians or physiotherapists depending on the suspected diagnosis.
Virtual consultations are available for UK and international patients who need a specialist review without having to travel to London first.
For patients whose initial investigations have been inconclusive, specialist referral can help determine whether symptoms arise from the lungs, pleura, ribs, chest wall, or another nearby structure.
The focus is on accurate diagnosis, clear explanation of results and a personalised treatment plan rather than assuming that pain in one location must come from a single organ.
Not sure about your treatment options?
Mr Scarci provides expert consultations typically within one week of contact.
FAQ: Pain Under the Right Rib Cage
Can pain under the right rib cage come and go, or is it always constant?
Many causes of rib cage pain, such as muscle strain, acid reflux, or mild gallstone colic, produce intermittent symptoms that flare with certain activities or meals and then ease. More serious conditions like acute cholecystitis, pneumonia, or kidney infection tend to cause constant pain accompanied by feeling sick, high fever or other associated symptoms. If pain is recurring over days or weeks, becomes more intense, or starts to interfere with sleep and daily life, seek medical review rather than waiting it out.
Why does my right rib pain feel worse after eating or when lying down?
Eating, especially large or fatty meals, can trigger or worsen pain from gallstones, gallbladder inflammation, or acid reflux. Lying flat can allow stomach acid to move up the oesophagus and may increase pressure within the abdomen, aggravating certain digestive and rib cage conditions. Simple measures include smaller meals, avoiding lying down soon after eating, and elevating the head of the bed. If pain is severe or persistent, get assessed.
Can stress or anxiety cause pain under the right rib cage?
Stress and anxiety can lead to muscle tension, shallow breathing and altered digestion, all of which may contribute to non-specific aches under the rib cage on either side. However, stress should never be assumed to be the sole cause of pain until more serious problems such as gallbladder, liver, lung or heart disease have been excluded by a healthcare professional. Combine stress-management strategies with appropriate medical evaluation, especially if new or unusual symptoms appear.
Is pain under the right rib cage always related to the liver or gallbladder?
No. Although liver and gallbladder issues are common causes, right-sided rib pain can also arise from muscles, ribs and bones, lungs, kidneys, the spine, or even referred pain from the heart or digestive system. The potential causes are broad, so self-diagnosis based solely on pain location is unreliable. A thorough history, examination, and when indicated, imaging tests are needed to pinpoint the true source.
When should I ask for a scan for pain under my right ribs?
Scans such as ultrasound, CT, or MRI are usually recommended when rib cage pain is persistent, unexplained on initial examination, associated with red-flag symptoms (high fever, weight loss, jaundice, blood in the cough or urine), or not improving over a few weeks. Ultrasound is typically the first-line test for suspected gallbladder or liver problems, while chest X-ray or CT may be used for lung and rib cage conditions.
