How pneumonia is treated depends on what caused it and how severe it is

Treatment for pneumonia falls into three main paths: antibiotics for bacterial pneumonia, supportive care for viral pneumonia (which antibiotics cannot treat), and hospitalization for severe cases. Your doctor determines which path based on the type of pneumonia, your age, other health conditions, and how sick you are. Most people with mild to moderate pneumonia recover at home with rest and medication. Severe pneumonia requires hospital care, sometimes including oxygen or a ventilator.

The first step is usually a chest X-ray or CT scan to confirm pneumonia and rule out complications. Your doctor may also order blood tests or a sputum culture to identify the bacteria or virus causing it. This information guides treatment choice. Bacterial pneumonia responds to specific antibiotics; viral pneumonia does not, so treatment focuses on managing symptoms while your immune system fights the infection.

Key Takeaways

  • Bacterial pneumonia is treated with antibiotics; viral pneumonia requires supportive care like rest, fluids, and fever management.
  • Mild pneumonia is usually treated at home, but severe pneumonia requires hospitalization and may need oxygen support.
  • You should start feeling better within three to five days of starting antibiotics if you have bacterial pneumonia, though full recovery takes weeks.
  • Complications like sepsis or respiratory failure can develop, which is why follow-up care and watching for worsening symptoms matters.
  • Your doctor will tell you when it is safe to return to normal activity; returning too soon can trigger relapse.

Antibiotics for bacterial pneumonia

If your doctor determines you have bacterial pneumonia, you will receive an antibiotic. The specific antibiotic depends on which bacteria is causing the infection. Amoxicillin or amoxicillin-clavulanate are common first choices for community-acquired pneumonia in adults. If you are allergic to penicillin, your doctor may prescribe fluoroquinolones like levofloxacin or macrolides like azithromycin instead.

Antibiotics come as pills, liquids, or injections. Oral antibiotics work for mild to moderate pneumonia at home. Severe pneumonia or pneumonia in hospitalized patients often starts with intravenous antibiotics. You take antibiotics for seven to ten days, even if you feel better after three or four days. Stopping early allows bacteria to survive and can cause the infection to return or become resistant to the antibiotic.

Tell your doctor about any allergies or other medications you take, because some antibiotics interact with birth control, blood thinners, or other drugs. Side effects like nausea, diarrhea, or rash are common but usually mild. Severe reactions like difficulty breathing or swelling of the face require immediate medical attention.

Supportive care for viral pneumonia

Viral pneumonia cannot be treated with antibiotics because antibiotics kill bacteria, not viruses. Instead, treatment focuses on managing symptoms and letting your immune system clear the infection. This means rest, fluids, fever management, and sometimes cough medicine or pain relievers.

Rest is the most important part of recovery. Your body needs energy to fight the infection, so avoid strenuous activity and sleep as much as possible. Drink water, broth, or other fluids to prevent dehydration and help loosen mucus in your lungs. Over-the-counter pain relievers like acetaminophen or ibuprofen reduce fever and body aches. Cough medicine containing dextromethorphan can help you sleep at night, though coughing is your body's way of clearing mucus, so do not suppress it completely during the day.

Viral pneumonia usually improves within one to three weeks. If symptoms worsen or do not improve after a week, contact your doctor. Sometimes a viral infection is followed by a secondary bacterial infection, which then requires antibiotics.

When hospitalization is necessary

You need hospital care if pneumonia is severe or if you have risk factors that make complications more likely. Severe pneumonia means you have trouble breathing, low oxygen levels, confusion, very high fever, or signs of sepsis. Risk factors include age over 65, chronic heart or lung disease, diabetes, a weakened immune system, or recent surgery.

In the hospital, you receive oxygen through a mask or nasal tube to keep your blood oxygen level high enough. Doctors monitor your heart rate, blood pressure, and oxygen level continuously. You receive intravenous fluids and antibiotics. If your lungs fill with fluid or you cannot breathe on your own, you may need a ventilator — a machine that breathes for you while your lungs heal.

Hospital stays for pneumonia typically last three to seven days, though severe cases may be longer. Once your oxygen level is stable and you can eat and drink without difficulty, you go home to finish recovery.

What to expect during recovery

If you have bacterial pneumonia and start antibiotics, you should notice improvement within three to five days. Fever usually drops, breathing becomes easier, and you feel less exhausted. However, full recovery takes longer — usually two to four weeks for mild pneumonia and six weeks or more for severe cases.

During recovery, continue taking all prescribed antibiotics even after you feel better. Fatigue is normal and can last weeks after the infection clears. Do not rush back to work or strenuous exercise. Your doctor will tell you when it is safe to resume normal activity. Returning too soon can trigger a relapse or lead to complications.

A persistent cough is common after pneumonia and can last for weeks or even months. This does not mean the infection is still active — it is your lungs clearing damaged tissue. If the cough worsens, you develop new fever, or you have chest pain, contact your doctor.

Complications and warning signs

Most people recover without complications, but pneumonia can lead to serious problems if not treated or if treatment is delayed. Sepsis occurs when the infection spreads to the bloodstream and causes a dangerous whole-body response. Signs include very high fever, confusion, rapid heartbeat, and low blood pressure. Sepsis requires immediate hospital care and antibiotics.

Respiratory failure happens when your lungs cannot get enough oxygen into your blood. This requires hospitalization and oxygen support or a ventilator. Pleural effusion is fluid that builds up around the lungs and may need to be drained. Empyema is when pus collects in the space around the lungs and requires antibiotics and sometimes drainage.

Seek immediate care if you develop severe shortness of breath, chest pain, confusion, very high fever that does not respond to medication, or coughing up blood. These are signs of serious complications.

Preventing pneumonia and reducing recurrence risk

Vaccines reduce your risk of certain types of pneumonia. The pneumococcal vaccine protects against bacterial pneumonia caused by Streptococcus pneumoniae. The flu vaccine reduces your risk of influenza, which can lead to viral pneumonia. People over 65, those with chronic diseases, and people with weakened immune systems should discuss vaccination with their doctor.

Other prevention steps include washing your hands regularly, avoiding smoke and air pollution, not smoking, staying up to date on vaccines, and managing chronic conditions like asthma or COPD. If you have a weakened immune system from HIV, cancer treatment, or medications, talk to your doctor about additional prevention strategies.

If you have had pneumonia before, you are at higher risk for recurrence. This is especially true if you smoke, have chronic lung disease, or have a weakened immune system. Your doctor may recommend additional preventive measures or closer monitoring.

Frequently Asked Questions

How long does it take to recover from pneumonia?

Mild pneumonia usually improves within one to two weeks with treatment, but full recovery takes two to four weeks. Severe pneumonia requires hospitalization and recovery can take six weeks or longer. Fatigue and a lingering cough are common even after the infection clears.

Can pneumonia go away on its own without treatment?

Viral pneumonia sometimes improves without treatment in young, healthy people, though recovery is slower and the risk of complications is higher. Bacterial pneumonia requires antibiotics — without them, the infection can worsen and lead to serious complications like sepsis or respiratory failure.

Is it safe to exercise while recovering from pneumonia?

No. Rest is essential during recovery. Your doctor will tell you when it is safe to return to normal activity, usually after symptoms have resolved and you have finished antibiotics. Returning to exercise too soon can trigger relapse or complications.

What should I do if my symptoms get worse after starting treatment?

Contact your doctor immediately. Worsening symptoms can mean the antibiotic is not working, you have a complication, or you have a secondary infection. Do not wait — call your doctor or go to urgent care or the emergency room if you have severe shortness of breath, chest pain, or confusion.

Can pneumonia come back after treatment?

Yes, recurrence is possible, especially if you stop antibiotics early, return to activity too soon, or have risk factors like smoking or chronic lung disease. Complete your full course of antibiotics and follow your doctor's guidance on recovery time to reduce recurrence risk.