Main Causes of Pneumonia: Bacteria, Viruses & More

The main cause of pneumonia depends on the type, but bacteria are the most recognized culprit, with one species in particular standing out. Streptococcus pneumoniae (often called pneumococcus) accounts for 10% to 30% of community-acquired pneumonia in adults, making it the single most commonly identified bacterial cause. That said, viruses actually outnumber bacteria as a group. A large U.S. study of over 2,200 adults hospitalized with pneumonia found that viruses were detected in 23% of cases, bacteria in 11%, and both together in 3%.

Pneumonia isn’t one disease with one cause. It’s a lung infection that can be triggered by bacteria, viruses, fungi, or even inhaled substances. Understanding which type you’re dealing with matters because the treatment, severity, and recovery timeline all differ.

How Pneumonia Damages the Lungs

Regardless of what causes it, pneumonia follows a similar pattern inside your lungs. Your lungs contain millions of tiny air sacs called alveoli, where oxygen passes into your bloodstream and carbon dioxide passes out. When a pathogen infects the lung tissue, your immune system launches an inflammatory response that fills those air sacs with fluid, pus, and cellular debris. In a healthy person, the alveoli fill with air during each breath. In someone with pneumonia, they’re already partially or fully occupied by that inflammatory fluid, which is why breathing becomes difficult and oxygen levels can drop.

Bacterial Pneumonia

Pneumococcus is the textbook cause of bacterial pneumonia, and for good reason. This bacterium commonly lives in the upper respiratory tract of healthy people. Between 5% and 90% of the population carries it in their nose and throat at any given time without getting sick. It spreads through respiratory droplets or can migrate deeper into the lungs of someone already carrying it, particularly when the immune system is compromised by another illness, fatigue, or age. A protective outer coating on the bacterium helps it evade the immune system, which is part of what makes it so effective at causing disease.

Other bacteria that frequently cause pneumonia include Haemophilus influenzae, Mycoplasma pneumoniae (which causes the milder “walking pneumonia” common in younger adults), and Legionella, which is associated with contaminated water systems. Bacterial pneumonia tends to hit harder than viral pneumonia, with higher fevers, thicker mucus production, and a more abrupt onset.

Viral Pneumonia

Viruses are collectively the most frequently detected cause of pneumonia, even though no single virus dominates the way pneumococcus does among bacteria. In adults, influenza and SARS-CoV-2 (the virus behind COVID-19) are the two most common viral causes. In young children, respiratory syncytial virus (RSV) takes that spot.

The full list of viruses that can cause pneumonia is long: rhinovirus (the common cold virus), influenza A and B, human metapneumovirus, RSV, parainfluenza virus, various coronaviruses, and adenovirus. Viral pneumonia often starts with upper respiratory symptoms like a runny nose, sore throat, or body aches before settling into the lungs. It can range from mild to life-threatening, and it sometimes opens the door for a secondary bacterial infection that compounds the damage.

Fungal Pneumonia

Fungal pneumonia is rare in healthy people. The most well-known form is Pneumocystis pneumonia, or PCP, caused by the fungus Pneumocystis jirovecii. About 30% to 40% of people who develop PCP have HIV/AIDS, and most of the rest are on medications that suppress the immune system, such as corticosteroids or drugs used after organ transplants. People with chronic lung diseases, cancer, lupus, or rheumatoid arthritis also face higher risk. If you have a healthy immune system, fungal pneumonia is extremely unlikely to be your diagnosis.

Aspiration Pneumonia

Not all pneumonia starts with a germ. Aspiration pneumonia happens when you inhale food, liquid, vomit, or other substances into your lungs. The most common trigger is stomach acid, which causes a chemical burn to the airways and lung tissue, leading to rapid inflammation and swelling. This can resolve on its own within days, or it can escalate into a severe condition affecting breathing.

People most vulnerable to aspiration pneumonia include those with swallowing difficulties (from stroke, neurological conditions, or aging), heavy alcohol use, or reduced consciousness. Inhaled substances beyond stomach acid can also cause it, including mineral oil, petroleum jelly, and certain other oily liquids. Once the lungs are damaged by aspiration, bacteria from the mouth and throat can move in and cause a secondary infection on top of the chemical injury.

Hospital-Acquired vs. Community-Acquired

Where you catch pneumonia changes what’s likely causing it. Community-acquired pneumonia, the kind you develop in daily life, is most often caused by pneumococcus, common respiratory viruses, or atypical bacteria like Mycoplasma. Hospital-acquired pneumonia involves a different and often more dangerous set of pathogens. Patients who develop pneumonia more than 72 hours into a hospital stay are at risk for infections from drug-resistant organisms like Pseudomonas and certain resistant staph bacteria that are uncommon outside healthcare settings.

Pneumonia that develops within the first 72 hours of hospitalization, by contrast, is more likely caused by the same common pathogens you’d encounter at home. The distinction matters because hospital-acquired infections can be harder to treat and often require broader, more aggressive therapy.

Why Children and Adults Get Different Types

The cause of pneumonia shifts with age. In newborns, Group B streptococcus is the most common bacterial cause. In children under five, RSV is the leading viral culprit. Children over five are more likely to be infected with Group A streptococcus or Mycoplasma. Globally, pneumonia remains the leading infectious killer of young children, responsible for more than 808,000 deaths in children under five in 2017 alone.

In adults, the pattern shifts toward pneumococcus and influenza. Older adults and people with chronic health conditions face the highest risk of severe outcomes, partly because their immune defenses are weaker and partly because they’re more likely to carry pneumococcus in their respiratory tract without clearing it effectively.

How the Cause Is Identified

Diagnosing pneumonia starts with imaging. A chest X-ray is the standard first step, looking for areas of dense, fluid-filled lung tissue that indicate infection. Ultrasound and CT scans can catch cases that X-rays miss, particularly in critically ill patients.

Identifying the specific pathogen is trickier. Modern multiplex testing can screen for common bacterial and viral causes simultaneously from a single sample in one to two hours. Urine tests can rapidly detect pneumococcus and Legionella, which is particularly useful when a patient can’t cough up a sputum sample or has already started antibiotics (which can make traditional cultures come back negative even when bacteria are present). For atypical organisms like Mycoplasma or Chlamydophila, blood tests measuring the immune response exist but often take two to four weeks to confirm, making them less useful for guiding immediate treatment.

In many cases, especially milder ones treated outside the hospital, the exact cause of pneumonia is never identified. Treatment is started based on the most likely pathogen given the patient’s age, symptoms, health history, and local patterns of infection.