Lung Cancer and Pneumonia: What to Know

Medically Reviewed by Carol DerSarkissian, MD on July 28, 2022

If you or a loved one has lung cancer, you should know that this raises your risk of getting pneumonia. It’s estimated that over half of people with lung cancer develop lung infections, including pneumonia. This is partly because their immune systems are weakened by their cancer. This also means that if you do get pneumonia with lung cancer, it will be harder to fight the infection.

What Causes Lung Cancer and Pneumonia?

Cigarette smoking is the top cause of lung cancer. It can also be caused by cigar or pipe smoking, or by inhaling toxic chemicals like radon or asbestos. You’re more at risk if you have a family history of lung cancer.

Pneumonia is an infection in your lungs caused by a virus, bacteria, or fungus. One common cause is the flu virus.

How Lung Cancer and Pneumonia Are Similar

Symptoms of lung cancer and pneumonia can look the same:

  • Coughing (sometimes with blood)
  • Wheezing
  • Chest pain
  • Shortness of breath
  • Tiredness or fatigue
  • Phlegm, or mucus
  • Swollen lymph nodes in your chest
  • Nausea or vomiting (less common with lung cancer)

How Lung Cancer and Pneumonia Are Different

Some symptoms of lung cancer are generally not symptoms of pneumonia:

  • Unexplained weight loss
  • Bone pain, if the cancer has spread
  • Nervous system changes like unexplained muscle weakness or dizziness, if the cancer has spread to the brain or is causing problems with your immune system
  • Yellowing eyes or skin, if the cancer has spread to the liver
  • High levels of calcium in the blood, which can make you thirsty, have to pee a lot, or constipated
  • Low levels of sodium or potassium in your blood

And there are some symptoms of pneumonia that are not generally caused by lung cancer:

  • Fever
  • Chills
  • Shaking
  • Heavy sweating
  • Lots of phlegm, often thick and yellow or green
  • Confusion (though this can also happen in later stages of lung cancer)
  • Headache (though this can also happen with lung cancer with excessive coughing or if it has spread to the brain)

See a doctor if your pneumonia is making it hard for you to breathe, if you have chest pain, a fever over 102 F, or a cough that won’t go away, especially if it contains pus. This is especially important for people with lung cancer, who are at greater risk for severe disease.

How Are Pneumonia and Lung Cancer Diagnosed?

Your doctor can sometimes tell that you have pneumonia based on your recent history and a physical exam. They may confirm your diagnosis using a chest X-ray, CT scan, or tests of your blood, mucus you cough up, or lung tissue. Samples will be sent to a lab to figure out whether you have an infection and what is causing it.

These same tests are also used to diagnose lung cancer. But rather than use lab tests to find the germ responsible, they will look for cancerous cells. If they do find them, your doctor will then figure out how advanced your cancer is. They will do other scans to see whether it has spread. These include MRI, PET, and bone scans.

How Is Pneumonia Treated?

For all types of pneumonia you can suck on cough drops or take cough medicine to ease discomfort and help you rest. But you should use the lowest dose because coughing is your body’s way of getting rid of the fluid in your lungs. You can also take pain relievers and fever reducers like acetaminophen, aspirin, or ibuprofen.

If your infection is caused by a fungus, you’ll take antifungal medications. If it’s caused by a bacteria – streptococcus, or pneumococcal pneumonia, is the most common – you’ll take antibiotics. With cancer, it’s important to follow your doctor’s instructions exactly for taking antibiotics. If you don’t, you’re at higher risk for an infection coming back. You could also get other infections besides your pneumonia. This includes infections that are resistant to antibiotics (meaning certain drugs won’t work to kill the bacteria). That can be very dangerous.

If your pneumonia is viral, some cases can be treated with antiviral medications. This includes drugs to help fight the influenza virus that has caused your pneumonia, like:

  • Oseltamivir (Tamiflu) 
  • Peramivir (Rapivab)
  • Zanamivir (Relenza)

But most viruses do not have a specific antiviral treatment. So your doctor may tell you to simply rest and manage your symptoms at home. That’s why it’s so important that with a weakened immune system, you get your vaccines and take precautions to prevent getting sick.

How Can You Prevent Pneumonia?

If you have lung cancer, it’s especially important to take steps to prevent pneumonia:

  • Get vaccinated. This includes regular COVID-19 and flu shots, as well as the pneumococcal vaccine to prevent bacterial pneumonia.
  • Avoid large crowds when you can, especially in confined spaces, and wear a mask regularly.
  • Practice good hygiene. Wash your hands often with soap and water. If a sink isn’t available, you should carry hand sanitizer with at least 60% alcohol.
  • Don’t smoke. Not only does smoking increase your risk of lung cancer, but it damages your lungs and makes them more prone to infection. You should also avoid exposure to things that will irritate your lungs, like wildfire smoke and other air pollution, plus aerosol sprays like deodorant, perfume, or cleaning products.
  • Keep your immune system as healthy as possible. This means you should exercise, get enough sleep, and eat a healthy diet.

Show Sources


Advances in Chronic Kidney Disease: “Electrolyte Disorders Associated With Cancer.”

American Cancer Society: “Lung Cancer Signs & Symptoms.”

American Lung Association: “Pneumonia Treatment and Recovery.”

American Society of Clinical Oncology: “Cough.”

CA: A Cancer Journal for Clinicians: “Antibiotic Resistance in the Patient with Cancer: Escalating Challenges and Paths Forward.”

Cancer Research UK: “Lung Cancer Symptoms,” “The Cancer Itself.”

Centers for Disease Control and Prevention: “Basic Information About Lung Cancer,” “Causes of Pneumonia,” “What Are the Symptoms of Lung Cancer?”

Cleveland Clinic: “Pneumonia,” “Wheezing.”

European Review for Medical and Pharmacological Sciences: “Infectious Complications in Patients with Lung Cancer.”

Experimental and Therapeutic Medicine: “Adult Community-Acquired Pneumonia with Unusually Enlarged Mediastinal Lymph Nodes: A Case Report.”

Johns Hopkins Medicine: “Pneumonia.”

Journal of Palliative Medicine: “What is Special About Patients with Lung Cancer and Pulmonary Metastases in Palliative Care? Results from a Nationwide Survey.”

Mayo Clinic: “Coughing Up Blood,” “Lung Cancer,” “Pneumonia.”

MedlinePlus: “Pneumonia,” “Zanamivir,”  “Peramivir.”

Merck Manual: “Syndrome of Inappropriate ADH Secretion (SIADH).”

© 2022 WebMD, LLC. All rights reserved. View privacy policy and trust info