Treatment depends on what caused your pneumonia and how sick you are

Pneumonia treatment falls into two main paths: bacterial pneumonia, which is treated with antibiotics, and viral pneumonia, which is not. Your doctor will figure out which one you have through a chest X-ray or sometimes a sputum test (coughing into a cup). If it is bacterial, antibiotics start working within 24 to 48 hours. If it is viral, treatment focuses on rest, fluids, and letting your immune system fight it — though some antivirals exist for specific viruses like influenza.

Severity matters. Mild pneumonia can often be treated at home with oral antibiotics and rest. Moderate to severe pneumonia usually means a hospital stay, where you get IV antibiotics, oxygen if your blood oxygen is low, and monitoring to make sure you are improving. Your age, other health conditions, and whether you live alone all factor into whether your doctor sends you home or admits you.

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 time for your immune system to clear the infection.
  • Your doctor uses a chest X-ray to confirm pneumonia and sometimes a sputum test to identify the bacteria causing it.
  • Hospitalization is common if you are over 65, have other chronic illnesses, or cannot safely rest and drink fluids at home.
  • Most people recover in two to four weeks, though fatigue and a lingering cough can last longer.

Antibiotics for bacterial pneumonia

If your doctor diagnoses bacterial pneumonia, you will receive an antibiotic. The most common first choice is amoxicillin or azithromycin for outpatient treatment. If you are hospitalized, you may receive ceftriaxone or levofloxacin through an IV. Your doctor picks based on what bacteria is most likely in your area and your age — pneumococcal bacteria and Haemophilus influenzae are the most common culprits.

You take oral antibiotics for 5 to 7 days at home. It is critical to finish the full course even if you feel better after a few days — stopping early lets bacteria survive and can lead to relapse or antibiotic resistance. If you are hospitalized, you typically stay for 2 to 5 days on IV antibiotics, then switch to pills at home to finish the course.

Side effects are usually mild: nausea, diarrhea, or a rash. Tell your doctor if you have a severe allergic reaction (difficulty breathing, swelling of the face or throat) or if you do not feel better after 48 hours of antibiotics — this can mean the bacteria is resistant or the diagnosis was wrong.

Oxygen and breathing support in the hospital

If your blood oxygen level drops below 90 percent, the hospital will give you supplemental oxygen through a nasal tube or mask. This is one of the main reasons people are admitted — pneumonia fills your air sacs with fluid, making it harder for oxygen to reach your bloodstream. Oxygen therapy brings that level back up and takes strain off your heart.

Most people recover with just nasal oxygen. If you have severe pneumonia or underlying lung disease, you may need a higher concentration of oxygen or even a ventilator (a machine that breathes for you) if your lungs cannot do the work. Ventilator use is uncommon in otherwise healthy adults but more likely if you are elderly or have conditions like COPD or heart disease.

Managing symptoms at home

Whether you are treated at home or after hospital discharge, symptom management speeds recovery. Rest is the foundation — your body is fighting infection, and sleep helps your immune system work. Drink plenty of fluids: water, broth, tea, or juice. Dehydration thickens the mucus in your lungs and makes coughing harder.

Over-the-counter pain relievers like acetaminophen or ibuprofen reduce fever and chest pain. A humidifier or steam from a hot shower can ease congestion. Avoid cough suppressants early on — coughing clears mucus from your lungs, which is part of healing. Once you are past the acute phase, a cough suppressant at night can help you sleep.

Watch for warning signs that mean you need to go to the hospital: worsening shortness of breath, chest pain that gets worse, confusion, or lips or fingernails turning blue. These mean your lungs are not getting enough oxygen or your infection is spreading.

Viral pneumonia and when antivirals are used

Viral pneumonia has no antibiotic treatment because antibiotics do not kill viruses. Most cases resolve on their own in one to three weeks with supportive care: rest, fluids, and fever management. Your immune system clears the virus gradually, and your lungs heal as the inflammation goes down.

Antivirals exist for certain viruses. If you have influenza pneumonia and start treatment within 48 hours of symptom onset, oseltamivir (Tamiflu) can shorten illness duration by a day or two. Antivirals for COVID-19 pneumonia are available but work best in the first week of illness. Your doctor will decide if antivirals are worth trying based on how sick you are and how long symptoms have been present.

The risk with viral pneumonia is secondary bacterial infection — after the virus damages your lungs, bacteria can move in. If you start feeling worse after a few days of improvement, or if you develop a high fever again, tell your doctor. This can mean a bacterial superinfection that needs antibiotics.

Recovery timeline and when to follow up

Most people feel noticeably better within 3 to 5 days of starting antibiotics. Fever usually breaks within 24 to 48 hours. However, full recovery takes longer. Fatigue and a dry cough can linger for 2 to 4 weeks after the acute infection clears. This is normal and does not mean the pneumonia is returning.

Your doctor may ask you to come back for a follow-up visit or a repeat chest X-ray, especially if you are over 65 or have chronic lung disease. This confirms the pneumonia has cleared. If you are not improving after a week of antibiotics, or if you get worse, contact your doctor — you may need a different antibiotic or imaging to check for complications like a pleural effusion (fluid around the lungs) or abscess.

Smokers and people with COPD, asthma, or heart disease recover more slowly and have higher risk of complications. If you fall into these groups, ask your doctor about a pneumonia vaccine to prevent future infections.

Frequently Asked Questions

Can pneumonia go away on its own without antibiotics?

Viral pneumonia does resolve without antibiotics. Bacterial pneumonia will not — it needs antibiotics to clear. Without treatment, bacterial pneumonia can worsen and lead to sepsis or respiratory failure. If your doctor diagnoses bacterial pneumonia, antibiotics are necessary.

How long do I have to take antibiotics?

The standard course is 5 to 7 days. Finish the entire course even if you feel better after a few days. Stopping early allows bacteria to survive and can cause relapse or resistance.

What if I am allergic to penicillin?

Tell your doctor before treatment starts. Alternatives include azithromycin, fluoroquinolones, or cephalosporins (if your allergy was not severe). Your doctor will pick based on your allergy history and local bacteria patterns.

Is it normal to still have a cough after antibiotics?

Yes. A dry cough can persist for weeks after the infection clears as your lungs heal. If the cough is productive (bringing up mucus), worsening, or accompanied by fever, contact your doctor — this could signal a complication or secondary infection.

When should I go back to work or normal activity?

Most people can return to light activity after fever breaks and they feel stable. Full return to strenuous activity usually takes 2 to 4 weeks. If you have a desk job, you may go back sooner than if your job is physically demanding. Ask your doctor what is safe for your situation.