How pneumonia treatment works

Treatment for pneumonia depends on what caused it — bacterial, viral, or fungal — and how severe your infection is. Your doctor will determine the cause through a chest X-ray and sometimes blood or sputum tests, then prescribe treatment based on those results. Bacterial pneumonia is treated with antibiotics. Viral pneumonia usually resolves on its own, though your doctor may prescribe antivirals in some cases. Fungal pneumonia requires antifungal medication and is less common but more serious.

Most people with pneumonia can be treated at home with rest, fluids, and medication. Hospital admission happens when you have severe symptoms, low oxygen levels, are over 65, have other serious health conditions, or cannot care for yourself at home. The goal of treatment is to clear the infection and help your lungs function normally again.

Key Takeaways

  • Bacterial pneumonia is treated with antibiotics prescribed by your doctor based on test results, and you must take the full course even if you feel better.
  • Viral pneumonia usually improves without antibiotics, but your doctor may prescribe antivirals or recommend supportive care like rest and fluids.
  • Most people recover at home, but hospital care is needed if you have severe symptoms, very low oxygen levels, or serious underlying health conditions.
  • Recovery typically takes two to four weeks for uncomplicated pneumonia, though fatigue can last longer.

Antibiotics for bacterial pneumonia

If your doctor determines you have bacterial pneumonia, they will prescribe an antibiotic. Common first-line antibiotics include amoxicillin-clavulanate, azithromycin, or fluoroquinolones like levofloxacin. Your doctor chooses based on the bacteria most likely causing your infection, your age, any drug allergies, and whether you have other health conditions.

Take the full course of antibiotics exactly as prescribed, even if you start feeling better after a few days. Stopping early allows bacteria to survive and can lead to relapse or antibiotic resistance. Most people begin improving within 48 to 72 hours of starting antibiotics. If you do not feel better after three days, or if you get worse, contact your doctor — you may need a different antibiotic or further testing.

Managing viral pneumonia and supportive care

Viral pneumonia cannot be treated with antibiotics. Your immune system fights the infection while you recover with rest, fluids, and time. Your doctor may prescribe antivirals like oseltamivir (Tamiflu) if you have influenza pneumonia and are seen early in the illness, though this is not routine for all viral cases.

Supportive care means staying hydrated, resting as much as possible, and managing symptoms. Over-the-counter pain relievers like acetaminophen or ibuprofen can reduce fever and chest pain. A humidifier or steam from a hot shower can ease coughing. Most viral pneumonia resolves in one to three weeks, though a lingering cough is common for several weeks after.

When you need hospital treatment

Hospital admission is recommended if you have severe pneumonia — meaning very low oxygen levels (below 90 percent on a pulse oximeter), rapid or labored breathing, confusion, or signs of sepsis. You are also more likely to be admitted if you are over 65, have heart disease, diabetes, chronic lung disease, a weakened immune system, or cannot care for yourself at home.

In the hospital, you receive intravenous antibiotics, oxygen therapy through a mask or nasal tube, and close monitoring of your vital signs and oxygen levels. Some patients need mechanical ventilation if their lungs cannot deliver enough oxygen on their own. Hospital stays for pneumonia typically last three to seven days, depending on severity and how quickly you improve.

Oxygen therapy and breathing support

If your blood oxygen level drops below 90 percent, your doctor will prescribe supplemental oxygen. This can be delivered through a nasal cannula (two small tubes in your nose), a face mask, or other devices depending on how much oxygen you need. Oxygen therapy helps your body get enough oxygen while your lungs heal and fight infection.

Most people with pneumonia who receive oxygen at home use a portable oxygen concentrator or compressed oxygen tanks. Your doctor or respiratory therapist will show you how to use the equipment and how many hours per day you need it. As your lungs improve, your oxygen needs decrease, and you can gradually stop using it.

Recovery timeline and what to expect

Uncomplicated pneumonia typically improves within two to four weeks with proper treatment. You may feel well enough to return to light activities within a week or two, but full recovery — including return to normal exercise and work — often takes four to six weeks. Fatigue and a lingering dry cough are common and can persist for weeks after the infection clears.

Your doctor may schedule a follow-up chest X-ray four to six weeks after diagnosis to confirm the infection has cleared, especially if you are over 50 or a smoker. If you are not improving as expected, or if symptoms return, contact your doctor. Complications like pleural effusion (fluid around the lungs) or empyema (infection of that fluid) are uncommon but require additional treatment.

When to seek immediate care

Contact your doctor or seek emergency care if you develop severe shortness of breath, chest pain that worsens, confusion or difficulty staying alert, or coughing up blood. These can signal complications or worsening infection. Also seek care if you have been treated at home but are not improving after five to seven days, or if you develop new symptoms like severe headache or stiff neck.

If you are being treated at home and your symptoms suddenly worsen — such as a sharp increase in fever, inability to breathe, or loss of consciousness — call 911 or go to the emergency department. Do not wait to see your regular doctor in these situations.

Frequently Asked Questions

Can pneumonia go away on its own without treatment?

Mild viral pneumonia may improve without treatment, but bacterial pneumonia requires antibiotics or it can worsen and cause serious complications. Even with viral pneumonia, seeing a doctor is important to confirm the diagnosis and rule out bacterial infection. Your doctor can also prescribe supportive care and monitor your oxygen levels.

How long do I have to take antibiotics for pneumonia?

Most antibiotic courses for pneumonia last seven to ten days. Your doctor will tell you the exact duration for your prescription. Finish the entire course even if you feel better after a few days — stopping early can allow the infection to return or lead to antibiotic resistance.

Is it safe to exercise while recovering from pneumonia?

Rest is important during the acute phase of pneumonia. Light activity like short walks indoors is usually fine after a few days if you feel up to it, but avoid strenuous exercise, sports, or heavy lifting until your doctor says it is safe. Most people can return to normal exercise four to six weeks after diagnosis.

What should I do if the antibiotic my doctor prescribed is not working?

Contact your doctor if you are not improving after three days of antibiotics or if symptoms worsen. Your doctor may order additional tests to confirm the diagnosis, check for complications, or switch you to a different antibiotic. Do not stop taking your current antibiotic without talking to your doctor first.

Can I catch pneumonia again after I recover?

Yes, you can get pneumonia more than once. People over 65, those with chronic health conditions, and smokers have higher risk of recurrent pneumonia. Vaccines against pneumococcal bacteria and influenza can reduce your risk. Ask your doctor whether these vaccines are right for you.