Pneumonia
Pneumonia is a lung infection that causes inflammation and fluid buildup in the air sacs, making it hard to breathe. While it can affect anyone, it poses the greatest risk to young children, older adults, and people with certain health conditions.
Table of contents
- What is pneumonia?
- Types of pneumonia
- Symptoms
- Causes and how it spreads
- Who is at risk?
- How is pneumonia diagnosed?
- Treatment
- Recovery and what to expect
- Prevention
What is pneumonia?
Pneumonia is an infection in one or both lungs caused by bacteria, viruses, or fungi[1]. The infection causes the air sacs in your lungs, called alveoli (small balloon-like structures where oxygen enters your blood), to fill up with fluid or pus[1]. This makes it difficult to breathe and prevents oxygen from reaching your bloodstream as it should[1].
When germs reach your lungs, your immune system sends cells to attack them[14]. These cells cause the air sacs to become inflamed and fill with mucus and other liquids, which leads to breathing difficulty, fever, and cough[14].
Pneumonia can affect one or both lungs. When both lungs are affected, it is called bilateral or double pneumonia[1]. The severity of pneumonia can range from mild to life-threatening[2].
- Lungs
- Air sacs (alveoli)
Types of pneumonia
Pneumonia is classified based on what caused it and where you got the infection[1].
Community-acquired pneumonia (CAP)
When you get pneumonia outside of a healthcare facility, it is called community-acquired pneumonia[1]. This is the most common type and can be caused by bacteria, viruses, or fungi.
The most common bacterial cause is Streptococcus pneumoniae, also called pneumococcal disease[1]. Other bacteria that can cause community-acquired pneumonia include Mycoplasma pneumoniae (which causes a milder form called atypical pneumonia), Haemophilus influenzae, Chlamydia pneumoniae, and Legionella[1].
Viruses that cause the common cold, flu (influenza), COVID-19, and respiratory syncytial virus (RSV) can sometimes lead to pneumonia[1].
Hospital-acquired pneumonia (HAP)
You can get hospital-acquired pneumonia while you are in a hospital or healthcare facility for another illness or procedure[1]. This type is usually more serious than community-acquired pneumonia because it is often caused by antibiotic-resistant bacteria, such as methicillin-resistant Staphylococcus aureus (MRSA)[1].
Healthcare-associated pneumonia (HCAP)
This type can develop while you are in a long-term care facility like a nursing home or outpatient clinics[1]. Like hospital-acquired pneumonia, it is usually caused by antibiotic-resistant bacteria[1].
Ventilator-associated pneumonia (VAP)
If you need to be on a respirator or breathing machine to help you breathe in the hospital, you are at risk for ventilator-associated pneumonia[1].
Aspiration pneumonia
Aspiration happens when solid food, liquids, saliva, or vomit go down your windpipe and into your lungs instead of your stomach[1]. If you cannot cough these materials up, your lungs can become infected[1].
Walking pneumonia
Walking pneumonia is a milder case of pneumonia[5]. People with walking pneumonia may not even know they have it, and their symptoms may feel more like a mild respiratory infection[5]. However, it may require a longer recovery period[5]. The bacteria Mycoplasma pneumoniae most commonly causes this condition[5].
Symptoms
The symptoms of pneumonia can vary from mild to severe and may start suddenly or develop gradually over a few days[6].
Common symptoms include[2][6]:
- Cough that may produce yellow, green, or bloody mucus (also called phlegm or sputum)
- Shortness of breath or difficulty breathing
- Fever, sweating, and shaking chills
- Chest pain when you breathe or cough
- Fatigue and feeling very tired
- Loss of appetite
- Nausea, vomiting, or diarrhea
- An aching body
- Making wheezing noises when you breathe
Some people may also experience a lower than normal body temperature, especially older adults and people with weak immune systems[2]. Confusion or changes in mental awareness are common in adults age 65 and older[2].
In children, especially infants and toddlers, symptoms can be different[15]. They may include fast or hard breathing, fever, cough, chest pain, not wanting to eat, being very tired, upset stomach or vomiting, and babies may make grunting noises when breathing[6][15].
You should seek immediate medical attention if you are struggling to breathe, have pale or blue skin or lips, suddenly feel confused, or cannot wake a baby who feels floppy[6].
Causes and how it spreads
Pneumonia is usually caused by a bacterial or viral infection[6]. Your body typically protects your lungs from infection by filtering germs out of the air you breathe[14]. Pneumonia occurs when germs such as bacteria, viruses, or fungi manage to enter the lungs and your immune system attempts to fight the infection[14].
Bacterial pneumonia usually occurs when the body is weakened in some way[1]. Viral pneumonia is caused by viruses such as influenza (flu), and sometimes develops after you have had certain viral infections like a cold or the flu[8]. Fungal pneumonia is caused by inhaling fungi spores but is rare in healthy people[1].
Pneumonia is spread by infected people who carry germs in their throats, noses, or mouths[15]. The germs can be coughed into the air or spread on objects like door handles, toys, or cell phones[15]. You can catch pneumonia by breathing in these germs or by touching contaminated surfaces and then touching your mouth[15]. It is possible to catch pneumonia from someone who does not know they are sick[15].
Both viral and bacterial pneumonia are contagious and can spread from person to person through inhalation of airborne droplets from a sneeze or cough, or by coming into contact with contaminated surfaces or objects[5]. Fungal pneumonia is contracted from the environment and does not spread from person to person[5].
Who is at risk?
Anyone can develop pneumonia, but certain factors increase your risk[8].
Age is an important risk factor. Children who are 2 years old or younger and adults age 65 and older face a greater risk[8][14].
Several health conditions place people at risk for pneumonia because they often result in a weakened or suppressed immune system[14]. These conditions include[4][8][14]:
- Chronic obstructive pulmonary disease (COPD)
- Asthma
- Cystic fibrosis
- Heart failure
- Diabetes
- Sickle cell disease
- HIV/AIDS
- Cancer
- Conditions that require an organ, blood, or marrow stem cell transplant
Other risk factors include[8][14]:
- Smoking cigarettes
- Heavy alcohol use
- Being undernourished
- Exposure to certain chemicals, toxic fumes, or pollutants
- Being in a hospital, especially in an intensive care unit or on a ventilator
- Having trouble coughing or swallowing from a stroke or other condition
- Recently having been sick with a cold or the flu
How is pneumonia diagnosed?
Pneumonia can be challenging to diagnose because its symptoms resemble those of a cold or flu[14]. Your doctor will carefully review your medical history, ask questions about your symptoms, and conduct a full physical examination[14].
During the physical exam, your doctor will listen to your lungs with a stethoscope to check for abnormal sounds[8].
Your doctor may order additional tests, including[14]:
- Chest X-ray: This imaging test can show if there is inflammation in your lungs and help determine the extent and location of the infection
- Blood tests: These can help confirm an infection and try to identify the type of organism causing it
- Sputum culture: A sample of mucus coughed up from your lungs is collected and analyzed to identify the cause of the infection
- Pulse oximetry: This test measures the oxygen level in your blood using a sensor placed on your finger
- Computed tomography (CT) scan: This provides more detailed images of your lungs than an X-ray
- Bronchoscopy: In some cases, a thin, flexible tube with a camera is inserted into your airways to look directly at your lungs
Treatment
Treatment for pneumonia depends on the type and severity of the infection, your overall health, and your age[14].
Bacterial pneumonia
If your pneumonia is caused by bacteria, you will be treated with antibiotics[1][6]. It is very important to take all your antibiotics exactly as prescribed, even if you start to feel better[19]. If you stop too soon, the bacterial infection may come back and the bacteria may become resistant to the antibiotic, making treatment more difficult[16].
Viral pneumonia
Viral pneumonia causes flu-like symptoms and is more likely to resolve on its own[1]. You usually do not need specific treatment for viral pneumonia, although antiviral medicines may be prescribed in some cases[1].
Hospitalization
Most people with pneumonia can be treated at home[6]. However, you may need to go to the hospital for treatment if[6]:
- You are over 65 years old
- You have cardiovascular disease or a long-term lung condition
- Your baby or young child has pneumonia
- You are very unwell
In the hospital, you will usually be given fluids and antibiotics through an intravenous (IV) line and may be given oxygen to help you breathe[6][7]. Patients who are severely ill and those with signs of respiratory failure, sepsis, or other serious complications may need intensive care unit (ICU) management[11].
Supportive care
In addition to antibiotics or antiviral medicines, supportive measures can help your recovery[19]:
- Get plenty of rest and sleep
- Drink plenty of fluids to prevent dehydration
- Take over-the-counter pain medicines like acetaminophen or ibuprofen to help with pain or fever
- Use a vaporizer or humidifier to add moisture to the air
- Do not smoke or allow others to smoke around you
Contact your doctor if you do not feel better after taking antibiotics for 2 to 3 days[6].
Recovery and what to expect
Recovery time from pneumonia varies depending on your age, overall health, and the severity of your illness[7]. Most people get better in 2 to 4 weeks[6][13].
If you have mild pneumonia and are generally healthy, your symptoms should begin to improve one to two days after starting treatment[1]. Most people with mild pneumonia are able to return to their everyday activities in a week, although fatigue and cough can linger for an entire month[1].
For more serious cases that require hospitalization, recovery can take much longer. It may take anywhere from one to six months to fully recover and regain strength after being hospitalized for pneumonia[7][22].
During recovery, your body needs to remove all the fluid, damage, and debris left behind in your lungs[1]. This can take a few weeks, resulting in a lingering cough and reduced lung capacity[1]. You may find physical activity more tiring than usual during this time[1].
After severe pneumonia, lung capacity may be reduced and muscles may be weak from being so ill[1]. Significant weight loss can further contribute to weakness[1].
To help your recovery[16][19]:
- Follow your treatment plan and take all medicines as prescribed
- Choose healthy foods to help your body recover
- Drink plenty of fluids
- Do not drink alcohol or use illegal drugs
- Do not smoke and avoid secondhand smoke
- Get plenty of sleep
- Slowly work back into your exercise routine, starting with light exercise and stopping if your cough worsens or you have trouble breathing
Prevention
Many cases of pneumonia can be prevented through vaccination and healthy living practices[21].
Vaccination
Several vaccines are available to help protect you or your child from infections that can cause pneumonia[6][13]:
- Pneumococcal vaccine: Recommended for babies, adults over 65, and people at higher risk of pneumococcal infections
- Flu vaccine: Recommended during pregnancy, for adults over 65, people with certain long-term health conditions, and those at high risk of catching or passing on flu
- RSV vaccine: Recommended for adults aged 75 to 79, and during pregnancy (from 28 weeks onwards) to help protect your baby after they are born
- COVID-19 vaccine: A seasonal vaccine recommended for people at increased risk from COVID-19
Healthy living practices
You can also help prevent pneumonia by[6][8]:
- Washing your hands regularly with water and soap
- Avoiding people who are sick, and staying away from others if you are sick
- Covering your mouth and nose with a tissue when you cough or sneeze
- Putting used tissues in the bin as quickly as possible
- Cleaning and disinfecting surfaces that are touched a lot
- Limiting contact with cigarette smoke or quitting smoking
- Taking good care of chronic medical conditions like asthma
- Taking care of your teeth and gums, which may help prevent some types of pneumonia
Stopping smoking reduces your chance of getting pneumonia[6][13].


