SymptomLungs & breathing

Pain When Breathing: What Causes It?

Pain when breathing, especially a sharp pain on taking a deep breath, is called pleuritic chest pain. Common, less serious causes are strained chest muscles, a bruised or cracked rib and costochondritis (inflamed rib cartilage). It can also come from pleurisy, pneumonia, a collapsed lung (pneumothorax), a blood clot in the lung (pulmonary embolism) or pericarditis. Sudden pain with shortness of breath, coughing up blood or feeling faint needs emergency care.

Also called: Painful breathing, pleuritic chest pain, hurts to breathe, pain on deep breath

At a glance

What it is
Chest, side, back or rib pain that worsens when you breathe in, cough or sneeze.
Common causes
Muscle strain, rib injury, costochondritis, viral pleurisy, chest infections.
Serious causes
Pulmonary embolism, pneumothorax, pneumonia, pericarditis, heart attack.
Red flags
Sudden onset, breathlessness, coughing blood, fainting, a swollen calf, fever with fast breathing.
Tests
Oxygen level, chest X-ray, ECG, D-dimer blood test, CT scan of the lungs.
Treatment
Depends on the cause: pain relief and rest, antibiotics, blood thinners, or draining air from the chest.

When to get help

Call 911 or go to the ER

  • Sudden sharp chest pain with shortness of breath, especially after surgery, a long flight or car trip, pregnancy or with a swollen, painful calf (possible blood clot)
  • Sudden one-sided chest pain and breathlessness in a tall, thin young person, a smoker or someone with lung disease (possible collapsed lung)
  • Coughing up blood, fainting, blue lips or a racing heart with chest pain
  • Crushing, squeezing chest pressure spreading to the arm, jaw or back, or with sweating and nausea
  • Chest pain after a major blow to the chest, such as a car crash or fall from height

See a doctor within a day or two

  • Painful breathing with fever above 38 °C (100.4 °F), a productive cough and fast breathing (possible pneumonia)
  • Chest pain that is worse lying flat and better leaning forward, after a recent viral illness (possible pericarditis)
  • Pain on breathing after a fall onto the ribs, especially in older adults or with a rib that clicks or grinds

Book a routine appointment

  • Pain on breathing that has lasted more than a week without a clear cause
  • Recurrent episodes of sharp chest pain with breathing

Usually safe to manage at home

  • Pain in one spot on the chest wall that is tender to press and started after exercise, lifting or heavy coughing, with normal breathing otherwise

Why breathing hurts

Each breath moves the ribs, the muscles between them, the diaphragm and the thin double lining around the lungs (the pleura). The lungs themselves have few pain nerves, but the pleura, chest wall and the sac around the heart are sensitive. Inflammation or injury in any of them causes pain that sharpens as the chest expands.

Causes of pain when breathing

Chest wall causes (most common)

  • Muscle strain: from coughing, twisting, lifting or sport. Pain is in one spot, tender to touch and worse with certain movements.
  • Costochondritis: inflammation where the ribs join the breastbone. Sharp pain at the front of the chest, reproduced by pressing on the joints. It is harmless and settles over weeks.
  • Rib fracture or bruise: after a fall or blow, or even from violent coughing. Pain is severe on breathing in and pressing the rib.
  • Shingles: burning pain in a band on one side of the chest, followed days later by a blistering rash.

Lung and pleural causes

  • Pleurisy: inflammation of the pleura, usually from a viral infection. A sharp, stabbing pain on breathing in, often on one side, sometimes with a rubbing sound heard through a stethoscope.
  • Pneumonia: fever, cough with colored sputum, breathlessness and pleuritic pain.
  • Pulmonary embolism: a blood clot in the lung arteries, usually from a leg vein. Sudden breathlessness, sharp chest pain on breathing, a fast heart rate, and sometimes coughing blood or fainting. Risk factors include recent surgery, long travel, immobility, pregnancy, the contraceptive pill, cancer and previous clots.
  • Pneumothorax (collapsed lung): air leaks between the lung and chest wall. Sudden one-sided sharp pain and breathlessness. It can happen without warning in tall, thin young men, and in people with asthma, COPD or after chest injury.
  • Pleural effusion: fluid around the lung, causing breathlessness and sometimes a dull ache.
  • Asthma and bronchitis: chest tightness and soreness from coughing.

Heart causes

  • Pericarditis: inflammation of the sac around the heart. Sharp central chest pain, worse on breathing in and lying flat, eased by sitting forward. Often follows a viral illness.
  • Heart attack: more often pressure or heaviness than pleuritic pain, but it can be atypical.

Below the diaphragm

Gallbladder inflammation, liver problems, a spleen injury or an abscess under the diaphragm can cause pain under the ribs that worsens on deep breathing, sometimes felt in the shoulder tip.

Telling the causes apart

CauseOnsetKey clues
Muscle strainAfter activity or coughingTender spot, normal breathing otherwise
CostochondritisGradualFront of chest, tender to press on rib joints
Rib fractureAfter injuryVery tender bone, worse with movement
Viral pleurisyOver hours to daysSharp one-sided pain, recent cold
PneumoniaOver daysFever, cough, sputum, breathlessness
Pulmonary embolismSuddenBreathlessness, fast heart rate, risk factors, swollen calf
PneumothoraxSuddenOne-sided, breathless, tall thin young person or lung disease
PericarditisOver hours to daysBetter sitting forward, worse lying flat

Pain in the back or under the ribs when breathing

Pain in the back when you breathe in is often a strained back or rib muscle or a stiff rib joint at the spine. It can also come from pleurisy, pneumonia at the base of a lung, a pulmonary embolism or a kidney problem. Pain under the right ribs on breathing in, especially after fatty food, may come from the gallbladder. Pain under the left ribs after an injury could be a spleen injury and needs prompt assessment.

How doctors diagnose the cause

The doctor will ask when and how the pain started, where it is, what makes it worse, and about fever, cough, breathlessness, recent travel, surgery, injury and clot risk factors. They will check your pulse, blood pressure, temperature, breathing rate and oxygen level, listen to your chest and heart, press on the chest wall and check your legs for swelling.

Tests may include:

  • Chest X-ray: pneumonia, collapsed lung, fluid or rib fractures
  • ECG: heart attack and pericarditis
  • Blood tests: D-dimer to help rule out a blood clot, troponin for heart damage, infection markers
  • CT pulmonary angiogram: the main test for pulmonary embolism
  • Ultrasound: of the chest for fluid, of the heart for pericardial effusion, or of the leg veins for a clot

Treatment

Treatment depends on the cause:

  • Chest wall pain and costochondritis: rest from aggravating activities, heat or ice, and acetaminophen (paracetamol) or an NSAID such as ibuprofen at the label dose (avoid NSAIDs with kidney disease, stomach ulcers or blood thinners)
  • Rib fractures: pain relief good enough to let you breathe deeply and cough, which prevents pneumonia. Take 10 deep breaths every hour while awake. Rib belts are no longer advised
  • Viral pleurisy: NSAIDs and rest
  • Pneumonia: antibiotics if bacterial, and sometimes hospital care
  • Pulmonary embolism: blood thinners, usually for at least 3 months
  • Pneumothorax: a small one may be watched. Larger ones need air removed with a needle or chest tube
  • Pericarditis: NSAIDs or aspirin with colchicine, under medical supervision

Frequently asked questions

Why does it hurt when I take a deep breath?

Deep breaths stretch the chest wall and the lining of the lungs. Pain usually comes from a strained muscle, a rib injury or costochondritis. It can also be pleurisy, pneumonia, a blood clot in the lung, a collapsed lung or pericarditis, especially if it comes with breathlessness or fever.

When is pain when breathing an emergency?

Call 911 if the pain is sudden and comes with shortness of breath, coughing up blood, fainting, a racing heart, blue lips, or if you have risk factors for a blood clot such as recent surgery or a swollen calf. Chest pressure spreading to the arm or jaw is also an emergency.

Can anxiety cause pain when breathing?

Anxiety and panic can cause chest tightness, fast breathing and sharp chest pains, often with tingling fingers. Because these overlap with serious conditions, new chest pain should be checked by a doctor first, especially if you have heart or clot risk factors.

How long does costochondritis last?

Costochondritis usually improves within a few weeks, though some people have pain for several months. It is harmless and responds to rest, heat and anti-inflammatory pain relief. See a doctor if the pain changes or comes with breathlessness or fever.

Sources

This guide was written from current patient and clinical guidance, including:

  • American Academy of Family Physicians: Pleuritic Chest Pain: Sorting Through the Differential Diagnosis
  • MedlinePlus: Breathing - painful
  • National Heart, Lung, and Blood Institute: Pulmonary Embolism
  • American Lung Association: Pneumothorax (Collapsed Lung)
  • NHS: Pleurisy
  • American Heart Association: Pericarditis