Pneumonia treatment depends on what caused it and how sick you are
Most pneumonia caused by bacteria is treated with antibiotics, which kill the infection and let your body heal. Viral pneumonia has no antibiotic cure—your immune system fights it while you rest and manage symptoms. Fungal pneumonia requires antifungal medications, though this is rare outside specific geographic regions or in people with weakened immunity. The path forward starts with identifying which type you have, which usually means a chest X-ray and sometimes a sputum sample or blood test.
Severity matters enormously. Mild pneumonia can be treated at home with oral antibiotics and rest. Moderate to severe cases often need hospitalization, where you receive intravenous antibiotics, oxygen support, and monitoring to catch complications early. Your doctor will assess your age, underlying health conditions, and how much your lungs are affected to decide where treatment happens.
Key Takeaways
- Bacterial pneumonia is treated with antibiotics taken by mouth at home or through an IV in the hospital, depending on severity.
- Viral pneumonia has no antibiotic treatment; recovery relies on rest, fluids, and managing fever and cough while your immune system clears the infection.
- A chest X-ray and sometimes blood or sputum tests identify the type of pneumonia and guide which medication your doctor prescribes.
- Hospitalization is needed when oxygen levels drop, breathing becomes difficult, or you have other serious health conditions that complicate recovery.
- Most people recover fully within two to four weeks, though fatigue and a lingering cough can last longer.
How antibiotics work for bacterial pneumonia
When bacteria cause pneumonia, antibiotics are the main treatment. Common choices include amoxicillin, azithromycin, or fluoroquinolones like levofloxacin, depending on which bacteria your doctor suspects and what you've taken before. The antibiotic kills or stops the growth of the bacteria, allowing your immune system to clear the infection and inflammation from your lungs.
You typically take antibiotics by mouth for seven to ten days. It is critical to finish the full course even if you feel better after a few days—stopping early can allow bacteria to survive and cause the infection to return or worsen. If you are hospitalized or very ill, antibiotics go into your vein (intravenously) so they reach high concentrations in your bloodstream quickly.
Your doctor may start you on a broad-spectrum antibiotic that covers multiple bacteria, then switch to a narrower one once lab results show exactly which bacteria is causing your pneumonia. This approach balances speed with precision.
Why viral pneumonia cannot be cured with antibiotics
Viruses that cause pneumonia—including influenza, respiratory syncytial virus (RSV), and coronaviruses—do not respond to antibiotics. Antibiotics only kill bacteria or stop their growth. Against viruses, they do nothing, which is why your doctor will not prescribe them for confirmed viral pneumonia.
Instead, treatment focuses on supporting your body while your immune system fights the infection. This means rest, fluids, fever management with acetaminophen or ibuprofen, and cough suppressants if needed. Oxygen support becomes necessary if your blood oxygen level drops below safe ranges. Most people recover within two to three weeks, though some experience lingering fatigue or a dry cough for weeks afterward.
A small number of people with severe viral pneumonia may receive antiviral medications—such as oseltamivir (Tamiflu) for influenza—but only if started very early in the illness. These drugs reduce symptom duration and severity but do not cure the infection outright.
When hospitalization is necessary
You may need hospital care if your oxygen level falls below 90 percent, you have difficulty breathing at rest, your blood pressure drops, or you are confused or disoriented. People over 65, those with chronic heart or lung disease, and those with weakened immune systems are admitted more readily because their bodies struggle to fight pneumonia alone.
In the hospital, you receive intravenous antibiotics (for bacterial pneumonia), supplemental oxygen through a mask or nasal tube, and continuous monitoring of your heart rate, blood pressure, and oxygen levels. Doctors watch for complications like sepsis, respiratory failure, or fluid around the lungs (pleural effusion). If your lungs cannot oxygenate your blood adequately, a ventilator may be needed temporarily to do that work for you.
Hospital stays typically last three to seven days for uncomplicated pneumonia, though severe cases may require longer. Once you can breathe adequately, maintain your oxygen level, and take oral medications, you go home to finish recovery.
Supporting your recovery at home
Whether you are treated at home or discharged from the hospital, the foundation of recovery is rest, hydration, and time. Your lungs need weeks to fully clear inflammation and repair damage, even after the infection is gone. Drink plenty of water and other fluids to loosen secretions in your airways and make coughing more productive.
Use a humidifier or breathe steam from a hot shower to ease congestion. Over-the-counter cough suppressants can help you sleep, though coughing up mucus is actually part of healing—do not suppress it entirely. Acetaminophen or ibuprofen manage fever and body aches. Avoid smoking and secondhand smoke, which irritate healing lungs.
Return to normal activity gradually. Most people feel well enough for light activity within a week or two but should avoid strenuous exercise for three to four weeks. If you develop worsening shortness of breath, chest pain, or confusion after going home, seek medical care immediately.
Fungal pneumonia and other less common causes
Fungal pneumonia is uncommon but occurs in people with weakened immune systems—such as those with advanced HIV, on immunosuppressive medications, or recovering from organ transplants. Geographic fungi like coccidioides (in the southwestern United States) and histoplasma (in river valleys) can also cause pneumonia in anyone exposed. Treatment uses antifungal medications like fluconazole or itraconazole, taken for weeks to months depending on the fungus and severity.
Atypical bacteria like mycoplasma and chlamydia cause pneumonia that looks similar to typical bacterial pneumonia on X-ray but may respond differently to antibiotics. Macrolide antibiotics like azithromycin or fluoroquinolones are often used. Your doctor may suspect atypical bacteria based on your symptoms—a gradual onset, prominent cough, and mild fever—and choose antibiotics accordingly.
What to expect during recovery
Improvement usually begins within 48 to 72 hours of starting antibiotics for bacterial pneumonia—fever drops, breathing becomes easier, and you feel more alert. However, the X-ray may not look normal for weeks, and your cough may persist for three to four weeks even after you feel well. This is normal and does not mean the infection is still active.
Fatigue is common during recovery. Your body has been fighting a serious infection, and energy returns gradually over weeks. Return to work or school only when your fever is gone and you can manage daily tasks without exhaustion. Some people experience post-pneumonia syndrome—persistent fatigue, shortness of breath, or chest pain—that can last months, particularly after severe illness.
Follow up with your doctor one to four weeks after treatment ends, especially if you are over 65 or have chronic health conditions. A follow-up X-ray confirms the pneumonia has cleared and rules out underlying problems like lung cancer that might have been masked by the infection.
Frequently Asked Questions
Can pneumonia go away on its own without treatment?
Mild viral pneumonia sometimes resolves without treatment in healthy people, though recovery takes longer and the risk of complications is higher. Bacterial pneumonia almost always requires antibiotics—without them, the infection can spread to the bloodstream or worsen into sepsis. Never assume pneumonia will clear on its own; see a doctor for diagnosis and treatment guidance.
How long does it take for antibiotics to work?
Most people feel noticeably better within two to three days of starting antibiotics—fever drops, breathing improves, and energy returns. However, you should take the full course (usually seven to ten days) even after feeling well, because bacteria can survive and cause relapse if treatment stops early.
What happens if the first antibiotic does not work?
If you do not improve after three to five days, contact your doctor. They may switch you to a different antibiotic based on lab results, adjust the dose, or investigate whether something else is causing your symptoms. Occasionally, a second infection or complication like fluid around the lungs requires additional treatment.
Is pneumonia contagious after I start treatment?
Bacterial pneumonia is less contagious once antibiotics begin working, usually within 24 hours. Viral pneumonia remains contagious for several days even after you start feeling better. Wash your hands frequently, cover your cough, and avoid close contact with others—especially older people and those with weak immune systems—for at least a week.
Can I exercise while recovering from pneumonia?
Rest is essential during the acute phase. Once fever is gone and breathing feels normal, light activity like short walks is fine. Avoid strenuous exercise, sports, or heavy lifting for three to four weeks, as pushing too hard can delay healing or trigger a relapse. Gradually increase activity as energy returns.