3rd September, 201910 min read

What are the causes of rib pain?

Last reviewed: 03/09/2019
Medically reviewed

All of Healthily's articles undergo medical safety checks to verify that the information is medically safe. View more details in our safety page, or read our editorial policy.

Right-sided pain under ribs


Gallstones are small stones that can form in the gallbladder (a small organ under the liver). They are usually made up of cholesterol and don’t tend to cause symptoms. Sometimes they get stuck in the entrance of the gallbladder, which can cause severe pain under your ribs on the right side.

Gallstones can cause complications. If this happens, you may also experience:

  • a high temperature
  • constant pain
  • a fast heartbeat
  • jaundice
  • itchy skin
  • diarrhoea
  • chills or shivers
  • confusion
  • a loss of appetite

If you think you might have gallstones, visit your doctor. You should seek immediate medical help if:

  • you develop jaundice
  • you have abdominal pain for more than eight hours
  • you have a high temperature and/or chills
  • your pain is severe and cannot be relieved by changing position

Kidney stones and infections

Kidney stones are the result of a build up of minerals on the inner lining of the kidney. They are most common in people aged 30-60. While they can be caused by different medical conditions they are also often caused by dehydration.

They can cause severe pain under the right-hand side and left-hand side of your rib cage or your back and sometimes this pain can spread to the front of your tummy area. Other symptoms you may experience include:

  • a high temperature
  • feeling clammy
  • nausea or vomiting
  • blood in your urine
  • urine infections

Kidney stones can often pass on their own without medical intervention, but sometimes they may need to be removed surgically.

You should visit your doctor if you think you have kidney stones, and seek emergency help if:

  • the pain is severe
  • you have a high temperature
  • you experience shivering or shaking
  • there is blood in your urine

Kidney infections are usually the result of a bladder infection that travels up to your kidneys.

If you have a kidney infection you may experience pain under your ribs in your back as well as:

  • a fever
  • nausea
  • needing to pee more than usual
  • needing to pee suddenly
  • pain when peeing
  • smelly or cloudy urine
  • blood in your pee

You should visit your doctor if you have symptoms of a kidney infection.


Shingles is caused by the same virus that causes chickenpox, so if you’ve previously had chickenpox you can develop shingles. But if you’ve never been exposed to the chickenpox it’s not possible to develop shingles.

The area underneath your right or left ribs is a common place to experience symptoms, however you can develop shingles on other parts of the body including your chest, tummy and less commonly face, eyes or genitals.

Shingles often begins with a tingling or painful area of skin which can then become sharp or burning in nature. It then typically causes a rash that tends to develop two to three days after the pain begins.

You should visit your doctor if you think you have shingles. They will be able to diagnose you and provide the appropriate treatment.

Liver problems

If you have a problem with your liver it can cause pain under the right side of your ribcage. Your liver plays an important role in digestion and fighting infections, so if it is not functioning properly it can have serious implications.

Common liver diseases include:

Liver problems can be caused by a number of different factors, including alcohol consumption and diet. But there are ways to prevent some liver diseases, such as losing weight if you are overweight and cutting down on your alcohol intake.

If you think you are suffering from liver disease you should see your doctor.

When to worry

If you have persistent pain on the right side of your rib cage you should visit a doctor. You should seek immediate medical attention if you:

  • have yellow skin
  • have severe pain
  • have lost weight without trying to
  • are vomiting blood or there is blood in your poo
  • have a high temperature and you are shaking
  • feel breathless

Or if your urine is darker than usual and your poo is lighter.

SSC image in-line

Left-sided pain under rib

Gut problems

Stomach ulcers

Stomach ulcers are sores that occur on the lining of your stomach and they cause a burning pain in your abdomen, which can be felt under the left side and right side of your ribs.

Anyone can get a stomach ulcer, but they are most common in men over the age of 60. They are usually either caused by the Helicobacter pylori (H.pylori) bacteria or by taking non-steroidal anti-inflammatory (NSAIDs) for an extended period of time.

It takes around one to two months to recover from a stomach ulcer.

If you think you have a stomach ulcer, visit your doctor.

Seek immediate medical attention if you start vomiting blood, your poo is sticky and dark, or you have sudden and severe abdominal pain which gets increasingly worse.


Indigestion can feel extremely painful, and since the pain occurs in your chest and ribcage it can be worrying. But indigestion is not usually serious, and can be treated at home.

If you have indigestion you may experience:

  • heartburn
  • bloating
  • nausea
  • excessive wind
  • acid reflux

You can usually treat indigestion by:

  • reducing your intake of tea, coffee, cola, and alcohol
  • sleeping with your head and shoulders propped up
  • maintaining a healthy weight (check your BMI here)

You should visit your doctor if you experience:

  • persistent indigestion
  • severe pain
  • losing weight without trying
  • trouble swallowing
  • vomiting frequently
  • iron deficiency anaemia
  • the sensation of a lump in your stomach
  • blood in your vomit or stools

Or if you are over 55.


This is a gut infection, which can cause diarrhoea and vomiting. It can cause pain on the right and left side of your rib cage.

If you have mild gastroenteritis then you don’t need to visit a doctor, but seek medical advice if you experience:

  • dehydration
  • excessive vomiting
  • severe pain
  • persistent high temperatures
  • vomiting for more than 1-2 days
  • diarrhoea for more than 3-4 days
  • an infection that was obtained abroad
  • if you have a weakened immune system
  • if you are pregnant
  • if you are elderly or have an underlying health condition

Other gut problems that can sometimes cause pain under your ribs include:

  • diverticulitis
  • Crohn’s disease and ulcerative colitis
  • constipation
  • irritable bowel syndrome

Aorta problems

The aorta is the main blood vessel which goes from the heart down to the tummy. It can cause pain on the left side of your rib cage if it becomes swollen. This is known as an abdominal aortic aneurysm or AAA (pronounced triple-A).

Aortic aneurysms can be dangerous, and if they burst they can be life-threatening.

You’re more at risk of developing an AAA if you:

As well as rib pain, aortic aneurysms can cause:

  • a pulsing feeling in your tummy
  • persistent abdominal pain
  • lower back pain

You should get immediate medical help if you experience the symptoms of a burst AAA. These include:

  • severe pain in your tummy or lower back, which comes on suddenly
  • feeling dizzy
  • sweaty and pale skin
  • your heart beating faster than usual
  • feeling short of breath
  • passing out

Pancreatic problems

Your pancreas helps your gut digest food and regulate blood sugar. Sometimes your pancreas can become inflamed, causing pain in your upper left abdomen which can be felt under your ribs.

You may also experience:

  • nausea
  • vomiting
  • a fever

Pancreatic problems can be caused by acute pancreatitis, chronic pancreatitis, or pancreatic cancer.

You should see a doctor if you experience sudden and severe abdominal pain. You should also see a doctor if:

  • your skin becomes yellow (jaundice)
  • you are persistently vomiting
  • you experience unexpected weight loss
  • you have back or stomach pain that is worse when you lie down or after eating
  • you have indigestion
  • you have a fever or are shivering
  • you experience changes in your bowel movements

Problems with your spleen

Your spleen is located under your lower left ribs. If it becomes enlarged, is damaged or it ruptures then you will experience pain under your left lower ribs.

Sometimes your spleen can become enlarged if you have an infection, such as glandular fever.

You should see your doctor if you have symptoms of glandular fever, such as:

  • a high temperature
  • an extremely sore throat
  • swollen glands
  • extreme fatigue
  • tonsillitis that isn’t improving

Your spleen can also be damaged during a sickle cell disease crisis, or if you experience trauma.

When to worry

If you have persistent pain on the left side of your rib cage you should visit a doctor. Seek emergency medical help if you experience:

  • difficulty breathing
  • mental confusion
  • sweating more than usual
  • lightheadedness or dizziness

Other causes of rib pain


Angina is a type of heart pain that is caused by narrowing of the arteries, which provide the heart muscle with blood.

At first it may only be noticeable when you exercise because the additional blood needed can’t pass through the narrow arteries. This can cause chest pain.

Heart attack

Severe chest pain is the most common and well-known symptom of a heart attack. It is caused by the coronary artery suddenly becoming blocked and so cutting off the heart’s blood supply.

Gastro-oesophageal reflux disease

Gastro-oesophageal reflux disease is an umbrella term for a number of different conditions, such as acid reflux heartburn, and oesophagus inflammation (oesophagitis).

This disease can cause chest pain.


Costochondritis causes sharp and severe pain, which gets worse when you move, breathe deeply, or exercise.

It is caused by inflammation of the soft cartilage between the bony rib cage structure.

Strained chest wall muscle

Your rib cage is surrounded by lots of different muscles to enable it to move when you breath. Sometimes heavy lifting, stretching, or a sudden movement can strain one of these muscles which causes pain in the affected area.

Usually this time of rib cage pain is worse when you move or breath.


Anxiety is an extremely common cause of chest pain, sometimes so severe it is mistaken for heart disease.

Less common causes of rib pain

For more information on some of the less common causes of rib pain, click the links below:

Was this article helpful?

Important: Our website provides useful information but is not a substitute for medical advice. You should always seek the advice of your doctor when making decisions about your health.