Pain localized to the right side, directly beneath the ribs, and specifically aggravated by coughing is a common symptom. This discomfort is often mechanical, meaning it is directly caused by the physical effort and movement of the chest wall during a cough. Because the right upper abdominal quadrant and lower chest area house muscular, respiratory, and digestive systems, the source of the pain can vary widely. This article provides general information only and is not a substitute for professional medical diagnosis or treatment.
Common Muscular and Rib-Related Causes
The most frequent source of pain under the right ribs when coughing is related to the chest wall’s physical structures. Violent or prolonged coughing spasms, such as those accompanying a respiratory infection, can strain the intercostal muscles. These small muscles are positioned between the ribs and move the rib cage to facilitate breathing and coughing. A strain causes a sharp, localized pain that is immediately worse when the muscles contract forcefully during a cough, sneeze, or deep breath.
Another common musculoskeletal cause is costochondritis, which is the inflammation of the cartilage connecting the ribs to the breastbone. While the pain is often felt closer to the center of the chest, it can radiate and is exacerbated by movements that stretch the rib cage, including a cough. Costochondritis is characterized by tenderness when pressure is applied directly to the affected cartilage. Severe, chronic coughing can also exert enough mechanical stress to cause a stress fracture in one of the lower ribs. This type of fracture is more frequently observed in individuals with underlying conditions that weaken bone density.
Pain Stemming from Lung and Pleural Issues
When the pain is sharp and stabbing with every cough or deep breath, the source may be inflammation originating from the respiratory system. The lungs themselves lack pain receptors, but the thin, double-layered membrane surrounding them, called the pleura, is rich in nerve endings. Pleurisy is a condition where this lining becomes inflamed, often due to an underlying viral or bacterial infection.
During normal breathing, the two layers of the pleura glide smoothly past one another, but when inflamed, they rub together harshly, causing intense, knife-like pain. Because the lower right lung is directly adjacent to the rib cage, inflammation in this area causes pain localized under the right ribs that worsens with the rapid movement of a cough. Infections like lower lobe pneumonia or bronchitis, when concentrated near the bottom of the right lung, can irritate the adjacent pleural lining, leading to this sharp discomfort. This type of pain is often accompanied by other symptoms, such as fever, a productive cough, and shortness of breath, which indicate a respiratory infection is the primary concern.
Referred Pain from Abdominal Organs
Pain under the right rib cage that is worsened by coughing can also be a phenomenon of referred pain, originating from organs situated immediately below the diaphragm in the upper right abdominal quadrant. The movement of coughing involves a forceful downward contraction of the diaphragm, which can press against or jar inflamed organs, causing a spike in discomfort.
The gallbladder is a common source of this referred pain when it is inflamed, a condition known as cholecystitis, or when gallstones block the bile duct. Gallbladder pain typically presents as severe, steady discomfort under the right ribs that can radiate to the back or shoulder, and the mechanical movement of a cough or deep breath can aggravate it.
Furthermore, the liver, which sits directly under the right rib cage, can be a cause of sub-rib discomfort if it becomes enlarged or inflamed (hepatitis). An enlarged liver stretches the capsule surrounding it, and the pressure changes from coughing can intensify this dull, aching pain.
The right kidney is also positioned in the upper abdominal area, toward the back, just below the ribs. Issues like kidney stones or a kidney infection (pyelonephritis) can cause pain that is felt in the flank or side, occasionally presenting under the ribs. While the pain from kidney issues is typically a deep, constant ache, any movement that jostles the torso, including a cough, can temporarily heighten the sensation in the area.
Identifying Warning Signs and Next Steps
Distinguishing between a minor muscular strain and a more serious internal condition involves recognizing specific warning signs. A temporary, mild ache that only appears with a forceful cough and is tender to the touch is often a benign muscle strain that can resolve with rest.
However, certain accompanying symptoms are considered “red flags” and indicate that the underlying cause may be a serious infection or organ issue. Immediate medical attention is required if the pain is accompanied by any of the following:
- High fever or chills.
- Difficulty breathing or shortness of breath.
- Coughing up blood (bloody sputum).
- Sudden and severe chest tightness.
- Pain that persists for more than a week without improvement.
- Jaundice (a yellowing of the skin or eyes).
- Persistent nausea and vomiting, suggesting a serious liver or gallbladder complication.
When these warning signs are present, a healthcare provider can perform necessary tests to accurately diagnose the cause and determine the appropriate treatment plan.

