Skip to main content
Pneumonia

How to Treat Pneumonia: Know About Your Options

Amy Walsh, MD, MDPSophie Vergnaud, MD
Written by Amy Walsh, MD, MDP | Reviewed by Sophie Vergnaud, MD
Updated on November 19, 2026

Key takeaways:

  • Pneumonia treatment depends on what’s causing the infection, how sick you are, and your age and overall health.

  • Pneumonia that’s caused by a bacterial infection should be treated with antibiotics. But other types of pneumonia won’t get better with antibiotic treatment. 

  • Corticosteroids, inhalers, and oxygen therapy can also be used in some cases to help treat pneumonia, but they aren’t routine. 

If you’ve ever been sick with pneumonia, you know that it can be a miserable experience. 

Pneumonia is an infection in the lungs. It can be caused by bacteria, viruses, or, less commonly, fungi. People with pneumonia often have a cough, fever, and difficulty breathing. Some cases of pneumonia can be quite mild, while others may be life-threatening and require hospital treatment. 

There’s no single treatment for pneumonia that’ll work for everyone. That’s because every case of pneumonia is different. Treatment depends on what’s causing the infection, how sick you are, and your overall health. Some medications target the infection itself. Other treatments ease symptoms and support your breathing while your lungs recover.

Antibiotics

Antibiotics treat bacterial pneumonia, including infections caused by Streptococcus pneumoniae and Mycoplasma pneumoniae. The latter can cause “walking” pneumonia, which is often milder.

Antibiotics don’t work against viruses or fungi, but you may still need them if your healthcare team thinks you have a bacterial infection alongside another infection.

Sometimes, two antibiotics are prescribed together to cover different bacteria that can cause pneumonia.

Antibiotics used to treat bacterial pneumonia include:

Most people with bacterial pneumonia can take an oral antibiotic at home. Take antibiotics exactly as prescribed. Don’t stop or change treatment without talking with your prescriber, even if you’re feeling better.

Intravenous antibiotics

Some people may need to be admitted to the hospital for antibiotics delivered through an IV. 

This happens when:

  • Oral antibiotics haven’t cleared the infection 

  • Oral antibiotics won't work because the infection is caused by antibiotic-resistant bacteria

  • Someone’s unable to keep oral antibiotics down due to nausea or vomiting

  • Someone’s severely ill 

Antivirals

Antiviral medications can be used to help treat certain types of viral pneumonia. Examples are those caused by influenza (the flu) and SARS-CoV-2 (the virus that causes COVID-19). Here’s a breakdown on antiviral treatment:

  • Flu antivirals: For pneumonia caused by the flu, treatment with an antiviral such as oseltamivir (Tamiflu) is recommended as soon as possible. It may still help even when started more than 48 hours after symptoms begin. 

  • COVID antivirals: For people at higher risk of severe COVID, early antiviral treatment can reduce the risk of hospitalization and death. Paxlovid (nirmatrelvir / ritonavir) is one option for mild to moderate COVID. It must be started within 5 days of symptoms beginning. Severe COVID pneumonia requires different treatment.

Not all cases of viral pneumonia can be treated with antivirals though. And not everyone with viral pneumonia needs antiviral medication. 

Antifungals

Fungi can sometimes cause pneumonia, including the lung infections histoplasmosis and valley fever.

Fungal infections can be challenging to diagnose and treat. Mild cases may improve without medication. More serious infections may need treatment in a hospital. Specialists like infectious disease experts often help guide treatment decisions.

Some fungal pneumonias need antifungal medication. Treatment depends on the fungus, how severe the infection is, and your overall health. 

Corticosteroids

Corticosteroids, like prednisone and dexamethasone, are medications that reduce inflammation. They may improve survival in some adults hospitalized with severe bacterial pneumonia, but they aren’t routinely recommended for less severe pneumonia. 

They may also be needed for a flare-up of asthma or chronic obstructive pulmonary disease (COPD) that happens alongside pneumonia.

Corticosteroids can have side effects such as increased blood sugar and blood pressure. They can also cause anxiety, agitation, and confusion. 

Inhalers and nebulizers

Bronchodilators, such as albuterol and ipratropium, relax and open narrowed airways to make breathing easier. 

These medications exist as both inhalers and nebulizers:

  • An inhaler is a small, handheld device that delivers inhaled or powdered medication directly to the lungs. 

  • A nebulizer is a machine that helps deliver medication to the lungs by turning liquid into a mist that you inhale. 

Not everyone who’s sick with pneumonia needs these medications. Your healthcare team can help determine if these medications are right for you.

Oxygen

If pneumonia causes low blood oxygen levels, you may need supplemental oxygen, usually in a hospital. Severe cases may require a ventilator to help with breathing.

Over-the-counter medications

Over-the-counter (OTC) pain relievers can help treat symptoms of pneumonia such as fever, headache, and chest pain. 

Your healthcare team may recommend using:

These medications can help relieve aches and pains and reduce fever. 

Don’t give aspirin to children or teenagers with a viral illness unless their clinician specifically recommends it. It can cause a rare but serious condition called Reye’s syndrome.

Home remedies

In addition to OTC medications, there are other things you can do at home to help aid your recovery. If you're sick with pneumonia, try the following:

  • Increase your fluid intake. This can help loosen mucus and make it easier to cough up phlegm.

  • Drink warm beverages. You can also spend time in a steamy bath or shower, or turn on a humidifier to help clear out mucus. 

  • Avoid smoke. This means cigarette smoke, secondhand smoke, and wood smoke. All of these can further irritate your lungs while you're sick. 

  • Get enough rest. Ask for help with preparing meals and chores until you’re feeling better. It can take weeks to fully recover from pneumonia. 

Can you prevent pneumonia?

Yes, there are safe and effective vaccines that can lower your risk of pneumonia and severe illness. The “pneumonia shot,” or pneumococcal vaccine, protects against several strains of Streptococcus pneumoniae, a common cause of bacterial pneumonia. It doesn’t prevent all types of pneumonia.

Other important vaccines that can reduce your chances of getting pneumonia (if recommended for you) include:

You can also lower your risk of pneumonia by:

  • Practicing good hand hygiene. Wash your hands often, especially before eating and after coughing, sneezing, or blowing your nose.

  • Avoiding smoking and secondhand smoke. Tobacco smoke can damage your lungs’ defenses against infection.

  • Reducing exposure to respiratory viruses. Improve indoor ventilation and consider wearing a well-fitting mask in crowded indoor spaces when respiratory viruses are spreading.

When to seek care for pneumonia

Recovery from pneumonia takes time. You may start feeling better within a few days of treatment, but getting back to normal can take several weeks. Contact your healthcare team if you aren’t starting to improve after 2 to 3 days of antibiotics. 

And get prompt medical care if your symptoms suddenly worsen or if you have severe symptoms of pneumonia, such as:

  • Difficulty breathing

  • Chest pain

  • High fever

  • Heart racing

  • Confusion

Frequently asked questions

How long you’re contagious depends on the germ causing pneumonia. With many bacterial infections, you’re less contagious after about 48 hours of effective antibiotics and once your fever has gone away. But the timing varies. Viral infections can still spread after you start feeling better.

Other types of pneumonia — like fungal or aspiration pneumonia — aren’t contagious at all. 

How contagious pneumonia is depends on the type of infection you have. For example, some strains of COVID-19 are very contagious. However, fungal pneumonia doesn’t spread from person to person. 

Yes, pneumonia can be contagious after you take antibiotics. That’s because antibiotics reduce the spread of some bacterial infections, but they don’t make you immediately noncontagious. The timing depends on the bacteria, whether treatment is working, and whether your fever has resolved. Antibiotics don’t reduce the spread of viruses.

The bottom line

Recovering from pneumonia takes more than treating the infection. Your lungs also need time to heal, so try to pace yourself as you return to your usual activities. A lingering cough or tiredness doesn’t necessarily mean treatment isn’t working. What matters is that you’re gradually improving. If your recovery stalls or you start feeling worse, check in with your healthcare team.

why trust our exports reliability shield

Why trust our experts?

Amy Walsh, MD, MDP, has worked as an emergency physician for 15 years, including care at both rural hospitals and trauma centers. She is the former Global Emergency Medicine fellowship director at Health Partners.
Sophie Vergnaud, MD, is the Senior Medical Director for GoodRx Health. A pulmonologist and hospitalist, she practiced and taught clinical medicine at hospitals in London for a decade before entering a career in health education and technology.

References

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

American Lung Association. (2026). How to use a nebulizer. 

American Lung Association. (2026). Is pneumonia contagious? 

Centers for Disease Control and Prevention. (2026). About histoplasmosis. 

Centers for Disease Control and Prevention. (2026). About valley fever.

DC Health. (2024). Fact sheet: Pneumonia. Center for Policy, Planning and Evaluation.

Limper, A. H., et al. (2011). An official American Thoracic Society Statement: Treatment of fungal infections in adult pulmonary and critical care patients. American Journal of Respiratory and Critical Care Medicine. 

MedlinePlus. (2024). Oxygen therapy.

National Health Service Inform. (2026). Pneumonia.

National Heart, Lung, and Blood Institute. (2022). Pneumonia: Prevention.

National Heart, Lung, and Blood Institute. (2022). Pneumonia: Recovery. 

Stern, A., et al. (2017). Is treatment with corticosteroids beneficial and safe for people with pneumonia? Cochrane Database of Systematic Reviews.

Womack, J., et al. (2022). Community-acquired pneumonia in adults: Rapid evidence review. American Family Physician.

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.

Was this page helpful?

Latest articles