What causes back pain on the right side under the ribs? Related conditions and treatments

Medically reviewed by Anne JacobsonMD, MPH
Board-Certified Family Physician
Updated May. 3, 2024  •  Published Jan. 10, 2024
Fact Checked
 What causes back pain on the right side under the ribs?

What does back pain on the right side under the ribs feel like?

Back pain on the mid to upper right side of the body can be due to any number of conditions, including rib fracture, soft tissue damage, or organ problems. Some vital organs are in this area, including the right kidney, the liver, the pancreas, the gallbladder, the top of the small intestine, and the bottom of the right lung. Problems with any of them can cause pain in the upper right abdomen, but not all of them typically cause pain in the back. Back pain can vary from a dull ache to severe pain, from a throbbing sensation to sharp pain, depending on the cause. If organs are involved, there may be other symptoms such as fever, chills, nausea, vomiting, discolored urine, discolored stools, and skin changes.

Key takeaways:

  • Back pain on the right side under the ribs is a common symptom that may be caused by rib fracture, rib bruising, pulled muscles, kidney problems, lung disease, liver problems, pancreas problems, or gallbladder problems.

  • Typically, back pain on the right side under the ribs does not require immediate medical attention unless there are other serious symptoms such as high fever, shortness of breath, or chest pain.

  • Back pain on the right side under the ribs generally does require evaluation and possibly treatment. It typically resolves with treatment, though the timeline may vary depending on the underlying cause.

  • Treatments of back pain on the right side under the ribs vary by cause. This can include treatments for kidney infections, kidney stones, pancreatitis, pneumonia, or gallstones.

  • Back pain on the right side under the ribs can often be managed with rest and over-the-counter pain relievers.

  • Use coupons for treatments for back pain like Motrin or Advil (ibuprofen), Tylenol (acetaminophen), and Aleve (naproxen), to save up to 80%.

What causes back pain on the right side under the ribs?

The most common causes of back pain on the right side are injuries. However, problems with organs in the chest or upper abdomen could cause back or rib cage pain in the back.

Injuries

Musculoskeletal injuries can cause pain on the right side under the ribs. Some of these may be traumatic injuries, but others may be slow-motion injuries, like intense coughing. Rib pain from these injuries usually gets worse when breathing in, taking a deep breath, coughing, or sneezing. Possible causes include:

  • A broken rib

  • Rib bruising

  • Muscle strain or muscle injury

  • Inflammation of the cartilage (costochondritis) is also a possible cause, but it usually causes pain in the front of the chest

RELATED: Broken rib symptoms: what are the early symptoms of a broken rib?

Kidney problems

For back pain right below the ribs, another suspect is the right kidney. Both kidneys sit near the back, near the spine, and below the ribs. Back pain or flank pain is a common symptom of a kidney problem. Kidney pain typically feels like a dull ache, but it could be very sharp when passing a kidney stone. The pain usually worsens when you put pressure on the spot. People with kidney problems often have other symptoms, as well. These include fever, painful urination, decreased urination, or blood in the urine. Potential causes of kidney pain include:

  • Kidney stones

  • Kidney infection

  • Kidney injury

  • Kidney cancer

  • Polycystic kidney disease

  • Urinary tract infections

Lung conditions

The lungs extend from slightly above the collarbone to the sixth rib in the front and the tenth rib in the back. Lung conditions can cause pain anywhere in that space. However, the lung doesn’t have many pain receptors. Usually, the pain is registered by something else, such as the tissues surrounding the lung. In most cases, the pain gets worse when breathing in. The most common lung conditions that cause pain include:

  • Pneumonia

  • Pleurisy (inflammation of the membrane surrounding the lungs)

  • Lung cancer occurs if tumors push into or spread into the tissues around the lungs

Other conditions

The right upper quadrant (RUQ) also hosts the liver, the pancreas, the gallbladder, and the first part of the intestine. The liver sits on the right side of the body between the seventh and eleventh ribs. The pancreas, gallbladder, and small intestine sit right below the liver. When people have problems with these organs, they usually describe the pain as abdominal pain. However, some people may feel back pain. Most conditions will have other symptoms, such as yellowing of the skin and eyes (jaundice), heartburn, indigestion, chest pain, bloating, and weight loss. Possible causes of pain in the upper right part of the abdomen include:

Should I be worried about back pain on the right side under the ribs?

If you’re feeling back pain on the right side under the ribs, call a healthcare provider for medical advice. The pain could be due to a potentially serious medical condition requiring medical care. Even if there’s a ready explanation, like chronic coughing or an injury, a healthcare provider can give medical advice about home treatment.

If there’s severe pain, then talk to a doctor. Otherwise, let other symptoms be your guide. They may be a more reliable indicator of the seriousness of the issue. See a doctor if you experience symptoms such as fever, shortness of breath, difficulty breathing, chest pain, or jaundice (yellowing of the skin or eyes). Some of these, like chest pain, may indicate a potentially life-threatening medical emergency like a heart attack. One of the signs of a heart attack is chest pain that radiates outwards to the shoulders, shoulder blades, left arm, and upper back.

How is the cause of back pain on the right side under the ribs diagnosed?

Because there are so many potential causes of back pain on the right side under the ribs, diagnosis requires some detective work on the part of the healthcare provider. The clinician will start with a review of symptoms, medical history, and a physical examination.

Depending on the suspected cause, a primary care provider or emergency room doctor may refer the case to a specialist in musculoskeletal problems called an orthopedist, a specialist in lung diseases called a pulmonologist, a specialist in urinary tract disorders called a urologist, a kidney specialist (nephrologist), or a specialist in digestive system diseases (gastroenterologist).

Healthcare professionals will use one or more tests from a wide variety of possible tests depending on the suspected cause. These tests may include:

  • Blood tests

  • Urine tests

  • An X-ray, MRI, CT scan, or ultrasound

  • An endoscopic examination

  • Bronchoscopy

  • Pleural fluid sampling

  • Sputum sample

How long does back pain on the right side under the ribs last?

Back pain on the right side under the ribs will last for as long as there’s an underlying cause.

Muscle injuries typically heal in a few days or weeks. The average rib fracture heals in six weeks with proper care.

Kidney stones will take anywhere from a few days to three weeks to pass. Kidney pain due to infections usually improves after starting antibiotics.

Both pleuritis and pneumonia improve with treatment within days or weeks..

Diseases of the liver and gastrointestinal tract may be resolvable, but some may be chronic conditions.

How to stop back pain on the right side under the ribs

For upper right back pain beneath the ribs, treatment will vary depending on the underlying cause:

  • Injuries are usually treated with rest, cessation of physical activity, physical therapy, over-the-counter pain relief medications, and anti-inflammatory medications.

  • Kidney stone pain is usually treated with over-the-counter pain relief medications, but prescription pain relievers may be needed. Larger kidney stones may need to be broken up with soundwaves (shockwave lithotripsy) or removed surgically.

  • Kidney infections are treated with antibiotics and a few days of pain relievers if necessary.

  • Pneumonia is typically treated with antibiotics or antiviral medications.

  • Pleurisy pain is most commonly treated with over-the-counter pain relief and anti-inflammatory medications. Because a variety of medical conditions can cause pleural inflammation, treatments will vary.

  • Right upper quadrant pain caused by other conditions will have varying treatments.

Living with back pain on the right side under the ribs

Most problems that cause back pain on the right side under the ribs are treatable. The pain should relent after a few days or weeks of treatment. During that time, a few measures can help reduce the pain and discomfort:

  • Follow all instructions given by the healthcare team.

  • Over-the-counter pain relief medications should be enough to keep pain under control.

  • You will need to take a deep breath every once in a while and cough about once per hour to maintain lung health and prevent complications—it will hurt, but you can do this in a controlled and conscious way.

  • If the rib cage or tissues are injured, avoid wrapping the chest or using a rib brace—research since the 1980s has shown that wrapping and rib braces increase the risk of complications because people can’t breathe deeply.

Most importantly, get medical help

In most cases, pain under the rib cage is due to a medical condition that either requires treatment or medical advice. Some of the causes are serious and have health-threatening complications if left untreated. Only a healthcare professional knows how to discover the cause and treat it appropriately.

What’s next? Additional resources for people with back pain on the right side under the ribs

Test and diagnostics

Treatments

Scientific studies and clinical trials

Medically reviewed by Anne JacobsonMD, MPH
Board-Certified Family Physician

Anne Jacobson, MD, MPH, is a board-certified family physician, writer, editor, teacher, and consultant. She is a graduate of University of Wisconsin School of Medicine and Public Health, and trained at West Suburban Family Medicine in Oak Park, Illinois. She later completed a fellowship in community medicine at PCC Community Wellness and a master's in Public Health at the University of Illinois-Chicago. She lives with her family near Chicago.

...