Answers
Pain under the right ribs: is it the liver, the gallbladder or something else?
Short answer
Pain under the right ribs most often comes from the gallbladder (gallstones), the liver, the stomach or duodenum, or the muscles and ribs themselves. Gallstone pain comes in attacks, often after a heavy meal, and can spread to the right shoulder or back. Fatty liver rarely causes real pain. Pain with fever, yellow eyes or repeated vomiting needs a doctor the same day.
Common causes
Most pain here comes from one of the four places below. Less common causes are a right kidney stone (pain to the side and groin), pneumonia at the base of the right lung (cough, fever, pain on breathing), shingles (a rash appears a few days later) and trapped gas in the bend of the large bowel under the liver. Rarely, a heart problem is felt in the upper belly, especially in people with diabetes.
- Gallstones: attacks of strong pain (biliary colic), or a longer, constant pain with fever if the gallbladder is inflamed (cholecystitis)
- Liver: hepatitis, a liver abscess (fever and pain, more common in India), or a swollen liver; fatty liver usually causes only a dull heaviness, if anything
- Stomach or duodenum: an ulcer or gastritis, usually felt higher up and more in the middle
- Muscles and ribs: a strain from lifting, exercise or a bad cough, or inflamed rib cartilage
Clues from the type of pain
These are only clues. The same pain can have different causes, so a doctor's examination matters more than any list.
- Comes in attacks lasting 30 minutes to a few hours, often after a heavy or fried meal or at night: think of the gallbladder
- Constant pain with fever and chills: an infection such as cholecystitis, a liver abscess or a blocked bile duct
- With yellow eyes, dark urine or pale stools: the liver or the bile duct
- Burning, linked to meals or an empty stomach: an ulcer or gastritis
- Worse on pressing one spot, twisting or a deep breath: usually muscle or rib
Tests
After examining you, the usual first test is an ultrasound of the abdomen, which shows gallstones, the liver, a liver abscess and the kidneys well. Blood tests such as a liver function test and blood count are often done at the same time. If ulcer symptoms are present, an upper GI endoscopy may be advised, because an ultrasound cannot see the lining of the stomach. When the ultrasound does not explain the pain, a CT scan, MRCP or endoscopic ultrasound (EUS) can look for small bile duct stones and other causes.
What you can do
Painless gallstones found by chance on a scan usually need no operation. Gallstones that cause attacks usually do, because the attacks tend to come back and can lead to complications.
- Note when the pain comes, how long it lasts, and what you ate before it
- Avoid heavy, fried meals and alcohol until the cause is known
- Do not keep taking painkillers on your own: some cause ulcers, and too much of others can harm the liver
- Do not try remedies that claim to dissolve or flush out gallstones; they do not work and can delay treatment
Warning signs: see a doctor the same day
Severe pain with fainting, or chest pain with sweating or breathlessness, is an emergency: call 112 or go to the nearest emergency department.
- Pain lasting more than 4 to 6 hours, or getting steadily worse
- Fever or shivering with the pain
- Yellow eyes or skin, dark urine or pale stools
- Repeated vomiting, or pain spreading through to the back
Eating when right-sided pain keeps coming back
Eat more
- Small, regular meals instead of one large heavy meal, especially at night
- Home-cooked food with little oil: dal, vegetables, roti, rice, curd
- Fibre from vegetables, fruits and whole grains, and a slow, steady move towards a healthy weight
Cut down
- Fried and very rich food: puri, pakode, samosa, heavy gravies and creamy sweets
- Alcohol, which harms the liver and can set off pancreatitis
- Crash diets and long fasts: losing weight very fast can itself cause gallstones
Good to know
- No food or drink dissolves gallstones; low-fat eating may reduce attacks but does not remove stones.
- Cutting out all fat for months is not needed and can leave you weak; moderate amounts are fine for most people.
Common questions
Can gas cause pain under the right ribs?
Yes. Gas trapped in the bend of the large bowel under the liver can cause a sharp pain that moves around and eases after passing gas or stool. Pain that comes in attacks after meals, or with fever, should still be checked.
Does fatty liver cause pain?
Usually not. Some people feel a dull heaviness on the right side. If you have real pain, your doctor will look for another cause, such as gallstones.
My ultrasound is normal but the pain continues. What next?
An ultrasound does not see the stomach lining or very small bile duct stones. Depending on your symptoms, an endoscopy, blood tests, or an MRCP or EUS may be advised. Muscle and rib pain also do not show on scans.
Which doctor should I see?
Your family doctor is a good first step. A gastroenterologist sees pain from the gallbladder, liver, bile duct and stomach. Severe pain with fever, yellow eyes or vomiting needs care the same day.