Walgreens The Thread

Is pneumonia contagious?

By Jenilee Matz, MPH Mar 25, 2025 • 6 min.


Pneumonia is a respiratory illness that affects millions of people each year in the United States. It’s an infection caused by bacteria, viruses or fungi. It affects one or both lungs. Pneumonia causes the alveoli (air sacs in the lungs) to fill with fluid or pus, leading to mild to severe illness. Symptoms can include a cough with phlegm, fever, chills, pain in your chest when coughing or taking a deep breath, or trouble breathing.

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:

  • Age: Children age 5 and younger and adults age 65 and older are at a higher risk for pneumonia.
  • Smoking.
  • Lung disease, such as asthma, chronic obstructive pulmonary disease (COPD) or cystic fibrosis.
  • 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.

There are also other health conditions that can increase your risk of developing pneumonia.

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 may 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 and the antibiotic you’re taking, as well as 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. If bacteria caused your pneumonia and your healthcare provider prescribed 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 your 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 pneumoniae. 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. Avoid sharing personal items, such as utensils, toothbrushes and towels, with other people, especially those who are sick.

Maintain a healthy lifestyle. Adopting 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 prevent 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. They can also let you know how long you’ll be contagious and when it’s OK to go back to work or school.

Updated March 2025.

Explore more

5 min
By Sanjay “Jay” Patel, DO, Allergy & Immunology
Aug 30
6 min
By Jenilee Matz, MPH
May 02