Pneumonia requires a doctor's diagnosis and treatment — you cannot cure it on your own

Pneumonia is a lung infection that needs medical attention. A doctor must examine you, often with a chest X-ray, to confirm pneumonia and decide what treatment you need. The treatment depends on what caused the infection — bacterial pneumonia is treated with antibiotics, viral pneumonia with supportive care, and fungal pneumonia with antifungal medication. There is no over-the-counter cure, and delaying medical care can lead to serious complications.

If you have symptoms like persistent cough, chest pain, fever, or shortness of breath, contact your doctor or go to an urgent care clinic or emergency room. The sooner you get diagnosed, the sooner treatment can begin and the faster you typically recover.

Key Takeaways

  • A doctor must diagnose pneumonia with an exam and usually a chest X-ray before any treatment starts.
  • Bacterial pneumonia is treated with antibiotics prescribed by a doctor, and you must take the full course even if you feel better.
  • Viral pneumonia has no specific medication but improves with rest, fluids, and time while your immune system fights the infection.
  • Supportive care — rest, hydration, fever management — helps your body recover but does not replace medical treatment.
  • Complications like sepsis or respiratory failure can develop quickly, so seek medical care immediately if symptoms worsen.

How doctors diagnose pneumonia

Your doctor will listen to your lungs with a stethoscope and ask about your symptoms and how long you have had them. They will likely order a chest X-ray to see inflammation or fluid in your lungs. A blood test or sputum culture may be done to identify whether the infection is bacterial, viral, or fungal.

This diagnosis step is essential because the treatment depends entirely on the cause. A bacterial infection requires antibiotics. A viral infection does not respond to antibiotics and instead requires your immune system to clear it. A fungal infection requires different medication altogether. Without knowing what you have, treatment cannot begin.

Antibiotic treatment for bacterial pneumonia

If your doctor determines you have bacterial pneumonia, they will prescribe an antibiotic. Common choices include amoxicillin, azithromycin, or fluoroquinolones, depending on the bacteria involved and your medical history. The antibiotic is prescribed for a specific number of days — typically 7 to 10 days — and you must take the full course even if you feel better after a few days.

Stopping antibiotics early allows bacteria to survive and multiply, which can lead to treatment failure and a return of symptoms. Take the medication exactly as prescribed, at the times specified, and do not skip doses. If you have side effects or the medication is not working after several days, contact your doctor rather than stopping on your own.

Managing viral pneumonia

Viral pneumonia has no specific medication to kill the virus. Instead, treatment focuses on supporting your body while your immune system fights the infection. This means rest, drinking plenty of fluids, and managing fever and pain with over-the-counter medications like acetaminophen or ibuprofen if your doctor approves.

Viral pneumonia typically takes longer to recover from than bacterial pneumonia — often two to three weeks. Your doctor may recommend a cough suppressant or expectorant to help you sleep, but these do not cure the infection. If your symptoms worsen or you develop signs of a secondary bacterial infection, contact your doctor immediately.

Supportive care that helps recovery

Whether your pneumonia is bacterial or viral, supportive care speeds recovery. Rest allows your body to direct energy toward fighting the infection. Drink water, broth, or other fluids throughout the day to prevent dehydration and help loosen mucus. Use a humidifier or breathe steam from a hot shower to ease congestion and coughing.

Avoid smoking and secondhand smoke, which irritate your lungs and slow healing. Do not return to work or strenuous activity until your doctor clears you — pushing too hard too soon can trigger a relapse or complications. If you have a chronic condition like asthma, heart disease, or diabetes, follow your doctor's instructions closely, as pneumonia poses greater risk for you.

When to seek emergency care

Go to an emergency room or call 911 if you experience severe shortness of breath, chest pain that worsens, confusion, loss of consciousness, or coughing up blood. These are signs of serious complications like sepsis, respiratory failure, or a collapsed lung. Do not wait to see if these symptoms improve on their own.

Also seek immediate care if you have pneumonia and your fever returns after improving, or if you develop new symptoms like severe chills or a rash. Older adults, young children, and people with weakened immune systems or chronic illnesses should contact their doctor at the first sign of pneumonia rather than waiting to see if it resolves.

Recovery timeline and when you can return to normal activity

Bacterial pneumonia treated with antibiotics usually improves within 48 to 72 hours, though you may feel tired for weeks. Viral pneumonia takes longer — often two to four weeks for full recovery. Even after you feel better, your lungs may still be healing, and pushing too hard can cause a setback.

Your doctor will tell you when it is safe to return to work, exercise, or other activities. This is typically after your fever is gone and your breathing is back to normal, but timing varies by person and severity. If you are still coughing or short of breath after two weeks, contact your doctor to make sure a complication has not developed.

Frequently Asked Questions

Can pneumonia go away on its own without treatment?

Some cases of mild viral pneumonia may improve without treatment, but bacterial pneumonia will not. Without antibiotics, bacterial pneumonia can worsen and lead to serious complications like sepsis or respiratory failure. The only safe approach is to see a doctor for diagnosis so you know what you are dealing with.

How long does pneumonia treatment take?

Bacterial pneumonia treated with antibiotics typically improves within a few days, though the full course of antibiotics lasts 7 to 10 days. Viral pneumonia has no specific treatment and usually takes two to four weeks to resolve. Full recovery, including return to normal energy levels, can take several weeks longer.

What if antibiotics are not working?

Contact your doctor if you do not feel better after three to five days of antibiotics or if you feel worse. Your doctor may switch you to a different antibiotic, order additional tests to identify the bacteria, or check for complications. Do not stop taking the antibiotic without talking to your doctor first.

Is it safe to exercise while recovering from pneumonia?

No. Rest is essential during pneumonia treatment and recovery. Exercise stresses your lungs and immune system when they are already working hard to fight infection. Wait until your doctor says your lungs have healed and your symptoms are completely gone before returning to physical activity.

Can I catch pneumonia again after I recover?

Yes, you can get pneumonia more than once. Recovery from one case does not provide lasting immunity. Vaccines exist for some types of pneumonia — your doctor can discuss whether pneumococcal or flu vaccines are right for you to reduce your risk.