Where the pain comes from
Each of the 12 pairs of ribs attaches to the thoracic spine at two small joints, the costovertebral and costotransverse joints. Muscles run between the ribs (intercostals), along the spine (erector spinae) and from the ribs to the shoulder blades and pelvis. The kidneys sit just under the lower ribs at the back. Pain in the back ribs can come from any of these structures, and the location, right or left, upper or lower, helps narrow down the cause.
Common musculoskeletal causes
- Muscle strain: from lifting, twisting, sport or reaching; tender muscles and pain with movement.
- Costovertebral joint irritation: sharp, localised pain beside the spine, often worse with deep breaths or turning.
- Posture: long hours at a desk or driving stiffen the mid back.
- Coughing: prolonged coughing strains rib muscles and joints.
- Rib fracture or bruising after a fall or blow; see the NHS guide to broken or bruised ribs.
- Thoracic spine problems: disc problems or osteoporotic fractures in older adults.
- Muscle pain near the shoulder blades is covered in pulled muscle near the shoulder blade.
Right versus left back rib pain
Right side: besides muscles and joints, consider the right kidney (infection or stones), the liver and gallbladder (pain may spread to the right shoulder blade, often after meals) and the right lung.
Left side: consider the left kidney, the spleen, the pancreas (pain boring through to the back, often with nausea), the left lung and, rarely, the heart.
In practice, most one-sided back rib pain is mechanical, but these possibilities matter if pain is unrelated to movement or comes with other symptoms.
Organ-related causes to recognise
- Kidney infection: flank pain, fever, shivering, nausea and urinary symptoms.
- Kidney stones: severe, colicky pain that comes in waves, often spreading to the groin, sometimes with blood in urine.
- Pleurisy and pneumonia: pain on breathing with cough, fever or breathlessness.
- Pulmonary embolism: sudden breathlessness and sharp pain.
- Shingles: burning band of pain on one side, followed by a rash.
- Pancreatitis: severe upper abdominal pain spreading to the back, with vomiting.
Home care for mechanical back rib pain
- Stay active and keep moving within comfort.
- Use heat for 15–20 minutes to relax muscles.
- Take pain relief as advised so that you can breathe deeply and move.
- Change position often and take breaks from sitting.
- Sleep with pillows supporting the painful side or between the knees.
- Avoid heavy lifting and sudden twisting for a few days.
Exercises for back rib pain
- Seated rotation: arms crossed over the chest, turn slowly each way, 10 times.
- Side bend: reach one arm overhead and lean gently, 20 seconds each side.
- Cat–cow: on hands and knees, round and arch slowly, 10 times.
- Open book: side-lying with knees bent, rotate the top arm open, 10 each side.
- Thoracic extension over a chair or foam roller, 10 times.
- Deep breathing into the sides of the ribs, 5–10 breaths every hour.
- Progress to rows and back extensions for strength once pain allows.
When to see a doctor or physical therapist
See a doctor if pain does not improve within a week or two, keeps getting worse, wakes you at night, is not affected by movement, or comes with fever, urinary symptoms, cough, breathlessness, weight loss or feeling unwell. Older adults, people with osteoporosis or cancer, and those on long-term steroids should have new back pain checked. Once serious causes are excluded, a physical therapist can treat stiff joints and muscles and guide a return to activity. Pain lower down the back is covered in our guide to lower back strain.
Three common situations
- Sharp pain beside the spine after moving furniture: a muscle or rib joint strain is likely; heat and gentle movement usually settle it in days.
- Right flank pain with fever and burning when passing urine: possible kidney infection; see a doctor the same day.
- Office worker with aching mid back ribs every afternoon: posture and inactivity; regular breaks and mobility exercises help.
Key points to remember
- Back rib pain is usually muscular or from rib–spine joints.
- Mechanical pain is localised, tender and changes with movement.
- Fever, urinary symptoms, breathlessness or severe sudden pain need medical care.
- Heat, movement and progressive exercises help most cases.
Questions about back rib pain
These answers are general information and do not replace an examination or individual medical advice.
Why do my back ribs hurt?
Most often because of a strained muscle or irritated rib joint from lifting, twisting, coughing or posture. Kidney and lung problems are less common causes.
How do I know if back rib pain is my kidneys?
Kidney pain is usually deeper in the flank, not changed by movement, and may come with fever, urinary symptoms or waves of severe pain.
Can stress cause back rib pain?
Stress increases muscle tension and can make the mid back ache, but it is worth ruling out physical causes if pain is new.
How long does a pulled muscle in the back ribs last?
Usually one to three weeks; more severe strains may take up to six weeks.
Should I see a doctor for back rib pain?
Yes, if it lasts more than two weeks, is severe, follows a fall or comes with fever, breathlessness or urinary symptoms.
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.