Is pneumonia contagious?

By Jenilee Matz, MPH Sep 27, 2022 • 6 min.


Pneumonia is a respiratory illness that affects millions of people each year.

It's an infection of one or both lungs that can be caused by bacteria, viruses or fungi. Specifically, the alveoli (air sacs in the lungs) fill with fluid or pus, causing mild to severe illness. Symptoms can include a cough with phlegm, fever, chills, chest pain and trouble breathing. Here you'll learn how pneumonia can spread and how you can lower your risk of becoming infected.

How does pneumonia spread?

The bacteria and viruses that cause pneumonia usually spread in tiny respiratory droplets when an infected person coughs or sneezes. If you are nearby, you can breathe in these droplets, or they can land in your nose or mouth. Germs can also spread when you touch a surface that is contaminated with the infectious droplets, and then you touch your eyes, nose or mouth. Most of the time, your immune system stops these germs from infecting you. But sometimes they can enter your body and make you sick.

Note that some germs that cause pneumonia are not contagious. For instance, pneumonia caused by fungi is not spread from person to person.

Who is at risk for pneumonia?

Anyone can get pneumonia, but certain factors increase your risk for developing the illness. These include:

  • Being younger than 2 years of age
  • Being 65 years and older
  • Smoking
  • Having lung disease, such as asthma, chronic obstructive pulmonary disorder (COPD) or cystic fibrosis
  • Having other certain health conditions or a weakened immune system due to diabetes, kidney disease, cancer treatment, human immunodeficiency virus (HIV) or acquired immunodeficiency syndrome (AIDS), an organ transplant or other factors

Is walking pneumonia contagious?

Yes, walking pneumonia is contagious and can spread between people, especially those who live together. "Walking pneumonia" is a nonmedical term for a mild case of pneumonia.

Is bacterial pneumonia contagious?

Yes, pneumonia caused by bacteria can be contagious.

Is pneumonia contagious after antibiotics?

If you have bacterial pneumonia, your healthcare provider will likely prescribe antibiotics to treat the infection. In many cases, you are no longer considered contagious once you've been taking antibiotics for 24–48 hours. However, this time period can vary based on the type of pneumonia you have, the antibiotic you're taking and other factors.

How long in pneumonia contagious?

How long you're contagious depends on the type of pneumonia you have and the treatment you receive. For example, people with walking pneumonia may be contagious for up to 10 days. If bacteria is causing your pneumonia and your healthcare provider prescribes antibiotics for you, you'll be contagious for a shorter amount of time than if you didn't receive treatment. In general, once your symptoms start to improve and fever goes away, the contagious period may be ending. Note that you may have a lingering cough for several weeks, but this does not necessarily mean you're still contagious. Your healthcare provider can let you know how long you'll be contagious.

How to reduce your risk of pneumonia

The following actions can help lower your chance of getting pneumonia and other respiratory infections:

  • Get vaccinated. There are several vaccines that help protect against infections caused by certain bacteria or viruses that may lead to pneumonia. For instance, the flu vaccine can help prevent pneumonia caused by the flu virus, and the pneumococcal vaccine can reduce your risk of getting pneumonia caused the bacterium Streptococcus pneumonia. Discuss your vaccine needs with your healthcare provider.
  • Wash your hands often. Wash your hands with soap and water before preparing and eating food and after using the bathroom, blowing your nose or coming into contact with someone who is sick.
  • Don't smoke. If you do, get help to quit. Smoking reduces your lung's ability to fight infections.
  • Don't share personal items. This includes not sharing utensils,  toothbrushes and towels with other people, especially those who are sick.
  • Have a healthy lifestyle. Eating a nutritious diet, exercising regularly and getting enough sleep can help keep your immune system strong so you don't get sick. If you become ill, having healthy habits may help you recover more quickly.

The bacteria and viruses that cause pneumonia can spread between people. If you have pneumonia, follow your treatment plan as directed by your healthcare provider, and try to avoid contact with others to help keep the infection from spreading. Most people respond quickly to treatment, but if you don't get better or your symptoms get worse, contact your healthcare provider. Your provider can also let you know how long you'll be contagious and when it's OK to go back to work or school.

Published November 2020.

Explore more

1 min.
Clinically reviewed by Jenilee Matz, MPH
Sep 27
8 min.
By Jean Cherry, MBA, BSN, RN
Sep 27
6 min.
By Jenilee Matz, MPH
Sep 27
4 min.
By Jenilee Matz, MPH
Sep 27