Pneumonia is inflammation and fluid in your lungs caused by a bacterial, viral or fungal infection. It makes it difficult to breathe and can cause a fever and cough with yellow, green or bloody mucus. The flu, COVID-19 and pneumococcal disease are common causes of pneumonia. Treatment depends on the cause and severity of pneumonia.
Pneumonia is an infection in your lungs caused by bacteria, viruses or fungi. Pneumonia causes your lung tissue to swell (inflammation) and can cause fluid or pus in your lungs. Bacterial pneumonia is usually more severe than viral pneumonia, which often resolves on its own.
Pneumonia can affect one or both lungs. Pneumonia in both of your lungs is called bilateral or double pneumonia.
Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy
While all pneumonia is inflammation caused by an infection in your lungs, you may have different symptoms depending on whether the root cause is a virus, bacteria or fungi.
Bacterial pneumonia tends to be more common and more severe than viral pneumonia. It’s more likely to require a hospital stay. Providers treat bacterial pneumonia with antibiotics. Viral pneumonia causes flu-like symptoms and is more likely to resolve on its own. You usually don’t need specific treatment for viral pneumonia.
We categorize pneumonia by which pathogen (virus, bacteria or fungi) caused it and how you got it — community-acquired, hospital-acquired or ventilator-associated pneumonia.
When you get pneumonia outside of a healthcare facility, it’s called community-acquired pneumonia. Causes include:
You can get hospital-acquired pneumonia (HAP) while in a hospital or healthcare facility for another illness or procedure. HAP is usually more serious than community-acquired pneumonia because it’s often caused by antibiotic-resistant bacteria, like methicillin-resistant Staphylococcus aureus (MRSA). This means HAP can make you sicker and be harder to treat.
You can get HCAP while in a long-term care facility (such as a nursing home) or outpatient, extended-stay clinics. Like hospital-acquired pneumonia, it’s usually caused by antibiotic-resistant bacteria.
If you need to be on a respirator or breathing machine to help you breathe in the hospital (usually in the ICU), you’re at risk for ventilator-associated pneumonia (VAP). The same types of bacteria as community-acquired pneumonia, as well as the drug-resistant kinds that cause hospital-acquired pneumonia, cause VAP.
Aspiration is when solid food, liquids, spit or vomit go down your trachea (windpipe) and into your lungs. If you can’t cough these up, your lungs can get infected.
It can be difficult to tell the difference between the symptoms of a cold, the flu and pneumonia, and only a healthcare provider can diagnose you. As pneumonia can be life-threatening, it’s important to seek medical attention for serious symptoms that could be signs of pneumonia, such as:
You’re at an increased risk of pneumonia if you:
Anyone can get pneumonia. It’s a common illness, with millions of people diagnosed each year in the United States. About 55,000 people die each year of pneumonia in the U.S. It’s the most common cause of death in developing countries.
Symptoms of pneumonia depend on the cause. Symptoms can range from mild to severe. Babies, young children and older adults may have different symptoms.
Symptoms of bacterial pneumonia can develop gradually or suddenly. Symptoms include:
Symptoms of viral pneumonia usually develop over several days. You might have symptoms similar to bacterial pneumonia or you might additionally have:
Babies and newborns may not show any symptoms of pneumonia or their symptoms may be different from adults, including:
Signs you can look for in babies and young children include:
Adults over 65 or those with weakened immune systems may have mild or less noticeable symptoms of pneumonia (like cough and shortness of breath). Symptoms of ongoing health conditions may worsen. Older adults may experience:
Pneumonia can develop when your immune system attacks an infection in the small sacs of your lung (alveoli). This causes your lungs to swell and leak fluids.
Many bacteria, viruses and fungi can cause the infections that lead to pneumonia. Bacteria are the most common cause in adults and viruses are the most common cause in school-aged children. Common illnesses that can lead to pneumonia include:
Pneumonia itself isn’t actually contagious, but the bacteria and viruses that cause it are. For instance, the flu is contagious and can lead to pneumonia, but most people who get the flu won’t get pneumonia.
The bacteria that most commonly causes pneumonia, Streptococcus pneumoniae, can be spread from person to person by touching infected surfaces or through coughing and sneezing.
Pneumonia caused by fungi isn’t contagious. Fungal infections aren’t spread from person to person like viruses and bacteria.
To diagnose pneumonia, a healthcare provider will ask about your health history and conduct a physical exam. They’ll listen to your lungs with a stethoscope and may perform or order additional tests. These include imaging (like chest X-rays), pulse oximetry (checking oxygen levels in your blood), blood tests or sputum (spit) tests.
Even if your healthcare provider confirms that you have pneumonia, sometimes, they can’t find the exact cause.
Your provider may perform tests that look at your lungs for signs of infection, measure how well your lungs are working and examine blood or other body fluids to try to determine the cause of your pneumonia. These include:
Treatment for pneumonia depends on the cause — bacterial, viral or fungal — and how serious your case is. In many cases, the cause can’t be determined and treatment is focused on managing symptoms and making sure your condition doesn’t get worse.
Some treatments may include:
Viral pneumonia often goes away on its own, but you should always follow your healthcare provider’s recommendations to treat symptoms and reduce your risk of serious complications.
Over-the-counter medications and other at-home treatments can help you feel better and manage the symptoms of pneumonia, including:
How soon you’ll feel better depends on:
If you’re otherwise healthy, most symptoms of bacterial pneumonia usually begin to improve within 24 to 48 hours after starting treatment. You might start to feel better after a few days of treatment for viral pneumonia. Some symptoms, like cough and fatigue, may linger for several weeks.
If you have bacterial pneumonia, you’re no longer considered contagious when your fever is gone and you’ve been on antibiotics for at least two days. If you have viral pneumonia, you’re still considered contagious until you feel better and have been free of fever for several days.
The best way to prevent pneumonia is to get vaccinated against bacteria and viruses that commonly cause it. There are also everyday precautions you can take to help reduce your risk of pneumonia.
There are two types of vaccines (shots) that prevent pneumonia caused by pneumococcal bacteria. Similar to a flu shot, these vaccines won’t protect against all types of pneumonia, but if you do get sick, it’s less likely to be severe.
In addition to getting vaccinated, you can reduce your risk of getting and spreading pneumonia with some healthy habits:
If you’re otherwise healthy, you can recover quickly from pneumonia when you get prompt care. However, pneumonia can be life-threatening if left untreated, especially if you have an underlying health condition.
Even people who’ve been successfully treated and have fully recovered may face long-term health issues. After recovering from pneumonia, you may experience:
Children who’ve recovered from pneumonia have an increased risk of chronic lung diseases.
Follow up with your healthcare provider if you have ongoing health concerns after recovering from pneumonia.
Pneumonia can lead to serious complications that can require hospitalization, including:
If you have a severe case of pneumonia or complications, you may need to stay in the hospital for treatment. You’re more likely to be hospitalized for pneumonia if you’re:
It may take six to eight weeks to feel back to normal if you’ve been hospitalized with pneumonia.
You can help yourself feel better while you have pneumonia by:
If at any time you start to feel worse, call your doctor right away.
As you begin to recover from pneumonia, your temperature will probably return to normal first. After that, you may notice that you’re coughing up less mucus. Feeling like you’re up to returning to some of your normal activities is a good sign that you’re improving.
You can typically resume your normal activities if your symptoms are gone, mild or improving and you don’t have new or worsening:
If you’re generally healthy, most people feel well enough to return to previous activities in about a week. However, it may take about a month to feel totally back to normal.
Especially if you’ve been sick or have an underlying health condition, call your doctor if you have new or worsening:
Go to the emergency room or call 911 if you:
Yes, while fever is common in pneumonia, it’s possible to have pneumonia with a low fever or no fever. This is more likely if you:
Pneumonia isn’t usually treated any differently in children. However, young children can be at higher risk for severe illness from pneumonia. They’re more likely to be hospitalized for treatment than adults.
A note from Cleveland Clinic
With so many causes and varying symptoms, pneumonia can feel confusing. It can be worrying to wonder if your symptoms mean something more serious is going on. A high fever, bloody or unusually colored mucus, chest pain and shortness of breath are symptoms you shouldn’t ignore. Don’t hesitate to get medical attention when your body is telling you that something isn’t right.
Last reviewed by a Cleveland Clinic medical professional on 11/15/2022.
Learn more about our editorial process.