The first steps when pneumonia is suspected

If you think you have pneumonia, contact your doctor or visit an urgent care clinic as soon as you can. Pneumonia needs to be confirmed by a medical professional — usually through a chest X-ray or sometimes a CT scan — because the symptoms (cough, fever, chest pain, shortness of breath) can look like other respiratory infections. Your doctor will listen to your lungs with a stethoscope and ask about how long you've been sick and what your symptoms are.

Do not wait if you are having severe symptoms: go to an emergency room if you cannot catch your breath, have chest pain that feels sharp or crushing, are coughing up blood, or feel confused or very drowsy. These can be signs that pneumonia is affecting your oxygen levels or spreading.

If you are older than 65, have a chronic illness like diabetes or heart disease, or have a weakened immune system, tell your doctor immediately. These conditions make pneumonia more serious and change how your treatment should work.

Key Takeaways

  • See a doctor to confirm pneumonia with a chest X-ray; do not assume a persistent cough is just bronchitis or a cold.
  • Go to the emergency room if you have severe shortness of breath, chest pain, confusion, or are coughing up blood.
  • Most bacterial pneumonia is treated with antibiotics, which work best when started early; viral pneumonia usually improves with rest and supportive care.
  • Recovery takes weeks even after you feel better, and returning to normal activity too quickly can cause a relapse.
  • Vaccines for pneumococcal pneumonia and the flu reduce your risk of getting pneumonia in the future.

How doctors treat bacterial versus viral pneumonia

Your doctor will determine whether your pneumonia is caused by bacteria or a virus, because the treatment is different. Bacterial pneumonia is treated with antibiotics — medicines that kill the bacteria causing the infection. Common antibiotics for pneumonia include amoxicillin, azithromycin, or fluoroquinolones like levofloxacin. Your doctor will prescribe the antibiotic based on which bacteria is most likely causing your pneumonia and whether you have any allergies.

Viral pneumonia cannot be treated with antibiotics because antibiotics do not work against viruses. Instead, your body's immune system fights the infection while you rest and stay hydrated. Your doctor may prescribe an antiviral medicine if the pneumonia is caused by the flu virus (influenza), but for most other viral pneumonias, treatment focuses on managing your symptoms — fever reducers, cough medicine, and oxygen if your blood oxygen drops too low.

If you start antibiotics, take the full course even if you feel better after a few days. Stopping early can allow the bacteria to come back and become resistant to the antibiotic, making it harder to treat next time.

Managing symptoms while you recover

Rest is the most important part of recovery. Your body needs energy to fight the infection, so avoid work, school, and strenuous activity until your doctor says it is safe to return. Most people need at least one to two weeks of rest, even if symptoms improve sooner.

Drink plenty of fluids — water, warm tea, broth, or juice — to help loosen mucus in your lungs and prevent dehydration. Use a humidifier or breathe steam from a hot shower to ease congestion and coughing. Over-the-counter fever reducers like acetaminophen or ibuprofen can help with fever and body aches, but follow the dosage on the package and do not exceed the maximum daily amount.

Cough suppressants may help you sleep, but coughing is actually your body's way of clearing mucus from your lungs, so do not suppress it completely during the day. If your cough is keeping you awake at night, ask your doctor which cough medicine is safe for you.

When you might need to go to the hospital

Most people with pneumonia recover at home, but some need hospital care. Your doctor may recommend hospitalization if your oxygen level is too low, you are having trouble breathing, you are very weak or confused, you are older than 65, or you have other serious health conditions like heart disease or diabetes.

In the hospital, you will receive oxygen through a mask or nasal tube to keep your blood oxygen level high enough. You will also receive intravenous (IV) antibiotics if your pneumonia is bacterial, which work faster than pills. Doctors will monitor your heart rate, blood pressure, and oxygen level continuously to make sure you are improving.

Hospital stays for pneumonia typically last three to seven days, depending on how severe the infection is and how quickly you improve. Your doctor will discharge you when your oxygen level is stable without extra oxygen, you can eat and drink without difficulty, and you are strong enough to continue recovery at home.

What to expect during recovery at home

Recovery from pneumonia is slower than most people expect. Even after your fever is gone and you feel better, your lungs are still healing. Fatigue, a lingering cough, and shortness of breath with activity can last for weeks or even months, especially if the pneumonia was severe.

Do not rush back to normal activity. Returning to work, exercise, or heavy lifting too soon can cause a relapse or lead to complications like bronchitis or another pneumonia infection. Most doctors recommend waiting at least one week after your fever is gone before returning to work, and longer before returning to strenuous exercise.

Follow up with your doctor one to four weeks after your diagnosis to make sure you are healing properly. Your doctor may order another chest X-ray to confirm that the infection has cleared. If you are not improving or your symptoms get worse, contact your doctor right away.

Preventing pneumonia in the future

Two vaccines can reduce your risk of getting pneumonia: the pneumococcal vaccine (which protects against the most common bacterial cause of pneumonia) and the flu vaccine (which prevents influenza, a virus that often leads to pneumonia). The pneumococcal vaccine is recommended for all adults over 65 and for younger adults with chronic illnesses, weakened immune systems, or smoking history. The flu vaccine is recommended for everyone over six months old, especially during flu season (October through March in the Northern Hemisphere).

Beyond vaccination, you can lower your pneumonia risk by not smoking, washing your hands regularly, avoiding close contact with people who are sick, and managing chronic conditions like asthma, diabetes, or heart disease. If you have a weakened immune system due to HIV, cancer treatment, or an organ transplant, talk to your doctor about additional steps to prevent pneumonia.

Complications that can develop

Most people recover from pneumonia without complications, but some develop secondary problems. Pleural effusion occurs when fluid builds up around the lungs and may need to be drained. Bacteremia happens when bacteria enter the bloodstream and spread to other parts of the body, causing sepsis — a life-threatening condition. Acute respiratory distress syndrome (ARDS) is a severe condition where the lungs fill with fluid and cannot deliver enough oxygen to the blood.

Signs of complications include worsening shortness of breath despite treatment, chest pain that gets worse, confusion, or a very high fever that does not come down with fever reducers. If you notice any of these, go to the emergency room or call 911 immediately.

Frequently Asked Questions

How long does it take to recover from pneumonia?

Most people feel better within one to two weeks of starting treatment, but full recovery takes four to six weeks or longer. A lingering cough and fatigue are normal and do not mean the infection is still active. If symptoms are not improving after four weeks, contact your doctor.

Can I catch pneumonia from someone else?

Yes, if the pneumonia is caused by a contagious virus or bacteria. You can spread it through respiratory droplets when you cough or sneeze. Stay home and away from others for at least 24 hours after starting antibiotics (for bacterial pneumonia) or until your fever is gone (for viral pneumonia).

What should I do if antibiotics are not working?

Contact your doctor if you are not improving after three to five days of antibiotics. Your doctor may switch you to a different antibiotic, order tests to identify the exact bacteria causing the infection, or check for complications like pleural effusion. Do not stop taking your current antibiotic without talking to your doctor first.

Is it safe to exercise while recovering from pneumonia?

Wait at least one week after your fever is gone before doing any exercise. Start with light activity like short walks, and increase gradually over several weeks. If you feel short of breath, dizzy, or more tired after activity, you are doing too much — slow down and rest more.

Do I need a follow-up appointment after pneumonia?

Yes, most doctors recommend a follow-up visit one to four weeks after diagnosis to confirm the infection has cleared and check for complications. This is especially important if you are over 65, have chronic health conditions, or had severe pneumonia that required hospitalization.