How Pneumonia Is Treated: Bacterial, Viral & Fungal

Pneumonia treatment depends on what’s causing the infection. Bacterial pneumonia requires antibiotics, viral pneumonia may need antiviral medication, and fungal pneumonia calls for antifungal drugs. Most cases caught early can be treated at home with medication, rest, and fluids, but severe cases require hospitalization. The approach your doctor takes will hinge on the type of pneumonia, how sick you are, and whether you have other health conditions.

How Pneumonia Is Diagnosed

Before treatment begins, your doctor needs to confirm the diagnosis and figure out what’s causing it. A chest X-ray is the primary tool. It shows the location and extent of infection in your lungs, though it can’t identify which germ is responsible. If your pneumonia isn’t improving as expected, a CT scan gives a more detailed look.

Pulse oximetry, the clip placed on your finger, measures how much oxygen is reaching your blood. Pneumonia can interfere with your lungs’ ability to transfer oxygen, and a reading below 94% typically signals the need for supplemental oxygen. Your doctor may also order a sputum test, where you cough up a sample of mucus from deep in your lungs so the lab can identify the specific organism causing the infection. In some cases, fluid that has collected around the lungs is drawn out with a needle for analysis.

Antibiotic Treatment for Bacterial Pneumonia

Most community-acquired pneumonia is bacterial, and antibiotics are the cornerstone of treatment. Current guidelines recommend combinations of antibiotics that target a broad range of bacteria. For people treated at home, oral antibiotics are standard. For hospitalized patients, stronger intravenous antibiotics are used initially before switching to oral medication as symptoms improve.

A typical course of antibiotics lasts around 12 days on average, though your doctor may prescribe a shorter or longer course depending on how quickly you respond. You’ll usually start feeling better within a few days, but finishing the full course is important to clear the infection completely and reduce the chance of antibiotic resistance. If your symptoms aren’t improving after two or three days on antibiotics, your doctor may switch to a different medication or order additional tests.

Treatment for Viral Pneumonia

Viral pneumonia, often caused by influenza or other respiratory viruses, doesn’t respond to antibiotics. When the cause is the flu, antiviral medications can help, but timing matters. These drugs work best when started within 48 hours of the first symptoms. Waiting longer reduces their effectiveness significantly.

For many viral pneumonias, there’s no specific antiviral available, and treatment focuses on managing symptoms while your immune system fights off the infection. This means controlling fever, staying hydrated, and resting. Viral pneumonia can also set the stage for a secondary bacterial infection, so your doctor may monitor you closely and add antibiotics if that happens.

Fungal Pneumonia

Fungal lung infections are less common and typically affect people with weakened immune systems. Treatment involves antifungal medications, and it tends to be much longer than antibiotic courses. Depending on the type of fungus, treatment can last anywhere from several weeks to many months. One common fungal infection requires a median of about 84 days of antifungal therapy, and some patients stay on medication for much longer. Your doctor will monitor your response with imaging and blood tests to determine when it’s safe to stop.

When Hospital Treatment Is Needed

Doctors use severity scoring systems to decide whether you need to be admitted. The key warning signs they evaluate include confusion or disorientation, rapid breathing (30 breaths per minute or more), low blood pressure, and age 65 or older. The more of these factors you have, the more likely hospitalization is necessary. People with chronic lung disease, heart conditions, diabetes, or weakened immune systems also face higher risk of complications.

In the hospital, treatment goes beyond antibiotics. If your blood oxygen level drops below 94%, you’ll receive supplemental oxygen, typically through a nasal tube delivering 2 to 6 liters per minute, or through a face mask at higher flow rates. For more severe cases, non-invasive ventilation (a pressurized mask that helps push air into your lungs) can reduce the risk of needing a breathing tube, shorten ICU stays, and lower mortality. Intravenous fluids help maintain hydration, especially if fever and rapid breathing have increased fluid loss.

Managing Symptoms at Home

If your pneumonia is mild enough to treat at home, the basics matter. Rest is not optional. Your body is fighting a serious infection, and pushing through normal activities can slow recovery or lead to a setback. Over-the-counter pain relievers and fever reducers like acetaminophen or ibuprofen can help you stay comfortable.

Cough suppressants are a more complicated question. Coughing is actually one of the ways your lungs clear debris and mucus from the infection. Suppressing that reflex may prolong recovery by trapping infected material in your airways. For children especially, cough medications containing codeine derivatives or antihistamines carry risks of serious side effects, including altered heart rate and excessive drowsiness, and are not recommended.

Staying hydrated makes intuitive sense. Fever increases fluid loss, rapid breathing evaporates moisture from your airways, and you may not feel like eating or drinking much. That said, there’s no strong clinical evidence proving that drinking extra fluids speeds recovery, and some observational studies suggest that aggressively increasing fluid intake in lower respiratory infections could potentially cause harm. The practical takeaway: drink enough to stay hydrated and replace what you’re losing, but don’t force excessive amounts.

What Recovery Looks Like

Recovery from pneumonia is slower than most people expect. Some people feel better and return to normal routines within one to two weeks. For others, it takes a month or longer. Even after the infection has cleared, most people continue to feel tired for about a month. This lingering fatigue is normal and doesn’t necessarily mean the infection is still active.

Your age, overall health, and the severity of the infection all influence how fast you bounce back. Younger, otherwise healthy adults tend to recover faster. Older adults and people with chronic conditions may need several weeks before they feel like themselves again. If you were hospitalized, expect a longer recovery. Returning to exercise and physically demanding work should be gradual. Pushing too hard too soon is one of the most common mistakes during recovery.

Preventing Pneumonia

Vaccination is the most effective prevention tool. The CDC recommends pneumococcal vaccines for all adults 50 and older who haven’t previously received one. Several vaccine options exist. The newer vaccines (PCV20 and PCV21) require only a single dose to complete your pneumococcal vaccination. An older option (PCV15) requires a follow-up dose of a second vaccine about a year later.

Adults younger than 50 may also need pneumococcal vaccination if they have conditions that raise their risk, such as immune system disorders, cochlear implants, or cerebrospinal fluid leaks. The annual flu vaccine also matters, since influenza is a common cause of viral pneumonia and can weaken your lungs enough to let bacterial pneumonia take hold. Basic hygiene, including regular handwashing and avoiding close contact with sick individuals, rounds out a practical prevention strategy.