Pain along the back of your ribs most often comes from strained muscles or irritated joints in the mid-back (thoracic spine), but it can also signal nerve irritation, a kidney problem, or inflammation of the tissue lining your lungs. The location, timing, and quality of the pain are the best clues to what’s going on.
Muscle Strain and Joint Irritation
The most common reason for posterior rib pain is musculoskeletal: a strained muscle between the ribs, a stiff thoracic spinal joint, or a rib joint that isn’t moving properly. This kind of pain tends to be sharp with certain movements, like twisting, reaching overhead, or taking a deep breath. Coughing and sneezing can make it significantly worse. You can usually press on the sore spot and reproduce the pain, which is a hallmark of musculoskeletal causes. Poor posture, sleeping in an awkward position, heavy lifting, or repetitive motions like rowing or shoveling are typical triggers.
A rib stress fracture is less common but worth knowing about, especially if you’ve recently increased your activity level. Stress fractures produce focal tenderness on a specific rib and hurt with any chest wall movement. Standard chest X-rays catch some rib fractures, but their sensitivity is actually poor. MRI is now the preferred tool when a stress fracture is suspected and a definitive diagnosis would change how it’s treated.
Intercostal Neuralgia
Intercostal neuralgia is pain caused by irritation or damage to one of the nerves running between your ribs. It can result from nerve entrapment, a previous injury, surgery, or a shingles infection. The pain typically follows a band-like pattern along one rib, wrapping from the back toward the front.
One useful distinction: nerve pain along the ribs gets slightly worse with deep breathing, but much less so than musculoskeletal pain. People with intercostal neuralgia also don’t instinctively guard or protect the painful area the way someone with a broken rib or inflamed joint would. The sensation is often burning, shooting, or electric rather than the dull ache of a strained muscle.
Kidney Pain That Mimics Rib Pain
Your kidneys sit behind your stomach, just under your rib cage on either side of the spine. That means a kidney stone or kidney infection can produce pain that feels like it’s coming from your lower back ribs. Kidney pain is typically felt in the flank (the side of your back, below the ribs) and tends to feel deeper than muscle pain. It doesn’t change much when you shift position or press on the area.
A kidney stone often causes severe, wave-like pain that radiates down toward the groin. A kidney infection more commonly produces a constant, dull ache along with fever, nausea, or painful urination. If your pain is one-sided, deep, and comes with any urinary symptoms or fever, the kidneys are a likely culprit.
Pleurisy and Lung-Related Causes
Pleurisy is inflammation of the thin membrane surrounding the lungs. It causes sudden, intense, stabbing pain that gets sharply worse when you inhale, exhale, cough, sneeze, or laugh. It can occur anywhere along the rib cage, including the back. The pain often develops over hours to days and frequently follows a respiratory infection.
Pneumonia can also cause posterior rib pain, especially if the infection involves the lower lobes of the lungs, which sit against the back of the rib cage. If you’re experiencing true shortness of breath alongside the pain, that raises concern for pneumonia, a collapsed lung (pneumothorax), or a pulmonary embolism, which is the most common life-threatening cause of sharp chest pain that worsens with breathing.
Slipping Rib Syndrome
Slipping rib syndrome occurs when the cartilage connecting your lower ribs loosens, allowing one rib to slip and irritate the rib above or below it. It usually affects the 8th through 10th ribs at the lower part of the rib cage. The signature symptom is a clicking or popping sensation along with sharp pain that can radiate to the back. Doctors confirm it with a “hooking maneuver” where they curl their fingers under the lower ribs and pull outward. If that reproduces your pain and clicking, slipping rib syndrome is the likely diagnosis. It’s often overlooked, so people with this condition sometimes go months before getting an answer.
When Posterior Rib Pain Needs Urgent Attention
Most back rib pain resolves on its own or with simple treatment. But certain features should prompt a same-day or emergency evaluation:
- Sudden shortness of breath alongside the pain, which raises concern for a pulmonary embolism, pneumothorax, or pneumonia
- Fever, chills, or sweats paired with rib or flank pain, which may indicate a kidney infection or pneumonia
- Pain that radiates to your shoulders or arms with sweating or nausea, which can signal a heart problem even when it’s felt in the back
- Pain at its maximum intensity the moment it starts, which is more commonly associated with aortic dissection than typical musculoskeletal causes
For pain that lingers more than a month without improvement, clinicians also screen for less common causes. A history of cancer, age over 50, pain that doesn’t ease with rest, and symptoms that came on gradually without an obvious trigger are all factors that raise the index of suspicion for something beyond a simple strain.
Managing Minor Musculoskeletal Rib Pain
If your pain started after a clear physical trigger, worsens with movement, and you can reproduce it by pressing on the area, it’s very likely musculoskeletal. These strategies help most people recover within a few weeks.
Gentle stretching targets the muscles and joints that contribute to posterior rib pain. A scapula squeeze, where you sit up straight and pinch your shoulder blades together as if holding a pencil between them for three seconds, then release, helps mobilize the mid-back. Repeat 10 to 15 times. A pectoral doorway stretch, where you place both forearms against a doorframe and lean forward for 15 to 30 seconds, opens up the chest wall and reduces tension pulling on the rib joints from the front. Three to five repetitions is a reasonable starting point.
Ice for the first 48 hours, then switching to heat, can help manage inflammation and muscle tightness. Over-the-counter anti-inflammatory medications reduce pain and swelling. Avoid positions that compress the sore area, but don’t stop moving entirely. Prolonged immobility tends to stiffen the thoracic spine and make the pain last longer. If the pain isn’t improving after two to three weeks of home care, a physical therapist can perform rib mobilizations and thoracic spinal joint mobilizations to restore normal movement patterns.

