Skip to main content
GoodRx Guide

What Is Pneumonia? Symptoms, Causes, and Treatments

Comprehensive information for you or a loved one — including treatment options and discounts on popular medications.
Sarah Gupta, MDPatricia Pinto-Garcia, MD, MPH
Written by Sarah Gupta, MD | Reviewed by Patricia Pinto-Garcia, MD, MPH
Updated on January 5, 2026

What is pneumonia?

Pneumonia is a type of lower respiratory tract infection. When you have pneumonia, your lungs can swell and fill with fluid or pus. Pneumonia can be serious and some people with pneumonia may need to stay in the hospital. 

A 3D illustration of the upper respiratory tract including alveoli (air sacs), windpipe (trachea), large airways (bronchi), and small airways (bronchioles).

The main types of pneumonia are:

  • Bacterial pneumonia

  • Viral pneumonia

  • Fungal pneumonia

You can get pneumonia at any age. But some people are more likely to get pneumonia and get seriously sick. This includes:

  • Adults over 65 years old

  • Young children

  • People with a weakened immune system

  • People with long-term health conditions, like diabetes or heart disease

  • People with lung conditions, like chronic obstructive pulmonary disease (COPD) or asthma


What causes pneumonia?

Pneumonia is usually caused by an infection. More than 30 different germs can cause pneumonia. These include:

  • Bacteria: Several types of bacteria can cause pneumonia. But Streptococcus pneumoniae (pneumococcus) is the most common cause of bacterial pneumonia. 

  • Viruses: Many different viruses can cause pneumonia — including the viruses that cause the common cold, the flu, and COVID-19

  • Fungi: Fungi can cause pneumonia but this isn’t common. People with a weakened immune system are more likely to develop fungal pneumonia

  • Parasites: Some parasites can also cause pneumonia, but parasitic pneumonia is uncommon.


How can you get pneumonia?

Pneumonia itself isn’t contagious. But the viruses and bacteria that cause pneumonia are contagious. They can pass from person to person through respiratory droplets. If you inhale these droplets, you can develop a respiratory infection. 

Some people only develop a mild upper respiratory tract infection, like the common cold. But others may develop more serious infections, like pneumonia. You’re at higher risk of developing pneumonia if you:

  • Are over the age of 65

  • Are under the age of 2

  • Aren’t up to date on vaccinations against pneumococcus, influenza, or COVID

  • Have long-term health problems, like diabetes, heart disease, or lung disease

  • Smoke cigarettes

  • Misuse drugs or alcohol

  • Are malnourished

  • Have a weakened immune system 

  • Have a hard time coughing or swallowing

  • Live in a nursing home


Pneumonia Medications

Compare prices and information on the most popular Pneumonia medications.

  • Acticlate
    $569.49
    $25.45
  • Morgidox
    $23.82
    $12.08
  • Vibramycin
    $47.60
    $12.08

Pneumonia symptoms

Symptoms of pneumonia can appear suddenly, or they can develop slowly over several days. 

Common pneumonia symptoms include: 

  • Cough, especially with green, yellow, or rust-colored mucus (sputum)

  • Chest pain when you cough or breathe deeply

  • Shortness of breath

  • Blue lips or nails due to low oxygen

  • Fever 

  • Sweating

  • Chills

  • Nausea and vomiting

  • Low appetite

  • Fatigue or low energy

  • Confusion, especially in older adults

Reviewed by Karen Hovav, MD, FAAP | November 6, 2025

Symptoms can range from mild to very serious, and even life-threatening. In some cases, people with pneumonia have to stay in the hospital for treatment. But many people are able to manage pneumonia at home. It all depends on your symptoms and your overall health. 

Seek medical care if you think you have pneumonia. This is especially important if your symptoms are severe or are getting worse. 


Quiz: Do I have pneumonia?

How is pneumonia diagnosed?

Your medical team can diagnose pneumonia using tools like:

  • Your medical history 

  • A physical examination

  • A chest X-ray

Your healthcare team may also order additional tests, including:

  • Blood tests: These tests can look for signs of infection in your body.

  • Urine testing: Urine tests can help diagnose some types of pneumonia and rule out other types of infections.

  • Sputum testing: This test looks at the sputum (mucus) you’re coughing up to see what types of germs are in your lungs. 

  • CT scan: This is an imaging study that offers a more detailed image of your lungs. 

  • Pulse oximetry: This is a small device that clips on your finger or ear. It measures how much oxygen is in your bloodstream

  • Bronchoscopy: This is a small, flexible tube that goes through your nose or mouth and down into your lung. It has a camera so a healthcare professional can see inside your lungs and take samples to help with diagnosis and treatment. 


Pneumonia medications

There are many different medications that help treat pneumonia. The right medication for you depends on your symptoms, your overall health, and the type of pneumonia you have. 

Some medications fight germs and help the infection go away. These include:

  • Antibiotics

  • Antivirals

  • Antifungals

Make sure to finish any prescription treatments — even if you’re feeling better. Stopping your medication too soon can make your infection come back. It can also make it harder for medication to work again in the future.

OTC medications for pneumonia

Over-the-counter (OTC) medications can’t cure or treat pneumonia. But they can help you manage pneumonia symptoms. Some OTC medications that can help when you have pneumonia include: 

  • OTC pain and fever relievers: Ibuprofen (Advil, Motrin) and naproxen (Aleve) can help ease pain, fever, and inflammation. Acetaminophen (Tylenol) is another option for those who can’t take nonsteroidal anti-inflammatory drugs (NSAIDs).

  • Expectorants: Guaifenesin (Mucinex) can help break up mucus and relieve chest congestion. 

Check with your healthcare team before taking any OTC medications. They can make sure OTC medications are safe for you and won’t interact with any prescription treatments. 


At-home treatments for pneumonia

There are many things you can do at home to ease your symptoms. Here are some self-care tips that can help you recover from pneumonia:

  • Drink lots of fluids. This helps your body stay hydrated, which is especially important if you have a fever. Fluids can also loosen the mucus in your lungs and make it easier to cough out. Warm drinks, like herbal tea, can also help to soothe your airways. 

  • Get plenty of rest. Rest can help your body fight off pneumonia and lower your risk of getting sick again. Try to take it easy while you’re recovering and get as much sleep as you can. 

  • Breathe moist air. Moist air can help to open your airways and make it easier to breathe. Create moist, soothing air by using a humidifier in your room or taking a hot shower or bath.

  • Stay away from smoke. Smoke can irritate your lungs and make it harder for them to heal. Avoid cigarettes, secondhand smoke, and wood-burning fires.


How can you prevent pneumonia?

Reviewed by Mandy Armitage, MD | November 7, 2025

It’s impossible to completely prevent pneumonia. But there are some things you can do to protect yourself and lower your risk:

  • Get vaccinated. Staying up to date with vaccinations is one of the best things you can do to protect yourself from pneumonia. Pneumococcal vaccines, flu shots, and COVID vaccines can all help. They target three of the possible causes of pneumonia: Streptococcus pneumoniae, influenza, and coronavirus. 

  • Take basic precautions. Simple measures can protect you from infections. These include washing your hands, wearing a mask in crowded areas, and staying away from people who are sick. 

  • Stop smoking. Smoking cigarettes puts you at risk for many health problems, including pneumonia. 

  • Manage your other medical conditions. Controlling long-term health conditions like asthma, COPD, and diabetes can also help to prevent pneumonia. 

  • Stay physically fit. Eating nutritious foods, exercising regularly, and getting enough good-quality sleep every night can help lower your risk of serious viral and bacterial infections like pneumonia. 


Frequently asked questions

Pneumonia isn’t contagious. But the viruses and bacteria that cause pneumonia can spread from person to person. They usually spread through the air when someone with an infection coughs or talks. You can also get pneumonia by touching a contaminated surface and then touching your nose or mouth. 

References

American Lung Association. (2025). Pneumonia symptoms and diagnosis.

American Lung Association. (2025). Pneumonia treatment and recovery.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Newsletter Signup

Latest Articles