You may know that certain respiratory illnesses like the cold or flu are contagious. But what about another respiratory infection: pneumonia? The answer is yes — in some cases.
Certain types of pneumonia, including bacterial and viral pneumonia, are contagious because the germs that cause them are contagious. Other types, like fungal or parasitic pneumonia, aren’t contagious.
Practicing prevention techniques can help keep you from getting pneumonia in the first place. And if you have pneumonia, it’s important to take precautions to avoid spreading it to others.
Learn more about what makes some types of pneumonia contagious and what you can do to protect yourself and others.
What Is Pneumonia?
Pneumonia is a lung infection that can affect one or both of your lungs. It occurs when infectious microbes like viruses, bacteria, or fungi get into your lungs.
When the infection happens, your lungs’ air sacs become inflamed and can fill up with fluid or pus. As a result, you can experience various respiratory symptoms.
Pneumonia symptoms
Common pneumonia symptoms include:
- Chest aches and pains when you breathe or cough.
- Chills and fever.
- Confusion.
- Cough that produces phlegm.
- Diarrhea.
- Fatigue.
- Headache.
- Muscle pain.
- Nausea and vomiting.
- Shortness of breath.
Symptoms can be mild or severe. In serious cases, pneumonia can be deadly. People at greater risk include children under age 5, adults over age 65, and people with compromised immune symptoms.
The incubation period is the time from when you pick up the infection to when you display symptoms. How long the incubation period lasts depends on factors like the type of pneumonia, your overall health, and your age.
You may think that you have a cold or the flu when symptoms begin because they are similar. However, pneumonia symptoms last longer and become more severe with time instead of less.
Never Miss a Beat!
Subscribe to Our HealthBeat Newsletter!
Thank you for subscribing!
You can now select the specific newsletters you'd like to receive.
You are already subscribed.
Subscribe to more newsletters in our email preference center.
Sorry, an error occurred. Please try again later.
Get Healthy Tips Sent to Your Phone!
What Are the Types of Pneumonia?
There are four general types of pneumonia, classified by what causes it:
- Bacterial pneumonia — Pneumonia caused by bacteria.
- Fungal pneumonia — Pneumonia caused by fungi.
- Parasitic pneumonia — Pneumonia caused by parasites.
- Viral pneumonia — Pneumonia caused by viruses.
Pneumonia can also be classified by where the infection occurred, such as in the community, in a health care setting, or from a ventilator.
What Types of Pneumonia Are Contagious?
Pneumonia caused by bacteria or viruses can be contagious.
Bacterial pneumonia is the most common type of pneumonia. Many different types of bacteria can cause pneumonia. The most common is streptococcus pneumoniae (or pneumococcus), which causes pneumococcal pneumonia. Another common type is mycoplasma pneumoniae, which causes a usually milder type of pneumonia called “walking pneumonia.”
Viruses are another common cause of pneumonia. Just as with bacteria, many different viruses can cause pneumonia. They include COVID-19, influenza, rhinovirus (the common cold), and respiratory syncytial virus (RSV).
Pneumonia caused by fungi or parasites isn’t contagious.
Also, while some forms of pneumonia are contagious, the disease isn’t as easy to spread as colds or the flu.
How Does Pneumonia Spread?
People can spread the germs that cause pneumonia when they cough, sneeze, or talk. These actions release infected respiratory droplets into the air that nearby people can breathe in.
The droplets containing the virus or bacteria can also land on a shared surface like a table, telephone, or computer. If a person later touches that surface and then their nose or mouth, they can become infected. This is a less common way for pneumonia to spread.
Not every person who’s exposed to pneumonia from an infected person will get pneumonia themselves.
How Long Is Pneumonia Contagious?
The amount of time you can spread pneumonia to others depends on factors like the type of pneumonia and your treatment. For some types of pneumonia, you may be contagious for days or even weeks before showing symptoms.
In general, according to the American Lung Association:
- People with bacterial pneumonia are contagious for about 48 hours after they start antibiotics and their fever goes away.
- The contagious period for viral pneumonia starts to subside when symptoms — particularly fever — go away.
However, these are general timelines. Some types of pneumonia can remain contagious for longer. Also, people who had pneumonia may continue to cough occasionally for several weeks — even after they’re no longer contagious.
How Can I Prevent Pneumonia?
There are several different ways you can lower your risk of getting pneumonia, including:
- Avoiding people who are sick — Staying out of close contact with someone with a respiratory illness can lower your risk of becoming infected. Also, if you have pneumonia, you should avoid close contact with others to avoid spreading it.
- Getting vaccinated — Many different vaccines can protect you from various pneumonia-causing germs. Just a few examples include the pneumococcal vaccine, the flu vaccine, and the COVID-19 vaccine.
- Practicing healthy habits — Washing your hands frequently, cleaning frequently touched surfaces, and avoiding smoking are among the lifestyle habits that can lower your risk of pneumonia.
When to Seek Medical Care for Pneumonia
Because pneumonia can be severe in some cases, it’s important to seek care as soon as possible.
If you have a cough and fever after experiencing flu-like symptoms, visit your primary care provider (PCP) or UPMC Urgent Care. This is especially important if your cough produces sputum (phlegm) that’s brown, green, or yellow.
If you have shortness of breath, high fever, confusion, or pain after a pneumonia diagnosis, call 911 or visit the nearest emergency department right away. You should also seek immediate treatment if you have a compromised immune system or a chronic health condition like diabetes or HIV.
Sources
About UPMC
Headquartered in Pittsburgh, UPMC is a world-renowned health care provider and insurer. We operate 40 hospitals and 800 doctors’ offices and outpatient centers, with locations throughout Pennsylvania, Maryland, New York, West Virginia, and internationally. We employ 4,900 physicians, and we are leaders in clinical care, groundbreaking research, and treatment breakthroughs. U.S. News & World Report consistently ranks UPMC Presbyterian Shadyside as one of the nation’s best hospitals in many specialties.

