A variety of conditions, from pneumonia to lung cancer, can cause chest pain and cough. Some conditions may improve on their own, while others will need medical treatment.

If you have a cough, you might chalk it up to the common cold or throat irritation. But what if you develop chest pain with a cough? Should you be worried?

Chest pain and coughing can occur with conditions that affect the lungs, like acute bronchitis and pneumonia.

To help you narrow down the exact cause, check out the following list of 11 possible causes of chest pain and coughing.

Bronchitis is inflammation of the tubes that carry air to and from your lungs. It’s sometimes referred to as a chest cold.

Irritation of your bronchial tubes can cause repeated bouts of coughing, which can lead to chest soreness. Acute bronchitis is temporary, with symptoms generally lasting less than three weeks.

Pneumonia is an infection of the air sacs in your lungs. It can be bacterial, viral, or fungal. Pneumonia leads to increased pus and fluid in the lungs, which can trigger coughing. Persistent coughing, in turn, causes chest pain.

Other symptoms of pneumonia include:

The pleura is the tissue lining your lungs and chest cavity. There are three main types of pleural disorders:

  • pleurisy, which involves inflammation of the pleura
  • pleural effusion, which occurs when fluid builds up in the area between the two layers of pleura, known as the pleural space. One kind of pleural effusion, called empyema, occurs when pus is present in the pleural space
  • pneumothorax, which happens when air or gas is present in the pleural space

A cough that causes chest pain might be due to any of these conditions. Inflammation can cause sharp chest pain that worsens when you breathe, sneeze, or cough.

Inflammation and fluid buildup can also make it difficult to breathe, triggering a cough in some people.

Pericarditis occurs when the sac-like tissue covering your heart, called the pericardium, becomes inflamed. It’s usually caused by a virus, but can also be caused by a bacterial infection or another disease.

Chest pain is a main symptom, and pericarditis may be mistaken for a heart attack or pleurisy. Other symptoms can include:

  • cough
  • fever
  • fatigue
  • difficulty breathing

The flu is a contagious respiratory illness that can cause the following symptoms:

The infection can also trigger a persistent cough, which can lead to chest soreness or chest pain. Chest discomfort tends to improve once the cough lessens.

Chronic obstructive pulmonary disease (COPD) is an umbrella term to describe progressive, chronic lung diseases. It includes emphysema, chronic bronchitis, and refractory asthma. The main symptom of COPD is breathlessness.

Smoking and long-term exposure to poor air can cause this disease.

Inflammation in the lungs can increase mucus production, causing a chronic cough and chest tightness.

With asthma, inflammation causes narrowing of the airways. This narrowing can make it difficult to breathe, causing a chronic cough in some people.

Asthma can also cause excess mucus, which may contribute to a cough. Chest pain can follow a coughing bout, and difficulty breathing can feel like chest tightness.

Acid reflux is a digestive disease that occurs when stomach acid flows up into the esophagus. It can cause regurgitation and nausea, as well as coughing.

Heartburn is a classic symptom of acid reflux. It can feel like burning in the chest.

Pulmonary embolism is a blood clot that travels to the lungs. It can cause shortness of breath, chest pain, and a cough. A blood clot in your lungs can feel like a heart attack, and you may cough up bloody streaks of sputum.

Other symptoms include:

  • breathing quickly
  • pain when breathing deeply
  • raised heart rate
  • lightheadedness
  • sweating

If you have a history of smoking and develop a persistent cough with chest pain, see a doctor.

Early lung cancer may not cause symptoms. As the cancer grows, you may develop chest tightness or pain. Shortness of breath can lead to a chronic cough that produces blood.

It’s also possible to have noncancerous lung nodules, or abnormal growths in the lung. These may sometimes come into contact with your airway and cause you to cough.

Interstitial lung disease refers to several diseases that cause scarring, known as fibrosis, in the lungs. The scarring makes your lungs stiff, making it hard to breathe and causing a dry cough and chest pain.

The risk of developing interstitial lung disease may be increased by:

  • medical treatments like chemotherapy
  • genetics
  • exposure to materials like asbestos
  • smoking
  • diseases like rheumatoid arthritis

Damage to the lungs from this condition is usually irreversible.

There isn’t a single test to diagnose the underlying cause of a cough and chest pain.

At your appointment, your doctor may conduct a physical examination and ask about accompanying symptoms. Be honest about how you feel. From here, your doctor may order imaging tests of your chest to look for signs of infection, inflammation, or tumors.

Depending on your symptoms, your doctor may also have you undergo a few tests, including:

  • Imaging tests: These may include a chest X-ray, CT scan, or MRI.
  • Pulmonary function tests: These tests will measure your lung function and how well your lungs deliver oxygen to your blood.
  • Bronchoscopy: This test uses a scope to check your airways.
  • Ultrasound: This can look for fluid or air around your lungs.
  • Sputum test: This is to check your mucus for signs of an infection or lung cancer cells.
  • Complete blood count: This blood test checks for disorders including infections and autoimmune diseases.

Treatment for chest pain and coughing depend on the underlying condition.

  • Viral infection: There’s no cure for a viral infection like the flu or viral acute bronchitis. In this case, the virus has to run its course, although over-the-counter (OTC) cold and flu medications can help you feel better. These medications can relieve a fever, body aches, and other flu symptoms.
  • Bacterial infection: If you have a bacterial infection, like some types of pneumonia or bronchitis, you’ll need to take antibiotics. Even if you start to feel better after a few days, take the full course of a prescribed antibiotic to ensure full treatment of the infection.
  • Pleural disorders and pericarditis: Medications can treat infections while corticosteroids reduce inflammation. Pain relievers may also be used.
  • Chronic conditions: For chronic conditions like COPD or asthma, your doctor can recommend a therapy based on the severity of your symptoms. For example, a bronchodilator and other COPD medications can help reduce breathlessness. Or you may need to use a short-acting or long-acting inhaler for asthma.
  • Pulmonary embolism: Treatment for a pulmonary embolism will involve blood thinners and perhaps a procedure to remove a large blood clot.
  • Lung cancer: Lung cancer treatment includes surgery, chemotherapy drugs, or radiation to shrink a tumor.
  • Interstitial lung disease: Treatment depends on the type of disease, but may include oxygen therapy. Corticosteroids to reduce inflammation can also help.

Along with conventional therapy and rest, home remedies can help relieve symptoms. If a nagging cough causes chest pain, treating the cough may ease chest discomfort.

  • Drink warm fluids: Warm water or tea can soothe your throat and bronchial tubes, easing a persistent cough. Honey can also act as a cough suppressant, so it may help to add 1 or 2 teaspoons to your drink.
  • Use a humidifier: A humidifier reduces dryness in the air. The extra moisture can loosen or thin mucus in your throat.
  • Avoid smoke exposure: Exposure to smoke and other air pollutants can worsen a cough and increase chest pain. Try to avoid secondhand smoke, and if you currently smoke, talk to your doctor about a smoking cessation program to help you quit.
  • Suck on throat lozenges to soothe your throat: Throat irritation from a viral infection or chest infection can also cause a persistent cough, leading to chest pain.
  • Take OTC medication: A cough suppressant can help ease a cough. To avoid drug interactions, talk to your doctor first if you’re taking a prescription medication.

A cough and chest pain can be a minor annoyance, or they can progress into serious complications.

The flu and common cold can sometimes advance to pneumonia. If left untreated, pneumonia can cause sepsis and respiratory failure.

Severe COPD and an asthma attack can also be life-threatening if they cause respiratory failure. Similarly, untreated pulmonary embolism can lead to lung tissue damage. Pulmonary embolism causes around 100,000 deaths in the U.S. each year.

Untreated pleural disorders can result in serious health issues, including the collapse of a lung or sepsis.

Early detection and treatment is also crucial with lung cancer to prevent cancerous cells from spreading to other parts of the body.

A nagging cough might not be of concern. You may wonder, though, when chest pain is serious and when you should worry.

See a doctor if you have an unexplained cough that doesn’t improve for more than three weeks, or if it’s accompanied by chest pain or other symptoms like:

  • fever higher than 100.4°F (38°C)
  • bloody mucus with your cough
  • leg pain or swelling
  • shortness of breath
  • hoarseness
  • feeling weak
  • dizziness
  • fatigue

The Healthline FindCare tool can provide options in your area if you don’t already have a doctor.

A variety of conditions can trigger a cough with chest pain, so it can be difficult to pinpoint the underlying cause. Talk to your doctor, and be honest about your symptoms. The more information you provide, the easier it’ll be for your doctor to make a diagnosis.