What Causes Pneumonia and Who Is at Risk?

Table of Contents
View All
Table of Contents

Pneumonia is a lung infection that can be caused by a number of different organisms, including bacteria, viruses, and fungi. It happens when your immune system isn't able to prevent these organisms from multiplying in your lungs. Pneumonia can also occur when you aspirate (inhale) a foreign object.

Pneumonia affects millions of people every year, particularly children under age 5 and adults over age 65, as well as people who are hospitalized or who have chronic illnesses or immunosuppression. Symptoms can range from mild to severe and include a productive cough, fever, chills, and difficulty breathing.

pneumonia causes
© Verywell, 2018 

Bacteria

Bacterial pneumonia is the most common type of pneumonia. It often only affects one area of your lung. Bacterial pneumonia is usually treated with antibiotics.

Bacterial pneumonia sometimes occurs after you've had some other type of infection that weakens your immune system, like a cold or the flu, but the condition can also occur on its own without a preceding infection.

Pneumococcal pneumonia is the most common type of bacterial pneumonia. It is caused by the Streptococcus pneumoniae bacteria. In the United States, around 900,000 people a year are infected with this bacterium.

Atypical Bacteria

Atypical bacteria are bacteria that are unable to be cultured with standard methods. Atypical bacteria that cause pneumonia include:

  • ​​​Mycoplasma pneumoniae: This bacterium causes a type of pneumonia referred to as "walking pneumonia." It typically has mild symptoms and responds to antibiotics. Because it's contagious, living or working in crowded places like dormitories, schools, or prisons increases your risk of picking up this type of pneumonia.
  • Chlamydia pneumoniae: This bacterium typically causes an infection with mild symptoms. People over the age of 65 are at increased risk for developing severe pneumonia if infected with this bacteria.
  • Legionella pneumophila: Pneumonia related to this type of bacteria is also known as Legionnaire's disease. It is typically transmitted by inhaling aerosols that contain it, and outbreaks have been connected with exposure to whirlpool spas, showers, fountains, and cooling towers.

What types of pneumonia are contagious?

Bacterial pneumonia is contagious, with infections caused by Mycoplasma pneumoniae (walking pneumonia) and Mycobacterium tuberculosis being among the most highly contagious. Viral pneumonia is also contagious. Fungal and aspiration pneumonia are not transmitted from person to person.

Viruses

Viral pneumonia, by definition, is caused by a virus and is the most common cause of pneumonia in children under age 5. It's usually not as serious as bacterial pneumonia, though it puts you at a higher risk of developing it.

Most people with viral pneumonia recover within one to three weeks without treatment, though some cases become severe and require hospitalization.

Examples of viruses that can cause viral pneumonia include:

  • Influenza viruses: Influenza A, B, and avian flu viruses can cause pneumonia, particularly in adults. 
  • Respiratory syncytial virus (RSV): RSV is the most common cause of viral pneumonia in infants under a year old. It can also cause pneumonia in any age group and can be especially severe in adults over 65 and in people whose immune systems are compromised.
  • Human parainfluenza viruses: These viruses cause respiratory infections, including pneumonia, in people of all ages, especially in young children, the elderly, and people with suppressed immune systems.
  • Adenovirus: This type of virus can cause anything from a cold to a sore throat, bronchitis to pneumonia.
  • Rhinovirus: This is the virus that causes the common cold, which can lead to pneumonia.
  • Human metapneumovirus (HMPV): This is yet another respiratory virus that can cause pneumonia, particularly in young children and older adults.

When the COVID-19 virus causes pneumonia, it typically involves both lungs. Usually, people recover from other types of pneumonia without lasting lung problems. However, COVID-19-related pneumonia often leaves long-term scarring and stiffness that leads to lingering interstitial lung disease in which it’s difficult to get enough air into your body.

Fungi

Fungal pneumonia is caused when spores enter your lungs and multiply. It commonly occurs in people with compromised immune systems or chronic health problems. However, it can occur in otherwise healthy adults too.

Fungal infections that are picked up from the soil in certain areas of the United States can lead to fungal pneumonia, including:

  • Pneumocystis pneumonia: This infection, caused by the Pneumocystis jirovecii fungus, often causes serious pneumonia and usually occurs in people whose immune systems are suppressed, such as those with human immunodeficiency virus (HIV) or acquired immunodeficiency syndrome (AIDS), people who are undergoing cancer treatments, and those who have had organ transplants.
  • Coccidioidomycosis: Also known as "valley fever," the fungus that causes this infection, Coccidioides, is found in southern Arizona, central California, southwestern New Mexico, and west Texas.
  • Histoplasmosis: The Histoplasma capsulatum fungus is found in the Ohio and Mississippi River valleys and is spread through soil that's contaminated by bird and bat droppings. Extensive exposure to highly contaminated areas causes people to develop pneumonia.
  • Cryptococcus: The Cryptococcus fungus is found in soil all over the world, but pneumonia typically only occurs in people with compromised immune systems.

How long is pneumonia contagious?

If you have bacterial pneumonia, you may continue to be contagious for around 48 hours after you start antibiotics. With viral pneumonia, you are contagious until your symptoms start to resolve.

Aspiration

Aspiration happens when a foreign object, such as a piece of food, gum, liquid, or vomit, is inhaled. If you are unable to cough it up, the object then becomes lodged in the lung. As the object begins to decompose, bacteria proliferate, leading to an infection. 

Some people may have an ongoing condition where they accidentally swallow food into their lungs instead of into their esophagus, the tube that moves food to the stomach. This problem is more common in the elderly, who are more likely to have problems with swallowing. 

The risk of pneumonia due to aspiration while under anesthesia is the reason why patients are asked not to eat or drink prior to surgery.

Risk Factors

Pneumonia can affect anyone at any age, but the two age groups at the highest risk are children under age 2 and adults over age 65. Other risk factors include:

  • Being in the hospital: Because your immune system is already weakened, your risk of developing pneumonia is higher if you're hospitalized in the ICU. Your risk is even higher if you're on a ventilator to help you breathe.
  • Having a chronic disease: If you have COPD, asthma, heart disease, bronchiectasis, cystic fibrosis, diabetes, celiac disease, or sickle cell disease, your risk of contracting pneumonia is higher than that of the general population.
  • Having a suppressed immune system: If you have HIV or AIDS, have had an organ or bone marrow transplant, are receiving chemotherapy or long-term steroids, or have an autoimmune disorder, you're at higher risk for pneumonia.
  • Difficulty swallowing: If you have a hard time swallowing due to a condition like Parkinson's disease or because of a stroke, you're at a higher risk of aspirating food, drink, saliva, or vomit and, thus, developing aspiration pneumonia.
  • Reduced consciousness: Whether you're sedated, prone to generalized seizures, or have had anesthesia, these episodes of reduced consciousness can contribute to aspiration pneumonia.
  • Difficulty coughing: Not being able to cough properly or often enough can lead to pneumonia.

How long does it take to recover from pneumonia?

Recovery time for pneumonia varies from person to person and can depend on factors like what type of pneumonia you have and what your general health is. Some people start to feel better within a week, but others may take a month or longer to recover.

Lifestyle Risk Factors

Risk factors that may have to do with your lifestyle choices increase your likelihood of developing pneumonia and include:

  • Smoking: If you smoke, your risk of contracting pneumonia is higher than that of the general population because smoking compromises your immune system's ability to defend itself from the organisms that make you sick.
  • Drug or excessive alcohol use: Drinking too much alcohol or using drugs is another risk factor for pneumonia because you may aspirate food, drink, or vomit into your lungs while you're under the influence.
  • Malnutrition: Being undernourished contributes to a higher risk of developing pneumonia and of it being more severe, especially in young children and older adults. It's estimated that malnutrition is the underlying cause of death in 45% of children under the age of 5 worldwide.
  • Poor dental health: Poor oral hygiene can contribute to pneumonia, especially if you have dentures.
  • Exposure to animals, chemicals, or environmental toxins: Being around animals can expose you to infected droppings that get in the soil. Certain chemicals and pollutants may also increase your risk of pneumonia.

It's important to be aware that your risk of pneumonia increases with each additional health or lifestyle risk factor you have.

What is the survival rate for pneumonia?

Most people who get pneumonia recover without serious complications. People who are admitted to the hospital with pneumonia, however, have a higher mortality rate. One study found that around 35% of those hospitalized with pneumonia will die in the hospital or within one year of discharge.

Summary

Pneumonia can be caused by exposure to certain microbes, including bacteria, fungi, and viruses. You can also develop pneumonia if you inhale something into your lungs that you can't cough back up.

Risk factors for pneumonia include age under 2 or over 65. It is also possible to get pneumonia while you are in the hospital. People with chronic diseases, a suppressed immune system, and difficulty swallowing are also at risk. Certain lifestyle choices like smoking and alcohol use can also put you at greater risk.

21 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Cilloniz C, Martin-loeches I, Garcia-vidal C, San jose A, Torres A. Microbial etiology of pneumonia: Epidemiology, diagnosis and resistance patterns. Int J Mol Sci. 2016;17(12) doi:10.3390/ijms17122120

  2. American Lung Association. What causes pneumonia?

  3. Bajantri B, Venkatram S, Diaz-fuentes G. A potentially severe infection. J Clin Med Res. 2018;10(7):535-544. doi:10.14740/jocmr3421w

  4. Centers for Disease Control and Prevention. Chlamydia pneumoniae infection: Causes and how it spreads.

  5. Leoni E, Catalani F, Marini S, Dallolio L. Legionellosis associated with recreational waters: A systematic review of cases and outbreaks in swimming pools, spa pools, and similar environments. Int J Environ Res Public Health. 2018;15(8). doi:10.3390/ijerph15081612

  6. Debnath SK, Debnath M, Srivastava R. Opportunistic etiological agents causing lung infections: Emerging need to transform lung-targeted delivery. Heliyon. 2022;8(12):e12620. doi:10.1016/j.heliyon.2022.e12620

  7. Pratt MTG, Abdalla T, Richmond PC, et al. Prevalence of respiratory viruses in community-acquired pneumonia in children: A systematic review and meta-analysis. Lancet Child Adolesc Health. 2022;6(8):555-570. doi:10.1016/S2352-4642(22)00092-X

  8. Centers for Disease Control and Prevention. Respiratory syncytial virus infection.

  9. Myall KJ, Mukherjee B, Castanheira AM, et al. Persistent post–covid-19 interstitial lung disease. An observational study of corticosteroid treatment. Annals ATS. 2021;18(5):799-806. doi:10.1513/annalsats.202008-1002oc

  10. Centers for Disease Control and Prevention. Pneumocystis pneumonia | Fungal diseases.

  11. iaz JH. Environmental and wilderness-related risk factors for histoplasmosis: More than bats in caves. Wilderness Environ Med. 2018;29(4):531-540. doi:10.1016/j.wem.2018.06.008.

  12. Longo DL. Aspiration pneumonia. N Engl J Med. 2019;380:651-3. doi:10.1056/NEJMra1714562

  13. Oh H, Heo ST, Kim M, Kim YR, Yoo JR. Antimicrobial susceptibility trends of Streptococcus pneumoniae by age groups over recent 10 years in a single hospital in South Korea. Yonsei Med J. 2021;62(4):306-314. doi:10.3349/ymj.2021.62.4.306

  14. Othman AA, Abdelazim MS. Ventilator-associated pneumonia in adult intensive care unit prevalence and complications. Egypt J Crit Care Med. 2017;5(2):61-63. doi:10.1016/j.ejccm.2017.06.001

  15. National Heart Lung and Blood Institute. Pneumonia.

  16. Manabe T, Teramoto S, Tamiya N, Okochi J, Hizawa N. Risk factors for aspiration pneumonia in older adults. PLoS ONE. 2015;10(10):e0140060. doi:10.1371/journal.pone.0140060

  17. American Lung Association. Pneumonia treatment and recovery.

  18. Baskaran V, Murray RL, Hunter A, Lim WS, McKeever TM. Effect of tobacco smoking on the risk of developing community acquired pneumonia: A systematic review and meta-analysis. PLoS One. 2019;14(7):e0220204. doi:10.1371/journal.pone.0220204

  19. World Health Organization. Children: Reducing mortality.

  20. Smithard DG, Yoshimatsu Y. Pneumonia, aspiration pneumonia, or frailty-associated pneumonia? Geriatrics (Basel). 2022;7(5):115. doi:10.3390/geriatrics7050115

  21. Peters ZJ, Ashman JJ, Schwartzman A, DeFrances CJ. National hospital care survey demonstration projects: Examination of inpatient hospitalization and risk of mortality among patients diagnosed with pneumonia. Natl Health Stat Report. 2022;(167):1-9.

Additional Reading

By Kristina Herndon, RN
Kristina Herndon, BSN, RN, CPN, has been working in healthcare since 2002. She specializes in pediatrics and disease and infection prevention.