Pain tucked under the right side of the rib cage is one of the most common reasons people search for answers late at night. The area, which doctors call the right upper quadrant (RUQ), is crowded: the liver, gallbladder, the top of the right kidney, part of the bowel, the bottom of the right lung and the diaphragm all sit within a few inches of each other. Pain from any of them can feel similar.
Most RUQ pain is not caused by the heart. But a few heart and lung problems can show up there, and some RUQ conditions, such as an inflamed gallbladder, need care the same day. This guide walks through the likely causes, the warning signs that mean you should go to the emergency room, and how doctors work out what is going on.
Quick answer
Right upper quadrant pain is most often caused by the gallbladder (gallstones), the liver, the right kidney or the bowel, and less often by the lungs or the heart. Go to the ER or call 911 for severe or constant pain, fever with pain, yellow skin or eyes, vomiting that will not stop, chest pressure or shortness of breath. Milder pain that comes and goes still deserves a visit to your doctor within a few days.
Have symptoms you want checked? Dr. M. Usman Khan sees patients at our Northwest Houston, Tomball and Sugar Land offices.
What patients say about our care team
Read all reviews on Google- ★★★★★
The staff was amazing, very friendly and attentive.
— Stephanie G. Google review - ★★★★★
He explained everything to me!
— Yesenia B. Google review - ★★★★★
Everyone is incredibly supportive and the standard of care is top tier.
— Humzah A. Google review - ★★★★★
It's always good when someone cares, not just comes to work.
— Cecila A. Google review - ★★★★★
I felt like I waited less time and was seen much faster!
— Yesenia B. Google review
- ★★★★★
I am extremely grateful for the support and compassion.
— Debra L. W. Google review - ★★★★★
She always takes great care of me.
— Shemeanna B. Google review - ★★★★★
Her clinical skills were exemplary. I would definitely recommend.
— Humzah A. Google review - ★★★★★
I had a great experience with my appointment today.
— Stephanie G. Google review - ★★★★★
Mrs. Maxine literally listened to my concerns.
— Cecila A. Google review
Important
If the pain spreads to your chest, arm, jaw or back, or comes with sweating, nausea or shortness of breath, call 911. Upper abdominal pain can be a sign of a heart attack, especially in women, older adults and people with diabetes.
What Organs Are Under the Right Rib Cage?
The liver, gallbladder, bile ducts, upper right kidney, part of the colon and small intestine, the base of the right lung and the diaphragm all sit in the right upper quadrant.
Because these organs share nerve pathways, the brain is not always precise about where pain comes from. Gallbladder pain can be felt in the right shoulder blade. Irritation at the bottom of the right lung can feel like belly pain. And heart pain, which usually sits in the center of the chest, sometimes shows up as an ache in the upper abdomen instead.
That overlap is why doctors ask detailed questions about timing, triggers and associated symptoms before they order tests. Your answers narrow the list quickly.
What Are the Most Common Causes of Pain Under the Right Ribs?
The most common causes are gallstones and gallbladder inflammation, liver problems, kidney stones or infection, stomach and bowel conditions, and strained muscles or ribs.
Gallstones and gallbladder inflammation
Gallstones are the classic cause. When a stone blocks the gallbladder outlet, it causes biliary colic: a steady, gripping pain under the right ribs or in the upper middle abdomen that often starts after a fatty meal and lasts from 30 minutes to several hours. If the blockage persists, the gallbladder becomes inflamed (cholecystitis), and the pain becomes constant, often with fever and tenderness when the area is pressed.
Liver conditions
Fatty liver disease, hepatitis from a virus or alcohol, and liver abscess can cause a dull, heavy ache. The liver capsule stretches when the organ swells, and that stretch is what you feel. Dark urine, pale stools, itching or yellowing of the skin point toward the liver or bile ducts.
Kidney stones and kidney infection
The right kidney sits behind the liver. A stone usually causes sharp, waves of pain in the flank and back that can move toward the groin, sometimes with blood in the urine. A kidney infection adds fever, chills and burning with urination.
Stomach, duodenum and pancreas
A duodenal ulcer, gastritis or pancreatitis can cause upper abdominal pain that radiates to the right side or straight through to the back. Pancreatitis is usually severe and comes with vomiting.
Muscle, rib and nerve pain
A pulled intercostal muscle, a bruised or cracked rib, or costochondritis causes pain that is sharp, worse with twisting or pressing on the spot, and often follows coughing, lifting or an injury. Shingles can cause burning pain along a band of skin a few days before the rash appears.
Can Pain Under the Right Ribs Be Heart or Lung Related?
Yes, occasionally. A heart attack, right-sided heart failure, pneumonia, pleurisy or a blood clot in the lung can all cause pain in the right upper abdomen or lower right chest.
- Heart attack. An attack involving the lower wall of the heart can be felt as upper abdominal pain, nausea and indigestion rather than classic chest pain.
- Right-sided heart failure. When the right side of the heart cannot keep up, blood backs up into the liver. The liver swells and aches, often with leg swelling and a bloated abdomen. Read more about right-sided heart failure.
- Pericarditis. Inflammation of the sac around the heart causes sharp chest pain that can spread and is worse lying flat.
- Pneumonia or pleurisy. Infection or inflammation at the base of the right lung causes pain that is sharper when you breathe in deeply or cough, often with fever.
- Pulmonary embolism. A clot in the lung can cause sudden sharp pain with breathing, shortness of breath and a fast heart rate. It is an emergency.
These causes are less common than gallbladder problems, but they are the ones that cannot wait. Anyone with heart disease, risk factors such as diabetes or high blood pressure, or recent surgery or long travel should take new RUQ pain seriously.
When Is Right Upper Quadrant Pain an Emergency?
It is an emergency when the pain is severe or constant, or comes with fever, yellow skin or eyes, persistent vomiting, chest pressure, shortness of breath, fainting or a rigid, very tender abdomen.
| Symptom pattern | What it may suggest | What to do |
|---|---|---|
| Severe constant pain with fever | Acute cholecystitis, liver abscess, kidney infection | ER today |
| Yellow skin or eyes, dark urine | Blocked bile duct, hepatitis | Same-day care |
| Pain with chest pressure, sweating or breathlessness | Heart attack, pulmonary embolism | Call 911 |
| Sharp pain with deep breaths and fever | Pneumonia or pleurisy | Same-day care |
| Pain after fatty meals that settles in a few hours | Biliary colic (gallstones) | Doctor visit within days |
| Pain when pressing a rib or twisting | Muscle or rib strain | Rest; see a doctor if not improving |
In pregnancy, severe pain under the right ribs with headache, vision changes or swelling can be a sign of preeclampsia or HELLP syndrome and needs immediate evaluation.
When to seek care right away
Call 911 for:
- Chest pressure or pain spreading to the arm, jaw or back
- Sudden shortness of breath
- Fainting or confusion
- Severe abdominal pain with a rigid belly
Call your doctor the same day for:
- Fever with pain under the right ribs
- Yellow skin or eyes, or dark urine
- Vomiting that will not stop
- Pain that is getting steadily worse
How Do Doctors Find the Cause of RUQ Pain?
Most evaluations start with an abdominal ultrasound and blood tests for the liver, pancreas, kidneys and blood count, and add an ECG and heart tests when a cardiac cause is possible.
- Right upper quadrant ultrasound to look for gallstones, gallbladder inflammation, liver changes and dilated bile ducts.
- Blood tests: liver enzymes and bilirubin, lipase, kidney function, blood count and, when the heart is a concern, troponin.
- Urinalysis for blood or infection from the kidney.
- ECG (electrocardiogram) to look for signs of a heart attack or rhythm problem. See ECG testing.
- Echocardiogram if right-sided heart failure or pericardial fluid is suspected. See echocardiography.
- CT scan or chest X-ray for stones, pneumonia, a lung clot or pancreatitis.
Your doctor uses the pattern of results to decide on treatment, which ranges from diet changes and pain control to antibiotics, removal of the gallbladder, or heart treatment.
When Should a Cardiologist Check Pain Under the Right Ribs?
See a cardiologist when RUQ pain comes with exertion, shortness of breath, leg swelling, palpitations, or when abdominal tests are normal and you have heart risk factors.
At Epic Heart & Vascular Center we often see patients whose abdominal workup was normal but whose symptoms appear with activity, or who have swelling and a heavy, full feeling in the abdomen that turns out to be fluid congestion from the heart. A focused cardiac evaluation, an ECG and an echocardiogram can confirm or rule out a heart cause quickly.
If you already know you have gallstones and your pain matches the classic pattern, your primary care doctor, a gastroenterologist or a general surgeon is usually the right next step. When in doubt, start with the doctor you can see soonest, and do not wait if red-flag symptoms appear.
Where to See a Cardiologist in Houston
Epic Heart & Vascular Center evaluates heart and vascular symptoms at three Greater Houston offices, with many tests such as ECGs and echocardiograms available on site. Care is led by Dr. M. Usman Khan, MD, FACC.
Also serving Richmond, Spring, Kingwood, Willowbrook and Eldridge patients. Monday to Friday, 8:00 am to 5:00 pm.
Key Takeaways
- Pain under the right ribs usually comes from the gallbladder, liver, kidney, bowel or chest wall.
- Gallstone pain classically follows fatty meals and lasts 30 minutes to a few hours.
- Heart attack, right-sided heart failure, pneumonia and lung clots can also cause RUQ pain.
- Fever, yellow skin, persistent vomiting, chest pressure or breathlessness need same-day or emergency care.
- An abdominal ultrasound and blood tests are the usual first step; an ECG and echocardiogram check the heart.
Frequently Asked Questions
What is the most common cause of pain under the right rib cage?
Gallstones and gallbladder inflammation are the most common causes, followed by liver conditions, kidney stones or infection, and strained muscles or ribs.
Can heart problems cause pain on the right side under the ribs?
Yes. A heart attack can present as upper abdominal pain, and right-sided heart failure can make the liver swell and ache. Pain with exertion, breathlessness or swelling should be checked by a doctor promptly.
When should I go to the ER for right upper quadrant pain?
Go to the ER for severe or constant pain, pain with fever, yellow skin or eyes, persistent vomiting, chest pressure, shortness of breath or fainting.
How long does gallbladder pain last?
A gallbladder attack (biliary colic) usually lasts from about 30 minutes to several hours. Pain that lasts longer, or comes with fever, may mean the gallbladder is inflamed and needs urgent care.
Can anxiety or gas cause pain under the right ribs?
Trapped gas and muscle tension can cause discomfort there, but they should not cause fever, yellowing or severe constant pain. Do not assume a harmless cause if the pain is new, severe or keeps returning.
What test is done first for right upper quadrant pain?
An ultrasound of the right upper abdomen, along with liver, pancreas and kidney blood tests, is usually first. An ECG is added when a heart cause is possible.
Sources and Further Reading
- MedlinePlus. Abdominal pain.
- NIDDK. Symptoms and Causes of Gallstones.
- MedlinePlus. Gallstones.
- American Heart Association. Warning Signs of a Heart Attack.
- National Heart, Lung, and Blood Institute. Heart Failure: Symptoms.
Medical disclaimer: This article is for general education and does not replace a visit with your own doctor. Symptoms, test results and treatment choices differ from person to person.
Please note: Reading this article does not create a doctor–patient relationship. If you think you are having a medical emergency, call 911.







