Back to Lungs Breathing
Pneumonia
Reviewed by Medicinsk Expert•Last updated: 2026-10-22•Lungs Breathing

Pneumonia

Pneumonia is a lung infection that causes air sacs to fill with fluid or pus, ranging from mild to severe depending on the cause and individual health.

What is pneumonia?

Pneumonia is an infection in one or both of your lungs. It causes the air sacs of your lungs to fill up with fluid or pus. Pneumonia can range from mild to severe, depending on what caused it, your age, and your overall health.

What causes pneumonia?

Bacterial, viral, and fungal infections can cause pneumonia.

Bacteria are the most common cause. Bacterial pneumonia can occur on its own or develop after you've had certain viral infections such as a cold or the flu. Several different types of bacteria can cause pneumonia, including:

  • Streptococcus pneumoniae
  • Legionella pneumophila (often called Legionnaires' disease)
  • Mycoplasma pneumoniae
  • Chlamydia pneumoniae
  • Haemophilus influenzae type b (Hib)

Viruses that infect the respiratory tract may cause pneumonia. Viral pneumonia is often mild and goes away on its own within a few weeks, but sometimes it is serious enough to require hospital treatment. If you have viral pneumonia, you are at risk of also getting bacterial pneumonia. Viruses include:

  • Respiratory syncytial virus (RSV)
  • Some common cold and flu viruses
  • SARS-CoV-2, the virus that causes COVID-19

Fungal pneumonia is more common in people who have chronic health problems or weakened immune systems. Types include:

  • Pneumocystis pneumonia (PCP)
  • Valley fever (Coccidioidomycosis)
  • Histoplasmosis
  • Cryptococcal pneumonia

Aspiration can also cause pneumonia, which happens when you accidentally breathe food or fluid into the lungs. If you are not able to cough it out, it may cause an infection.

Who is more likely to develop pneumonia?

Anyone can develop pneumonia, but certain factors increase your risk:

  • Age: Higher risk for children age 2 and under and adults age 65 and older.
  • Exposure to certain chemicals, pollutants, or toxic fumes.
  • Lifestyle habits: Smoking, heavy alcohol use, and malnourishment.
  • Being in a hospital: Especially in the ICU; being sedated or on a ventilator raises risk.
  • Having a lung disease.
  • Having a weakened immune system.
  • Trouble coughing or swallowing due to a stroke or other condition.
  • Recently having been sick with a cold or the flu.
  • Other chronic health conditions: Including diabetes, heart failure, sickle cell disease, liver disease, and kidney disease.

What are the symptoms of pneumonia?

Symptoms can range from mild to severe and include:

  • Fever
  • Chills
  • Cough, usually with phlegm (thick mucus)
  • Shortness of breath
  • Chest pain when you breathe or cough
  • Nausea and/or vomiting
  • Diarrhea

Symptoms vary by group. Newborns and infants may not show signs, or they may vomit, have a fever, cough, or seem restless with no energy. Older adults and those with serious illnesses may have fewer, milder symptoms, a lower-than-normal temperature, or sudden confusion.

What other problems can pneumonia cause?

Sometimes pneumonia can cause serious complications such as:

  • Bacteremia: Bacteria move into the bloodstream, which can lead to septic shock.
  • Lung abscesses: Collections of pus in the lungs.
  • Pleural disorders: Conditions affecting the pleura (the tissue covering the lungs and lining the chest cavity).
  • Kidney failure.
  • Respiratory failure.

How is pneumonia diagnosed?

Because symptoms can mimic a cold or flu, diagnosis can be difficult. Your health care provider will take a medical history, perform a physical exam (listening to lungs), and may order tests including:

  • A chest x-ray
  • Blood tests, such as a complete blood count (CBC)
  • A blood culture

If you are hospitalized or have severe symptoms, you may have additional tests:

  • Sputum test
  • Chest CT scan
  • Pleural fluid culture
  • Pulse oximetry (blood oxygen level test)
  • Bronchoscopy

What are the treatments for pneumonia?

Treatment depends on the type of pneumonia and severity:

  • Antibiotics: Treat bacterial and some fungal pneumonia (not viral).
  • Antiviral medicines: May be prescribed for viral pneumonia.
  • Antifungal medicines: Treat fungal pneumonia.

Severe cases may require hospitalization and oxygen therapy. Recovery time varies from a week to a month or more.

Can pneumonia be prevented?

Vaccines can help prevent pneumonia caused by pneumococcal bacteria or the flu virus. Washing your hands often, not smoking, and maintaining a healthy lifestyle may also help prevent pneumonia.

Frequently Asked Questions

Bacterial pneumonia often presents with a sudden high fever, productive cough with thick, sometimes rusty sputum, and sharp chest pain that worsens with breathing. Viral pneumonia tends to start with a milder cough, low‑grade fever, and may be preceded by a cold or flu. A chest X‑ray and a sputum culture can confirm the cause, but your clinician may start treatment based on typical patterns. What are the best home‑care steps while I wait for antibiotics?::Rest in a slightly elevated position to ease breathing, stay well hydrated, and use over‑the‑counter pain relievers (acetaminophen or ibuprofen) to reduce fever and aches. A humidifier or steam inhalation can loosen mucus. Avoid alcohol and smoking, and monitor your temperature and breathing; if symptoms worsen, seek medical attention. When should I consider hospitalization for pneumonia?::Hospital admission is usually needed if you have a high fever that does not respond to medication, persistent shortness of breath, confusion, dehydration, or if you are older than 65, have a weakened immune system, or have chronic conditions like heart or lung disease. Signs of severe illness include a rapid heart rate, low oxygen saturation (below 90%), or a cough that produces blood. How can I prevent future pneumonia episodes?::Vaccinations—especially the pneumococcal and influenza shots—are the most effective prevention. Maintain good hand hygiene, avoid close contact with sick individuals, and keep up with routine health check‑ups. If you smoke, quit; if you have a chronic illness, manage it tightly. Staying active, eating a balanced diet, and staying hydrated also support lung health.
Source: MedlinePlus, National Library of Medicine

MedlinePlus brings together authoritative health information from the National Library of Medicine (NLM), the National Institutes of Health (NIH), and other government agencies and health-related organizations.

kontakt@hittavard.se

Ⓒ 2024. Alla rättigheter förbehålls av juxt ab