How pneumonia treatment works

Treatment for pneumonia in adults depends on what caused it and how severe it is. Bacterial pneumonia responds to antibiotics, which kill the bacteria causing the infection. Viral pneumonia has no antibiotic cure — your immune system fights the virus while you manage symptoms and prevent complications. Fungal pneumonia, which is rare and usually occurs in people with weakened immune systems, requires antifungal medications. Your doctor determines which type you have through a chest X-ray and sometimes a sputum culture (a sample of mucus from your lungs).

Most adults with pneumonia can be treated at home with rest, fluids, and medication. Hospital admission becomes necessary if you have severe symptoms, low oxygen levels, confusion, or existing conditions like heart disease or diabetes that make pneumonia riskier. The goal of treatment is to clear the infection, restore oxygen to your bloodstream, and prevent complications like sepsis or respiratory failure.

Key Takeaways

  • Bacterial pneumonia is treated with antibiotics prescribed by your doctor, usually taken by mouth for 5 to 7 days, though some people need intravenous antibiotics in a hospital.
  • Viral pneumonia has no antibiotic treatment — recovery depends on rest, fluids, and managing symptoms while your immune system clears the virus.
  • Oxygen therapy becomes necessary if your blood oxygen level drops below a certain threshold, which your doctor measures with a pulse oximeter.
  • Most adults recover at home, but hospitalization is recommended if you have severe shortness of breath, confusion, or underlying heart or lung disease.
  • Cough suppressants and fever reducers help you feel better, but coughing itself is part of clearing mucus from your lungs, so complete suppression can slow recovery.

Antibiotics for bacterial pneumonia

If your doctor determines you have bacterial pneumonia, they will prescribe an antibiotic. The most common first choice is amoxicillin or amoxicillin-clavulanate (Augmentin) for adults without severe illness. If you are allergic to penicillin, your doctor may prescribe a fluoroquinolone like levofloxacin (Levaquin) or moxifloxacin (Avelox), or a macrolide like azithromycin (Zithromax). The choice depends on which bacteria are most likely in your area, your allergy history, and whether you have other medical conditions.

You typically take oral antibiotics at home for 5 to 7 days. It is important to finish the entire course even if you feel better after a few days — stopping early can allow bacteria to survive and cause the infection to return. If your pneumonia is severe or you cannot take pills by mouth, your doctor will admit you to the hospital for intravenous antibiotics. Most people show improvement within 48 to 72 hours of starting the right antibiotic, with fever dropping and breathing becoming easier.

Managing viral pneumonia

Viral pneumonia cannot be cured with antibiotics because antibiotics do not kill viruses. Instead, treatment focuses on supporting your body while your immune system fights the infection. This means rest, drinking plenty of fluids to loosen mucus, and using a humidifier to ease congestion. Most viral pneumonia cases resolve within 1 to 3 weeks, though a lingering cough can persist for several weeks after the infection clears.

Your doctor may prescribe an antiviral medication if the pneumonia is caused by influenza or COVID-19, particularly if you start treatment within the first few days of symptoms. Antivirals like oseltamivir (Tamiflu) for flu or nirmatrelvir-ritonavir (Paxlovid) for COVID-19 can shorten the illness and reduce the risk of severe disease. For other viral causes, no specific antiviral exists, and treatment is supportive only.

Oxygen therapy and breathing support

If pneumonia reduces the amount of oxygen reaching your bloodstream, your doctor will prescribe supplemental oxygen. This is measured using a pulse oximeter, a small device clipped to your finger that shows your oxygen saturation level. Most doctors aim to keep this level at 90% or higher. At home, oxygen is delivered through a nasal cannula (small tubes in your nose) or a face mask, with the flow rate adjusted based on your oxygen level.

In severe cases requiring hospitalization, you may receive oxygen through a high-flow nasal cannula, a non-rebreather mask, or mechanical ventilation if your lungs cannot maintain adequate oxygen on their own. Mechanical ventilation means a breathing tube is placed in your windpipe and a machine takes over the work of breathing. This is reserved for the most severe cases and is typically temporary — the tube is removed once your lungs recover enough to breathe on your own.

Symptom relief while you recover

Over-the-counter medications can ease discomfort while your body fights the infection. Acetaminophen (Tylenol) or ibuprofen (Advil, Motrin) reduce fever and body aches. Take these as directed on the package — do not exceed the recommended dose. A cough suppressant containing dextromethorphan (DM) can help if coughing keeps you awake at night, but use it sparingly. Coughing is actually beneficial because it clears mucus from your lungs, so completely suppressing it can slow recovery.

Expectorants containing guaifenesin (found in Mucinex) help thin mucus so it is easier to cough up. Staying hydrated is one of the most effective ways to thin secretions — drink water, warm tea, broth, or other fluids throughout the day. A humidifier in your bedroom adds moisture to the air, which can ease congestion and make breathing more comfortable. Avoid smoking and secondhand smoke, as these irritate your lungs and slow healing.

When hospitalization is necessary

Most adults with pneumonia recover at home, but certain situations require hospital care. You should go to the hospital if you have severe shortness of breath at rest, chest pain, confusion or difficulty staying alert, blood oxygen levels below 90%, or signs of sepsis like a very high fever with chills and rapid heartbeat. Adults over 65, those with chronic heart or lung disease, diabetes, or a weakened immune system are at higher risk for severe pneumonia and may be hospitalized even with moderate symptoms.

In the hospital, you receive intravenous antibiotics, oxygen therapy, and continuous monitoring of your heart rate, blood pressure, and oxygen level. Doctors also watch for complications like fluid around the lungs (pleural effusion) or blood clots. Most hospital stays for pneumonia last 3 to 7 days, though this varies based on how quickly you improve and your underlying health.

Recovery and follow-up care

After treatment, most adults recover fully within 2 to 4 weeks, though fatigue and a mild cough can linger longer. You should gradually return to normal activities as you feel stronger — pushing too hard too soon can trigger a relapse. Your doctor may schedule a follow-up chest X-ray 4 to 6 weeks after treatment ends to confirm the infection has cleared, especially if you are over 50 or have underlying lung disease.

Watch for warning signs that the infection is returning or worsening: increasing shortness of breath, high fever returning after you felt better, coughing up blood, or chest pain. If any of these occur, contact your doctor or go to the emergency room. To reduce your risk of pneumonia in the future, ask your doctor about pneumococcal and influenza vaccines, both of which are recommended for most adults.

Frequently Asked Questions

How long does it take for antibiotics to work on pneumonia?

Most people feel noticeably better within 48 to 72 hours of starting the correct antibiotic — fever drops, breathing becomes easier, and chest pain improves. However, you should take the full course (usually 5 to 7 days) even if you feel well, because stopping early allows bacteria to survive and the infection to return.

Can I treat pneumonia at home without going to the hospital?

Yes, most adults with mild to moderate pneumonia recover at home with antibiotics, rest, and fluids. Hospital care is needed if you have severe shortness of breath, low oxygen levels, confusion, or existing conditions like heart disease that make pneumonia riskier. Your doctor will assess your symptoms and oxygen level to decide whether home or hospital treatment is appropriate.

What should I do if my cough is not improving after finishing antibiotics?

A lingering cough for several weeks after pneumonia is common and usually harmless as your lungs continue to clear mucus. However, if the cough is getting worse, you are coughing up blood, or you develop new symptoms like fever or shortness of breath, contact your doctor. These could signal a complication or a different problem.

Is pneumonia contagious during treatment?

Bacterial pneumonia itself is not contagious — you cannot catch it from another person. However, the infection that caused it (like strep bacteria) may spread through respiratory droplets. Viral pneumonia caused by flu or COVID-19 is contagious. Stay home and avoid close contact with others for at least 24 hours after starting antibiotics or until fever is gone without medication.

What happens if antibiotics do not work?

If you are not improving after 48 to 72 hours on antibiotics, your doctor may switch to a different antibiotic, order additional tests to identify the bacteria, or check for complications like fluid around the lungs. Sometimes pneumonia is caused by a virus or fungus, which require different treatment. Contact your doctor if symptoms are worsening or not improving as expected.