What Causes Pain Under the Right Ribs When Breathing?

Pain under the right ribs that worsens with breathing usually traces to an irritated or inflamed structure in the chest wall, lung lining, or upper abdomen, all of which shift when you inhale. The list of possible causes ranges from a strained muscle between the ribs to gallbladder disease, a collapsed lung, or even a stress fracture you did not know you had. Because breathing is constant and involuntary, the pain tends to feel inescapable, which is why it drives so many people to search for answers. The cause matters enormously for treatment, and a few possibilities warrant emergency attention.

Chest Wall Problems Are the Most Common Culprit

The ribs are not fused in place. They flex with every breath, connected to the breastbone by strips of cartilage and held together by layers of intercostal muscle. Any inflammation or injury in that framework will hurt more when breathing forces the structures to move. Two conditions account for a large share of right-sided rib pain that worsens on inhalation.

Costochondritis is inflammation at the junction where a rib meets its cartilage near the breastbone. It produces a sharp or aching pain that gets worse when you take a deep breath, twist your torso, or press on the affected spot. It can last weeks to months, and in a case series of eight patients referred to physical therapy, the average duration before treatment was about six months. After a course of targeted physical therapy, all subjects returned to full activity without restrictions.1PubMed Central. Impairment Based Examination and Treatment of Costochondritis: A Case Series The condition is benign but frustrating, and it is frequently misdiagnosed as a heart or lung problem because of how alarming rib pain on breathing can feel.

Slipping rib syndrome is less well known but surprisingly common in people with unexplained rib pain. It happens when the cartilage connecting one of the lower “false” ribs loosens, allowing the rib tip to slip under the one above it and pinch the intercostal nerve. The hallmark is a clicking or popping sensation along the lower rib margin, followed by sharp pain that flares with breathing or certain movements.2PubMed Central. A Comprehensive Review of Slipping Rib Syndrome: Treatment and Management Because imaging often looks normal, people with slipping rib syndrome sometimes go months or years without a diagnosis.

Gallbladder and Liver Trouble

The gallbladder sits tucked under the liver, right behind the lower ribs on your right side. When a gallstone blocks the bile duct or the gallbladder wall becomes inflamed (cholecystitis), the resulting pain typically centers in the right upper abdomen but can radiate into the right lower chest, the shoulder blade, and even the mid-back. In one documented case, a 34-year-old woman presented with what appeared to be right-sided thoracic and upper lumbar pain with intense muscle tightness; ultrasound ultimately revealed cholecystitis as the source.3BioMed Central / PubMed Central. Acute thoracolumbar pain due to cholecystitis: a case study Gallbladder pain often worsens after fatty meals and can build in waves, but the breathing connection comes from the fact that the diaphragm pushes the liver and gallbladder downward each time you inhale, which aggravates inflamed tissue.

Even without gallbladder disease, the liver itself can be a source of discomfort during breathing. A study using ultrasound found that the rib cage and its cartilage can physically compress the liver, especially in lean women with a particular body build. The compression increases during exhalation and when leaning forward, and it can cause right upper abdominal pain.4PubMed Central. Cartilaginous compression of the liver – clinical and ultrasonographic aspects This is a mechanical explanation for discomfort that might otherwise be puzzling on imaging, because the liver itself looks healthy.

Lung and Pleural Causes

The lungs are lined by a thin membrane called the pleura. When this membrane becomes inflamed, a condition called pleurisy, the two layers rub against each other during breathing and produce a distinctive, knife-like pain. Pleurisy on the right side causes pain right under or between the ribs that is dramatically worse on deep inspiration and often eases when you hold your breath or breathe shallowly. A variety of infections, autoimmune diseases, and other conditions can trigger it. In systemic lupus, for instance, pleural inflammation has been linked to a reflex inhibition of the diaphragm itself, which may explain the sensation of restricted breathing that accompanies the pain.5PubMed. Association of the shrinking lung syndrome in systemic lupus erythematosus with pleurisy: a systematic review

A pneumothorax, where air leaks into the space between the lung and the chest wall, causes sudden chest pain and difficulty breathing. A right-sided pneumothorax will produce sharp pain under the right ribs that intensifies with each breath. It can happen spontaneously in tall, thin young adults, after chest trauma, or even following a respiratory infection. One case report described a patient who developed a large right-sided pneumothorax with sudden chest pain days after recovering from mild COVID-19, with imaging showing ground-glass opacities in the lung.6BMJ Case Reports. Development of a large spontaneous pneumothorax after recovery from mild COVID-19 infection The characteristic electrocardiographic changes associated with a large right-sided pneumothorax resolved after the lung was re-expanded, confirming the diagnosis.7PubMed Central. Electrocardiographic manifestations in a large right-sided pneumothorax Pneumothorax is a medical emergency that requires prompt treatment, usually involving draining the trapped air.

Rib Fractures You Might Not Expect

A broken rib from a fall or car accident is an obvious cause of breathing-related pain. What catches people off guard is that ribs can fracture from coughing alone. A prolonged coughing illness puts repetitive mechanical stress on the ribs, and the opposing pull of different muscle groups during a cough can concentrate force on the middle sections of the fifth through tenth ribs. Over time, minor cracks develop, and if the coughing continues, these can progress to a complete fracture.8PubMed Central. Cough-induced rib fractures: A comprehensive analysis of 90 patients in a single center

Patients with cough-induced rib fractures typically present with chest pain that gets worse with movement, deep breathing, or further coughing, and the condition can be mistaken for musculoskeletal strain, pneumonia, or even a pneumothorax. A chest X-ray is usually what confirms the diagnosis.9PubMed Central. Cough-Induced Rib Fracture in a Postmenopausal Woman Without Clinical Evidence of Osteoporosis: A Case Report The risk is higher in postmenopausal women and people with chronic respiratory conditions that produce prolonged or severe coughing fits, but it can happen to anyone after a bad enough bout of bronchitis or whooping cough. If you have been coughing for weeks and develop a new, localized rib pain that spikes with every breath, a fracture is worth considering.

Intercostal Neuralgia

The intercostal nerves run along the underside of each rib, and when one of these nerves is irritated or damaged, the result is a burning, stabbing, or electric pain that follows the path of the rib around toward the front of the chest or upper abdomen. This is intercostal neuralgia, and because the affected nerve stretches with rib movement during breathing, inhalation reliably intensifies the pain.10Ochsner Journal. Cooled Radiofrequency Ablation for Intercostal Neuralgia Causes include shingles (herpes zoster), prior chest surgery, trauma, or sometimes no identifiable trigger at all.

The pain can wrap around from the back to the front of the rib cage, which sometimes leads people to suspect an organ problem when the issue is actually a nerve. One distinguishing feature is that the skin over the affected area may feel unusually sensitive to touch or even to the brush of clothing. Treatment ranges from nerve blocks and anti-inflammatory medications to, in resistant cases, procedures like radiofrequency ablation. In one small series, patients treated with cooled radiofrequency ablation of the intercostal nerves experienced an average pain reduction of about 80%.10Ochsner Journal. Cooled Radiofrequency Ablation for Intercostal Neuralgia

Less Common Causes Worth Knowing About

Several other conditions can produce pain under the right ribs on breathing, even though they are less frequently the answer.

Pericarditis is inflammation of the sac surrounding the heart. The pain is usually felt behind the breastbone or on the left, but it can radiate to the right side, and it characteristically worsens with deep breathing and lying flat while improving when you lean forward. It accounts for roughly 5% of emergency department admissions for non-cardiac chest pain.11Mayo Clinic Proceedings. Pericardial Disease: Diagnosis and Management The breathing connection exists because the inflamed pericardium rubs against surrounding structures as the lungs expand.

Kidney problems, particularly right kidney stones or infection, can send pain into the area below the right ribs posteriorly. The pain of renal colic tends to begin in the back below the ribs and radiate downward toward the groin, which helps distinguish it from gallbladder or lung problems, though the overlap can be significant.12ScienceDirect. French’s Index of Differential Diagnosis Kidney pain may worsen with deep breathing because the diaphragm descends and compresses the kidney, but it usually also persists between breaths in a way that purely musculoskeletal or pleural pain does not.

In younger women, a condition called Fitz-Hugh-Curtis syndrome can cause severe right upper abdominal pain that mimics gallbladder disease. It involves inflammation of the capsule around the liver as a complication of pelvic inflammatory disease.13PubMed. An Uncommon Manifestation of Fitz-Hugh-Curtis Syndrome with Right-side Chest Pain The right-sided chest and rib pain in these cases can be the presenting complaint rather than pelvic symptoms, which sometimes delays diagnosis.

Why Breathing Makes So Many Different Problems Hurt in the Same Spot

The right upper quadrant of the abdomen and the right lower chest are anatomically crowded. The liver, gallbladder, right kidney, a section of the colon, the head of the pancreas, the right lung base, and the diaphragm all occupy overlapping territory beneath and behind the lower right ribs.12ScienceDirect. French’s Index of Differential Diagnosis When you breathe in, the diaphragm contracts and pushes downward, the rib cage expands outward, and all of these organs shift. Anything inflamed, compressed, or mechanically unstable in that region will be disturbed by the movement. This is why such different conditions, from a pulled muscle to a gallstone to a blood clot in the lung, can all produce what feels like the same symptom.

The nerves in the area add another layer of confusion. The phrenic nerve, which controls the diaphragm, shares nerve root origins with nerves that supply the shoulder tip. The intercostal nerves overlap with nerves innervating abdominal organs. This means pain from a liver problem can feel like rib pain, pain from a lung problem can feel like abdominal pain, and pain from a rib problem can feel like it is coming from somewhere deep inside. Referred pain is the norm in this region, not the exception.

The Exercise-Related Side Stitch

If your right-sided rib pain only appears during or shortly after exercise, especially running, you may be experiencing what researchers formally call exercise-related transient abdominal pain but everyone else calls a side stitch. The prevailing theory is that the pain arises when a fluid-filled stomach tugs on the ligaments connecting the abdominal organs to the diaphragm. A study that induced side stitches by having runners drink fluid before exercise found that the pattern of pain was consistent with the gut pulling on visceral ligaments rather than any change in blood flow to the digestive organs.14PubMed. Investigation of the side pain “stitch” induced by running after fluid ingestion Side stitches are harmless and resolve on their own, but they tend to recur in people who eat or drink heavily before vigorous activity. Slowing down, exhaling forcefully, and pressing on the painful spot are the classic remedies.

When to Treat It as an Emergency

Most causes of right-sided rib pain with breathing are not life-threatening, but a few demand immediate medical attention. You should seek emergency care if the pain came on suddenly and is severe, if you are short of breath at rest, if the pain is accompanied by fever and rapid heart rate, or if you have recently been immobilized (long flight, surgery, bed rest) and develop new chest pain, which raises concern for a pulmonary embolism. Coughing up blood, feeling lightheaded, or noticing that one side of your chest is not moving normally with breathing are all red flags.

For pain that is milder, has been present for days or weeks, and worsens predictably with certain movements or deep breaths, the cause is more likely musculoskeletal or related to a chronic condition. A visit to your doctor rather than the emergency room is usually appropriate in that scenario. The key diagnostic tools are straightforward: a physical exam, chest X-ray, blood work, and sometimes an ultrasound of the abdomen can sort through the most likely suspects. If those come back normal and the pain persists, more specialized testing for conditions like slipping rib syndrome or intercostal neuralgia may be the next step.

What Clinicians Check First

Doctors evaluating right-sided rib pain that worsens with breathing tend to work through a mental checklist based on the character, location, and timing of the pain. Sharp pain that is worst on a specific deep breath and reproducible by pressing on a spot on the chest wall points toward costochondritis or a rib injury. Pain that builds in waves and is associated with nausea or follows a fatty meal shifts suspicion toward the gallbladder. Pain with fever, cough, and sometimes a friction rub heard through a stethoscope suggests pleurisy or pneumonia. A sudden onset with breathlessness raises the concern for pneumothorax or pulmonary embolism.

One practical detail worth knowing: pain that you can reproduce by pressing on a specific spot on the rib cage is much more likely musculoskeletal in origin. Organ-related pain generally cannot be triggered by external pressure on the chest wall, though there are exceptions. This simple test does not replace imaging, but it can help you and your doctor narrow the field. If you are tracking your symptoms before an appointment, note whether the pain is worse lying down versus sitting up, whether it changes with meals, whether it came on gradually or all at once, and whether anything besides breathing makes it better or worse. Those details carry diagnostic weight out of proportion to how simple they sound.