Pain under the right rib cage
- Gallstones and biliary colic: episodes of intense pain, often after fatty meals, sometimes spreading to the right shoulder blade.
- Cholecystitis: inflammation of the gallbladder with constant pain, fever and tenderness.
- Liver problems: hepatitis, fatty liver or liver congestion, sometimes with jaundice.
- Kidney stones or infection: pain in the side or back, often with urinary symptoms.
- Right lower lung infection or pleurisy, with cough, fever and pain on breathing.
- Pre-eclampsia in late pregnancy.
Pain under the left rib cage
- Gastritis or stomach ulcer: burning or gnawing pain, often related to meals.
- Trapped wind: crampy pain that moves and eases after passing wind.
- Spleen problems: an enlarged or injured spleen, for example after glandular fever or trauma.
- Pancreatitis: severe upper abdominal pain spreading to the back.
- Kidney problems on the left side.
- Heart problems can sometimes cause pain in this area.
- More detail is in rib pain on the left side.
Pain in the middle, under the breastbone
- Indigestion and acid reflux, often with burning and a sour taste; see indigestion relief.
- Peptic ulcers.
- Pancreatitis.
- Oesophageal spasm.
- Heart attack or angina, especially with exertion, breathlessness or sweating.
Muscle and rib causes
- Intercostal muscle strain: after twisting, lifting, coughing or sport; sharp pain on breathing and movement.
- Costochondritis: inflammation where the ribs join the breastbone, with tenderness to touch.
- Slipping rib syndrome: pain and clicking at the lower ribs; see slipping rib syndrome.
- Rib bruise or fracture after a fall or blow.
- Shingles: burning pain followed by a band-like rash.
- These causes are often worse with movement, deep breathing or pressing on the area.
Clues to the cause
- Pain reproduced by pressing the ribs suggests a musculoskeletal cause.
- Pain after fatty meals suggests the gallbladder.
- Burning pain related to eating suggests stomach or reflux problems.
- Pain with fever suggests infection or inflammation.
- Pain with yellow skin, dark urine or pale stools suggests liver or bile duct problems.
- Pain with urinary symptoms suggests the kidney.
- Pain with exertion and breathlessness suggests the heart or lungs.
How a doctor investigates
A doctor will ask about the pain’s timing, location, triggers and associated symptoms, examine the chest and abdomen, and may arrange blood tests, including liver function and pancreatic enzymes, a urine test, an ECG, an ultrasound scan of the abdomen, a chest X-ray, or other imaging depending on the findings. Ultrasound is the main test for gallstones, which the NHS notes are common and often cause no symptoms.
Self-care for mild pain
- For muscle strain or costochondritis: rest from aggravating activities, gentle movement, heat or ice and simple pain relief.
- For indigestion: smaller meals, less fatty and spicy food, less alcohol and not eating late.
- For trapped wind: walking, gentle abdominal massage and avoiding fizzy drinks.
- Keep a symptom diary to identify patterns.
- See a doctor if pain persists, recurs or is accompanied by other symptoms.
Pain under the ribs during exercise
A sharp “stitch” under the ribs during running or swimming is common and usually harmless. It tends to occur with exercise after eating or drinking large amounts and eases when slowing down, breathing deeply and pressing on the area. Pain during exercise that comes with breathlessness, chest tightness, dizziness or palpitations is different and should be checked.
Three common situations
- Sharp pain under the right ribs after a fatty meal, lasting an hour: possible gallstones; see a doctor for an ultrasound.
- Tender lower ribs after a hard coughing spell: likely muscle strain; rest and pain relief usually help.
- Burning upper middle pain after meals: often reflux or gastritis; see a doctor if persistent.
Pain under the ribs when breathing
Pain that catches when you take a deep breath, cough or sneeze often comes from the chest wall, such as a strained intercostal muscle or inflamed rib cartilage. It can also come from the lining of the lungs (pleurisy), a chest infection or, less commonly, a blood clot in the lung, which typically causes sudden breathlessness and sometimes coughing up blood. Pain on breathing with fever, breathlessness or a recent long journey or surgery needs prompt medical assessment. Muscle strains are covered in intercostal muscle strain.
Key points to remember
- Location helps suggest the cause, but overlaps are common.
- Muscle and rib causes are often tender and worse with movement.
- Gallbladder, stomach, liver and pancreas problems need medical assessment.
- Severe pain, fever, jaundice or chest pain symptoms need urgent care.
Questions about pain under the rib cage
These answers are general information and do not replace an examination or individual medical advice.
When should I worry about pain under my rib cage?
If it is severe, persistent, comes with fever, jaundice, vomiting, breathlessness or chest pain symptoms, or follows an injury.
Can stress cause pain under the rib cage?
Stress can cause muscle tension, worsen indigestion and contribute to chest wall pain.
Can gas cause pain under the ribs?
Yes. Trapped wind can cause sharp or crampy pain under the ribs, especially on the left.
What does gallbladder pain feel like?
Often a severe, steady pain under the right ribs or upper middle abdomen, sometimes spreading to the right shoulder blade, lasting from minutes to hours.
Can a pulled muscle cause pain under the rib cage?
Yes. Intercostal muscle strains are a common cause, especially after coughing, twisting or lifting.
Sources
This guide is for general information and does not replace medical advice. How a problem is diagnosed and treated depends on your examination and medical history. If you think you have an emergency, contact your local emergency services.