What Causes Pneumonia?

Pneumonia can be caused by a wide variety of bacteria, viruses and fungi in the air we breathe. Identifying the cause of your pneumonia can be an important step in getting the proper treatment.

Pneumonia is typically classified by where you got it and what germ (bacteria, virus, or fungi) caused it.

Where Can You Get Pneumonia?

When you develop pneumonia from being around other people. Perhaps your child got "walking pneumonia" from being in school or you got pneumococcal pneumonia shopping during the holidays from people coughing. 

When you develop pneumonia during or after being in a healthcare setting. This can include a hospital or long-term care facility, for example, for an illness or procedure. This type of pneumonia can be serious and may be more resistant to antibiotics. 

When you get pneumonia after being on a ventilator. A ventilator is a device or machine that helps people breathe. Because you are in a healthcare setting, you can get healthcare-acquired pneumonia.

Common Pneumonia Causes

Bacteria

Bacterial pneumonia can occur on its own or develop after you've had a virus like the cold, flu, COVID-19 or RSV. Bacterial pneumonia often affects just one part, or lobe, of a lung. When this happens, the condition is called lobar pneumonia. Those at greatest risk for bacterial pneumonia include people recovering from surgery, people with chronic respiratory disease or viral infection, children younger than 5, older adults and people who have weakened immune systems.

The most common type of bacterial pneumonia is called pneumococcal pneumonia. Pneumococcal pneumonia is caused by the Streptococcus pneumoniae germ that normally lives in the upper respiratory tract.

Streptococcus pneumoniae bacteria cells Streptococcus pneumoniae

Haemophilus influenzae (a bacteria that causes many serious infections, the Hib vaccine helps prevent these), pertussis and psittacosis (a bacteria that infects pet birds and poultry) are additional bacterial infections that can cause pneumonia; however, they cause fewer cases of pneumonia. 

Some types of bacteria cause what is known as "atypical" pneumonia, including:

  • Mycoplasma pneumoniae, a tiny bacterium that most often causes infections in children ages 5-17 and young adults, especially those living and working in crowded conditions. The illness is often mild enough to go undetected and is sometimes referred to as walking pneumonia.
  • Chlamydia pneumoniae, which commonly causes upper respiratory infections year-round, but can also result in a mild form of pneumonia.
  • Legionella pneumophila, which causes a dangerous form of pneumonia called Legionnaire's disease. Unlike other bacterial pneumonias, Legionella is not passed from person to person. Outbreaks of the disease have been linked to exposure to contaminated water from cooling towers, whirlpool spas, and outdoor fountains.

These bacteria are referred to as "atypical" because pneumonia caused by these organisms might have slightly different symptoms, appear different on a chest X-ray, or respond to different antibiotics than the typical bacteria that cause pneumonia. Even though these infections are called "atypical," they are not uncommon.

Mycoplasma pneumoniae can cause walking pneumonia

People who have pneumonia caused by M. pneumoniae often have milder illness than you would think for someone with a lung infection. They started calling this type of infection "walking pneumonia" because people did not stay home and in bed due to the mild symptoms.
Read more about walking pneumonia

Viruses

Infection from respiratory viruses like the influenza (flu) virus, SARS-CoV-2, the virus that causes COVID-19, respiratory syncytial virus (RSV), and human metapneumovirus (HMPV) can cause pneumonia. Additional viruses like the virus that causes chickenpox, and measles can also cause pneumonia. 

RSV is a common cause of viral pneumonia in young children and influenza is a common cause of viral pneumonia across all ages. Read about the connection between the flu and pneumonia. 

COVID cells COVID-19

Most viral pneumonias are not serious and last a shorter time than bacterial pneumonia. If you have viral pneumonia, you are also at risk of getting bacterial pneumonia.

Did you know?

As many as 5% of children (1 out of every 20) with measles gets pneumonia and that pneumonia is the most common cause of death from measles in young children. MMR vaccination is the best protection against measles and pneumonia caused by measles.

Fungi

Fungal infections are a much less common cause of pneumonia when compared to bacteria and viruses. Fungal pneumonia is most common in people with chronic (long-term) health conditions or weakened immune systems, and in people who are exposed to large doses of certain fungi from contaminated soil or bird droppings.

Pneumocystis pneumoniais (PCP) a rare, serious fungal lung infection caused by Pneumocystis jirovecii. It occurs in people who have a weakened immune system due to a medical condition like, HIV/AIDS, or from medications that suppress their immune systems, such as those used to treat cancer or manage organ transplants.

Gloved hand digging in dirt with gardening tools. Fungi occur in the soil

The following are fungi that occur in the soil in some parts of the United States and can cause some people to get pneumonia.

  • Coccidioides. This fungus is found in Southern California and the desert Southwest. It is the cause of Coccidioidomycosisalso called valley fever.
  • Histoplasma. This fungus is found in the Ohio and Mississippi River Valleys and causes histoplasmosis.
  • Cryptococcus. This fungus is found throughout the United States in bird droppings and soil contaminated with bird droppings.
  • Blastomyces. This fungus is found in the midwestern, south-central and southeastern United States and causes blastomycosis.

Is Pneumonia Contagious? 

Pneumonia (the lung infection) itself is not contagious, but the bacteria and viruses that cause pneumonia can spread from person to person. Learn more about how pneumonia spreads

Pneumococcal pneumonia can disrupt your life for weeks

Pneumococcal vaccination is recommended for all adults 50+ and adults 19-49 with certain chronic medical conditions like asthma, COPD, diabetes and heart disease. In partnership with Pfizer.
Learn more

Page last updated: May 5, 2025

Freedom From Smoking Clinic - Vancouver, WA
Vancouver, WA | Jan 01, 2025
Freedom From Smoking Clinic - Geneva, OH
Geneva, OH | Apr 03, 2025