Pain in the upper right side of the abdomen can come from the gallbladder, liver, bile ducts, bowel, stomach, pancreas, right kidney, lungs, ribs or abdominal muscles. Gallstones are one of the most recognisable causes, particularly when the pain is severe, constant and felt beneath the right ribs. However, the location alone cannot tell you whether the problem is digestive, muscular, respiratory or related to another organ.
The pattern of the pain often provides the most useful clues. Doctors consider whether it began suddenly or gradually, whether it follows meals, whether it travels to the back or shoulder, and whether it occurs alongside fever, vomiting, jaundice, breathlessness, bowel changes or urinary symptoms.
Seek urgent medical advice if upper-right abdominal pain is severe, lasts longer than 30 minutes, repeatedly returns, or occurs with fever, vomiting, yellow skin or eyes, dark urine, pale stools or marked tenderness beneath the ribs.
Call 999 or go to A&E immediately if the pain is sudden and extreme, spreads through to the back or across the abdomen, you collapse or become confused, you have severe difficulty breathing, vomit blood, pass black stools, or develop a rigid or very swollen abdomen.
What is in the upper right side of the abdomen?
The upper-right portion of the abdomen is often called the right upper quadrant. It contains or lies close to:
- most of the liver;
- the gallbladder;
- the bile ducts;
- part of the small bowel;
- the first bend of the large bowel;
- part of the pancreas;
- the upper part of the right kidney;
- the diaphragm, lower right lung and chest wall;
- the ribs, muscles and nerves of the abdominal wall.
Pain felt beneath the right ribs does not necessarily come from the liver or gallbladder. Lung inflammation, a rib injury, a pulled muscle and shingles can all produce discomfort in approximately the same area.
Likewise, pain can be referred from somewhere else. Gallbladder pain may travel to the right shoulder blade or back. Kidney pain may begin in the side or back. Pancreatic pain may spread straight through the upper abdomen into the back.
For a broader explanation of how abdominal pain location relates to different organs, see our guide to common causes of abdominal pain by location.
How the pain behaves can narrow down the possibilities
Upper-right abdominal pain can feel sharp, dull, burning, cramping or like pressure. Its timing and behaviour are often more informative than the exact description.
Severe constant pain lasting from 30 minutes to several hours
This is a common pattern of biliary colic caused by a gallstone temporarily blocking the flow of bile. The pain may be felt beneath the right ribs or in the upper middle abdomen.
It can spread towards the right shoulder blade or back and may cause nausea or vomiting. Despite the name “colic”, gallstone pain is often constant during an attack rather than rising and falling every few minutes.
Persistent pain with fever and tenderness
Continuous upper-right pain accompanied by fever, feeling unwell and marked tenderness can indicate acute cholecystitis, which is inflammation of the gallbladder.
This usually requires urgent medical assessment and often hospital treatment.
Pain after eating
Gallbladder pain may follow a meal, particularly a large or fatty meal, because eating causes the gallbladder to contract. However, attacks can occur at any time and may wake a person during the night.
Indigestion, stomach ulcers and reflux can also worsen after food, while pancreatic pain may become more noticeable after eating.
Pain that worsens when breathing or coughing
Pain caused by the ribs, muscles, diaphragm or lower lung may become sharper during a deep breath, cough or movement.
Gallbladder inflammation can also make deep breathing uncomfortable because the inflamed gallbladder lies beneath the diaphragm. This means pain with breathing should not automatically be assumed to be muscular.
Pain that travels to the back
Gallstones, acute pancreatitis, stomach ulcers and kidney problems can all cause pain that spreads towards the back.
Severe upper abdominal pain travelling through to the back, especially with vomiting, fever or marked illness, needs urgent assessment.
Pain that is tender close to the surface
Pain that can be reproduced by twisting, lifting, coughing or tightening the abdominal muscles may come from the abdominal wall. Shingles can cause burning skin sensitivity before a rash appears.
Internal inflammation can also produce tenderness, so surface pain alone does not exclude a problem with an organ.
Gallstones and biliary colic
Gallstones are small hardened deposits that form inside the gallbladder. The gallbladder is a small organ beneath the liver that stores bile, a fluid used to help digest fats.
Many people have gallstones without knowing it. They only cause symptoms when a stone blocks the outlet of the gallbladder or moves into a bile duct.
The typical gallstone attack is called biliary colic. Symptoms may include:
- sudden severe pain beneath the right ribs or in the upper middle abdomen;
- constant pain lasting longer than 30 minutes and sometimes several hours;
- pain spreading to the right shoulder blade, side or back;
- nausea or vomiting;
- sweating and difficulty getting comfortable;
- attacks after eating, although they may happen at any time.
The pain usually settles when the stone moves and the blockage is relieved. Between attacks, a person may feel entirely well.
Biliary colic is not normally relieved by opening the bowels, passing wind or being sick. Pain that repeatedly returns should be discussed with a GP because further attacks and complications may occur.
Who is more likely to develop gallstones?
Gallstones can affect anyone, but risk is higher with:
- increasing age;
- being female;
- pregnancy;
- overweight and obesity;
- rapid weight loss;
- a family history of gallstones;
- certain bowel and blood conditions;
- some medicines;
- previous bariatric surgery.
Gallstones are not always caused by an unhealthy diet, and a person can develop them without obvious risk factors.
How are gallstones diagnosed?
NICE recommends liver blood tests and an abdominal ultrasound when gallstone disease is suspected. Ultrasound can detect most gallbladder stones and may show inflammation or widening of the bile ducts.
If doctors suspect a stone in the main bile duct but ultrasound does not provide a complete answer, further imaging such as MRCP—a specialised MRI of the bile ducts—or endoscopic ultrasound may be considered.
Our guide to abdominal ultrasound scans explains what the examination involves and what it can show.
How are symptomatic gallstones treated?
Gallstones that never cause symptoms often do not require treatment. When they cause repeated pain or complications, the usual definitive treatment is removal of the gallbladder.
This operation is called a laparoscopic cholecystectomy and is usually performed through several small incisions. People can live normally without a gallbladder because bile continues to travel directly from the liver into the bowel.
Dietary changes may help some people avoid individual triggers while waiting for treatment, but they cannot dissolve most gallstones or guarantee that another attack will not happen.
See the NHS guide to gallstones for further information.
Acute cholecystitis and bile-duct complications
Gallstones can cause more than temporary pain. If a stone remains stuck, it can trigger inflammation, infection or blockage involving the gallbladder and bile ducts.
Acute cholecystitis
Acute cholecystitis is sudden inflammation of the gallbladder, most often caused by a gallstone blocking its outlet.
Symptoms may include:
- persistent sharp or severe pain in the upper-right abdomen;
- marked tenderness beneath the right ribs;
- pain spreading towards the right shoulder;
- fever;
- nausea or vomiting;
- feeling generally unwell;
- pain that does not settle after a few hours.
A clinician may look for a sign called Murphy’s sign, where pressing beneath the right ribs makes it difficult to take a deep breath because of pain. This is not a test to perform repeatedly at home and does not provide a diagnosis by itself.
Acute cholecystitis normally requires hospital assessment. Treatment may include pain relief, intravenous fluids, antibiotics when infection is suspected, and surgery to remove the gallbladder.
Common bile-duct stones
A gallstone can leave the gallbladder and become lodged in the main bile duct. This is called choledocholithiasis.
Possible signs include:
- upper abdominal pain;
- yellowing of the skin or eyes;
- dark urine;
- pale or clay-coloured stools;
- itching;
- abnormal liver blood tests.
A blocked bile duct may need treatment with ERCP, a procedure in which a flexible camera is passed through the mouth into the first part of the small bowel so the duct can be accessed and the stone removed.
Cholangitis
Cholangitis is infection within an obstructed bile duct. It can become life-threatening because bacteria may spread into the bloodstream.
Warning signs include:
- upper-right abdominal pain;
- fever or shivering;
- jaundice;
- confusion;
- low blood pressure, faintness or collapse.
Suspected cholangitis requires emergency hospital treatment with antibiotics and urgent relief of the blockage.
Gallstone pancreatitis
A gallstone can also block the opening shared by the bile duct and pancreatic duct, causing acute pancreatitis.
This usually produces severe upper abdominal pain, often spreading into the back, with nausea and vomiting. It requires hospital treatment.
Further guidance is available from the NHS information on acute cholecystitis.
Liver conditions that may cause upper-right discomfort
The liver occupies much of the upper-right abdomen. Many liver conditions cause no pain during their early stages, but swelling, inflammation or stretching of the liver’s outer covering can produce a dull ache or feeling of fullness beneath the ribs.
Fatty liver disease
Metabolic dysfunction-associated steatotic liver disease, or MASLD, is caused by excess fat accumulating in the liver alongside metabolic risk factors such as type 2 diabetes, excess weight, high blood pressure or abnormal cholesterol.
Most people have no symptoms. When discomfort occurs, it is more likely to be a vague ache or heaviness beneath the right ribs than sudden severe pain.
Fatty liver is often discovered through blood tests or imaging rather than because of pain. Our detailed guide to fatty liver disease, MASLD and NAFLD explains fibrosis assessment and treatment.
Hepatitis
Hepatitis means inflammation of the liver. Causes include viral infections, alcohol, medicines, autoimmune disease and metabolic conditions.
Possible symptoms include:
- tiredness and feeling unwell;
- loss of appetite;
- nausea;
- a dull ache beneath the right ribs;
- dark urine;
- pale stools;
- itching;
- yellow skin or eyes.
Jaundice or suspected medicine-related liver injury requires prompt medical advice.
Enlarged or congested liver
The liver can become enlarged because of inflammation, fat accumulation, infection, heart failure, cysts, tumours or other conditions.
An enlarged liver may create fullness or discomfort beneath the right ribs, but it cannot usually be diagnosed from symptoms alone.
Liver abscess
A liver abscess is a collection of infection inside the liver. It may cause upper-right abdominal pain, fever, sweating, loss of appetite and marked illness.
This is uncommon but serious and usually requires hospital treatment with antibiotics and drainage.
Liver cancer
Most upper-right abdominal pain is not caused by cancer. Persistent discomfort should nevertheless be assessed when it occurs with:
- unexplained weight loss;
- loss of appetite;
- jaundice;
- a lump or swelling beneath the right ribs;
- increasing abdominal swelling;
- persistent fatigue or weakness.
These symptoms can have many other explanations, but they should not be ignored.
Stomach, bowel and pancreatic causes
Although the stomach lies mostly in the upper middle and left abdomen, digestive pain can be difficult to localise precisely. Problems involving the stomach, first part of the small bowel, pancreas and colon may be felt on the upper right.
Indigestion and acid reflux
Indigestion can cause upper abdominal discomfort, burning, fullness, belching and nausea. Acid reflux more often produces burning behind the breastbone or in the upper middle abdomen.
These symptoms may follow meals or worsen when lying down. Severe localised pain, fever or jaundice is not typical of simple indigestion.
Stomach or duodenal ulcer
An ulcer in the stomach or duodenum can cause burning, gnawing or aching in the upper abdomen. The pain may be related to meals and can sometimes be perceived more strongly on the right.
Non-steroidal anti-inflammatory medicines such as ibuprofen and naproxen, and infection with Helicobacter pylori, are common causes.
Vomiting blood, passing black stools, faintness or sudden severe abdominal pain may indicate bleeding or perforation and requires emergency help.
Read more in our guide to stomach ulcers, H. pylori and treatment.
Acute pancreatitis
Acute pancreatitis is sudden inflammation of the pancreas. Gallstones and alcohol are among the most common causes.
Symptoms can include:
- sudden severe pain in the upper abdomen;
- pain spreading through to the back;
- nausea and repeated vomiting;
- a raised temperature;
- a rapid heartbeat;
- abdominal tenderness or swelling.
The pain may be central but can extend towards either side. Acute pancreatitis is serious and requires hospital treatment.
The NHS acute pancreatitis guide explains the symptoms and treatment.
Trapped wind and constipation
Gas can collect near the bend of the colon beneath the liver, sometimes producing sharp or cramping pain under the right ribs. This area is known as the hepatic flexure.
Trapped wind may move around and improve after passing stool or wind. Constipation can also cause pressure and bloating across the abdomen.
Severe persistent pain with fever, vomiting or marked tenderness should not be assumed to be gas.
Irritable bowel syndrome
IBS can cause recurring abdominal pain, bloating and altered bowel habits. Pain may occur anywhere, including beneath the right ribs, and often improves after opening the bowels.
IBS does not normally cause jaundice, fever, persistent vomiting, rectal bleeding or unexplained weight loss.
Bowel inflammation
Crohn’s disease and other forms of bowel inflammation can occasionally cause upper-right pain when the relevant section of bowel is affected.
Persistent diarrhoea, blood or mucus, weight loss, fever or night-time bowel symptoms should be assessed.
Kidney, lung, rib and muscle causes
Not all pain beneath the right ribs is caused by the digestive system.
Kidney infection
The right kidney lies towards the back, beneath the lower ribs. A kidney infection may cause pain in the side or back that is felt towards the upper abdomen.
Other symptoms can include:
- fever and shivering;
- pain or burning when passing urine;
- needing to urinate more often;
- cloudy, dark or blood-stained urine;
- nausea or vomiting;
- feeling significantly unwell.
A suspected kidney infection needs prompt medical treatment.
Kidney stones
A stone in the right kidney or upper ureter can cause severe pain in the side, back or abdomen. The pain often comes in waves and may travel down towards the groin.
Blood in the urine, nausea and restlessness are common. Fever alongside suspected stone pain is an emergency because it may indicate infection behind a blockage.
Pneumonia and pleurisy
Inflammation in the lower right lung or the lining around it can sometimes be felt as pain beneath the ribs rather than obvious chest pain.
Possible symptoms include:
- cough;
- fever;
- shortness of breath;
- pain that worsens during deep breathing or coughing;
- feeling generally unwell.
New breathing difficulty or chest pain requires urgent assessment.
Pulmonary embolism
A pulmonary embolism is a blood clot blocking an artery in the lungs. It commonly causes sudden breathlessness, chest pain that worsens with breathing, a rapid heartbeat or coughing up blood.
Pain may occasionally be felt low in the chest or upper abdomen. Call 999 for suspected pulmonary embolism, particularly after recent surgery, prolonged immobility, a long journey, pregnancy or a previous clot.
Rib or muscle injury
A bruised rib, strained intercostal muscle or pulled abdominal muscle can cause localised pain beneath the right ribs.
Musculoskeletal pain is often:
- linked to a recent injury, cough, lifting or exercise;
- worse with twisting, reaching or deep breathing;
- reproducible by pressing a specific area;
- unaccompanied by fever, jaundice or digestive symptoms.
Persistent pain after an injury, significant breathlessness or concern about a broken rib should be assessed.
Shingles
Shingles can begin with burning, tingling or sensitive skin on one side of the chest or abdomen. A stripe of blisters usually appears later.
Medical advice should be sought promptly because antiviral treatment is most effective when started early.
Upper-right abdominal pain during pregnancy
Upper abdominal discomfort during pregnancy can have ordinary explanations such as indigestion, constipation, stretching muscles or pressure from the enlarging uterus.
However, persistent or severe pain beneath the right ribs can sometimes be associated with pregnancy complications and should not automatically be blamed on the baby’s position.
Gallstones during pregnancy
Pregnancy can increase the likelihood of gallstones because hormonal changes affect bile and gallbladder emptying.
Symptoms are similar to those outside pregnancy: severe upper-right or central abdominal pain, nausea, vomiting and pain spreading towards the back or shoulder.
Pre-eclampsia and HELLP syndrome
Pre-eclampsia usually develops after 20 weeks of pregnancy. Severe disease can cause pain just beneath the ribs, often on the right, because of liver involvement.
Other warning signs may include:
- a severe headache;
- visual disturbances;
- sudden swelling of the face, hands or feet;
- nausea or vomiting;
- feeling very unwell;
- high blood pressure or protein in the urine.
HELLP syndrome is a serious pregnancy complication involving the liver and blood cells. Upper-right pain, headache, nausea and marked illness require immediate maternity assessment.
Contact maternity services urgently for persistent pain beneath the ribs, severe headache, visual changes, sudden swelling, bleeding, reduced fetal movement or feeling significantly unwell.
When should upper-right abdominal pain be checked?
Mild, short-lived discomfort may settle without treatment, but pain beneath the right ribs deserves prompt assessment when it is severe, persistent or accompanied by other symptoms.
Contact NHS 111 or request an urgent GP assessment if:
- the pain lasts longer than 30 minutes;
- the pain is severe or repeatedly returns;
- you have fever or shivering;
- you are repeatedly vomiting;
- the area beneath the right ribs is very tender;
- you notice yellow skin or eyes;
- your urine becomes dark or stools unusually pale;
- the pain spreads towards the back or right shoulder;
- you have urinary pain, blood in the urine or back pain;
- you have persistent appetite loss or unexplained weight loss;
- you are pregnant and develop persistent pain beneath the ribs.
Call 999 or go to A&E immediately if:
- the pain is sudden, extreme or rapidly worsening;
- the pain spreads through to the back with repeated vomiting;
- you collapse, faint, become confused or are difficult to wake;
- you have severe breathing difficulty or chest pain;
- you vomit blood or pass black, tar-like stools;
- the abdomen becomes rigid, extremely tender or markedly swollen;
- you develop jaundice with fever and shivering;
- you are pregnant and have severe upper abdominal pain with headache, visual changes or sudden swelling.
Lower-right pain has a different range of likely causes, including appendicitis. See our companion guide to common causes of right lower abdominal pain.
How doctors investigate upper-right abdominal pain
The tests chosen depend on the severity and suspected source of the pain.
A clinician may ask:
- when the pain began and how long it lasts;
- whether it follows meals;
- whether it spreads to the shoulder, chest, side or back;
- about fever, nausea, vomiting and jaundice;
- about stool and urine colour;
- about alcohol intake and medicines;
- about previous gallstones, liver or kidney disease;
- about pregnancy and recent surgery or travel.
The examination may include checking temperature, pulse, blood pressure and oxygen levels, then examining the abdomen, chest, ribs and back.
Blood tests
Blood tests may include:
- full blood count for infection or anaemia;
- C-reactive protein for inflammation;
- bilirubin, ALT, AST, ALP and GGT;
- albumin and clotting tests when liver function is a concern;
- amylase or lipase when pancreatitis is suspected;
- kidney function and electrolytes.
The pattern of liver-test abnormalities can help indicate whether liver cells, the bile ducts or another process may be involved. Blood tests alone cannot identify every gallstone or explain every episode of pain.
Our guide to liver function test results explains the main markers.
Ultrasound
Ultrasound is usually the first imaging test when gallstones or gallbladder inflammation are suspected. It can assess:
- stones in the gallbladder;
- gallbladder-wall thickening;
- fluid around the gallbladder;
- widened bile ducts;
- some liver and kidney abnormalities.
CT scan
A CT scan may be used when doctors suspect pancreatitis, bowel perforation, an abscess, kidney stone, tumour or another cause not fully explained by ultrasound.
MRCP
MRCP is a specialised MRI technique that produces detailed images of the bile ducts and pancreatic duct. It can help detect stones or narrowing without using an endoscope.
Endoscopy
A gastroscopy may be considered when symptoms suggest an ulcer, inflammation of the stomach or another upper digestive problem.
ERCP is different from ordinary gastroscopy. It is mainly used to treat blocked bile ducts, for example by removing a stone or placing a stent.
Chest tests
If pain could be coming from the lungs or heart, assessment may include an ECG, chest X-ray, oxygen measurement and blood tests.
What can you do while waiting for medical advice?
Home care is appropriate only when the discomfort is mild, improving and unaccompanied by warning signs.
You may:
- rest and avoid strenuous activity;
- drink water in small regular amounts;
- eat smaller, lighter meals if you feel able;
- avoid any foods that clearly trigger pain;
- avoid alcohol until the cause is clearer;
- check your temperature;
- note how long the pain lasts and whether it follows meals;
- use simple pain relief that is normally safe for you.
Paracetamol is often the simplest initial painkiller for unexplained abdominal discomfort when taken according to the instructions.
Anti-inflammatory medicines such as ibuprofen and naproxen may be unsuitable if you have stomach ulcers, kidney problems, take anticoagulants or are pregnant. Ask a pharmacist or clinician when uncertain.
Do not attempt a “gallbladder flush”, extreme fast or unregulated liver detox. These treatments do not remove obstructing stones and may delay necessary medical care.
A low-fat meal may reduce gallbladder stimulation for some people, but dietary changes cannot safely treat acute cholecystitis, cholangitis or pancreatitis.
Do not repeatedly press beneath the ribs to perform a home Murphy’s-sign test. Increasing pain, fever or jaundice should prompt medical advice rather than further self-examination.
Frequently asked questions about right upper abdominal pain
What is the most common cause of upper-right abdominal pain?
Gallstones are a common and important cause, but indigestion, muscle pain, trapped wind, liver conditions, kidney problems and lung conditions can all cause pain in the same area.
What does gallstone pain feel like?
It is commonly severe and constant, felt beneath the right ribs or in the upper middle abdomen. It usually lasts longer than 30 minutes and may continue for several hours, sometimes spreading to the back or right shoulder blade.
Can gallstone pain come and go?
Individual attacks often settle when the temporary blockage clears. The pain may then return days, weeks or months later. Recurrent attacks should be discussed with a GP.
Does gallbladder pain always happen after fatty food?
No. Fatty meals may trigger an attack because they stimulate gallbladder contraction, but pain can occur after any meal, during the night or without an obvious trigger.
What is the difference between biliary colic and cholecystitis?
Biliary colic is temporary pain caused by a stone blocking bile flow. Acute cholecystitis involves ongoing inflammation of the gallbladder and usually causes persistent pain, tenderness, fever and feeling unwell.
Can gallstones cause jaundice?
Yes. A stone lodged in the main bile duct can block bile flow and cause yellow skin or eyes, dark urine and pale stools. Jaundice requires urgent medical assessment.
Can fatty liver cause pain beneath the right ribs?
Fatty liver usually causes no symptoms, but some people report a dull ache or heaviness beneath the right ribs. Sudden severe pain is not typical of uncomplicated fatty liver disease.
Can trapped wind cause sharp pain under the right ribs?
Yes. Gas can collect near the bend of the large bowel beneath the liver. It may cause sharp or cramping pain that moves and improves after passing wind. Persistent or severe pain should not automatically be attributed to gas.
Can indigestion cause pain only on the right?
Indigestion usually affects the upper middle abdomen, but discomfort can be difficult to localise. Fever, marked right-sided tenderness, jaundice or pain lasting several hours is not typical of simple indigestion.
Can a stomach ulcer cause right upper abdominal pain?
Yes. An ulcer in the duodenum may cause central or right-sided upper abdominal discomfort. Vomiting blood, black stools or sudden severe pain requires emergency help.
How can I tell gallstones from pancreatitis?
Both can cause severe upper abdominal pain and vomiting. Pancreatitis often produces prolonged pain spreading directly through to the back and causes marked illness. Gallstones can themselves trigger pancreatitis, so hospital tests are often needed.
Can kidney problems cause pain under the right ribs?
Yes. The upper part of the right kidney lies beneath the lower ribs towards the back. Kidney infection or stones may be felt in the back, side or upper abdomen.
Can lung problems feel like abdominal pain?
Yes. Pneumonia, pleurisy and pulmonary embolism can cause pain near the lower chest or upper abdomen, particularly when breathing deeply. Breathlessness, chest pain or coughing up blood requires urgent assessment.
Should I worry about pain under the right ribs during pregnancy?
Persistent or severe pain should be assessed, especially after 20 weeks. Upper-right pain with headache, visual changes, sudden swelling or feeling very unwell may be associated with pre-eclampsia or HELLP syndrome.
Can gallstones disappear naturally?
Gallstones usually remain unless removed or occasionally dissolved with specialist treatment that is only suitable in limited circumstances. Symptoms may stop between attacks, but the stones can still be present.
Do all gallstones need surgery?
No. Gallstones that cause no symptoms often need no treatment. Surgery is commonly recommended when stones cause repeated pain, acute cholecystitis, pancreatitis or bile-duct complications.
When should I call NHS 111?
Contact NHS 111 when upper-right pain is severe, lasts longer than 30 minutes, repeatedly returns, or occurs with vomiting, fever, jaundice, dark urine, pale stools or significant tenderness.