ConditionLungs & breathing

Pneumonia

Pneumonia is an infection that inflames the air sacs in one or both lungs, filling them with fluid or pus. It causes a cough, often with colored phlegm, fever, chills, fast or difficult breathing and chest pain when breathing in. Bacteria, especially Streptococcus pneumoniae, and viruses such as flu, RSV and COVID-19 are the usual causes. Many healthy adults recover at home with antibiotics, but pneumonia can be serious in babies, older adults and people with long-term illnesses.

Also called: Lung infection, chest infection, community-acquired pneumonia, bronchopneumonia, lobar pneumonia

At a glance

What it is
Infection of the lung's air sacs (alveoli), which fill with fluid and pus.
Common causes
Streptococcus pneumoniae, flu, RSV, COVID-19, Mycoplasma and other bacteria.
Key symptoms
Cough with phlegm, fever, chills, breathlessness, chest pain on breathing, fatigue.
Diagnosis
Examination, oxygen level and a chest X-ray.
Treatment
Antibiotics for bacterial pneumonia, antivirals for some viruses, rest and fluids; oxygen and hospital care when severe.
Recovery
Fever settles in days; cough and tiredness can take 6 weeks or more.

When to get help

Call 911 or go to the ER

  • Struggling to breathe, unable to speak in full sentences, or lips or face turning blue or gray
  • New confusion, drowsiness or difficulty waking, especially in an older adult
  • Chest pain with a racing heart, cold clammy skin or fainting
  • A baby or young child with fast breathing, grunting, the skin sucking in between or under the ribs, or poor feeding

See a doctor within a day or two

  • Cough with fever and shortness of breath, especially in adults over 65, pregnant people, babies or anyone with heart, lung, kidney or immune problems
  • Fever of 39 °C (102 °F) or higher with chills and chest pain when breathing in
  • Coughing up blood or rust-colored phlegm
  • Being on antibiotics for pneumonia for 48 to 72 hours with no improvement, or getting worse

Book a routine appointment

  • Cough that lasts more than 3 weeks
  • Tiredness or breathlessness that has not improved 6 weeks after pneumonia
  • Repeated pneumonias, which need investigation for an underlying cause

Usually safe to manage at home

  • Diagnosed mild pneumonia improving on treatment: rest, fluids, fever relief and finishing the prescribed course

What pneumonia is

Each lung contains hundreds of millions of tiny air sacs called alveoli, where oxygen passes into the blood. In pneumonia, germs reach the alveoli and the immune system responds with inflammation. The sacs fill with fluid, white blood cells and debris, so less oxygen gets through. This explains the breathlessness, low oxygen levels and the crackling sounds a doctor hears.

Pneumonia can affect a whole lobe of the lung (lobar pneumonia) or patchy areas around the airways in both lungs (bronchopneumonia). It is a leading cause of hospital admission and death worldwide, especially in children under 5 and adults over 65.

Pneumonia symptoms

Symptoms often come on over a few days, sometimes after a cold or flu:

  • Cough, often producing yellow, green or rust-colored phlegm; sometimes dry
  • Fever, sweating and shaking chills
  • Shortness of breath and fast breathing, even at rest
  • Sharp chest pain that is worse when breathing in or coughing (pleuritic pain)
  • Fatigue, weakness and loss of appetite
  • Fast heartbeat
  • Nausea, vomiting or diarrhea, more often with some bacteria such as Legionella

Pneumonia in older adults

Older adults may have few classic symptoms. Fever can be absent or low. Instead, look for new confusion, falls, a sudden decline in mobility, loss of appetite or worsening of a long-term condition. These changes warrant a medical check.

Pneumonia in children

Babies and young children often show fast breathing, flaring nostrils, grunting, chest drawing in with each breath, poor feeding, vomiting and fever. Some have tummy pain rather than a cough. Babies may not cough at all.

Causes and types

By germ

TypeCommon causesTypical features
BacterialStreptococcus pneumoniae (pneumococcus), Haemophilus influenzae, Staphylococcus aureusSudden high fever, chills, productive cough, one area of the lung
ViralInfluenza, RSV, SARS-CoV-2, rhinovirus, human metapneumovirusGradual, dry cough, muscle aches; can lead to bacterial pneumonia
"Atypical" bacterialMycoplasma pneumoniae, Chlamydia pneumoniae, LegionellaMilder, dry cough, headache; often called walking pneumonia
FungalPneumocystis, Histoplasma, CoccidioidesMostly in people with weak immune systems or specific regions

Viral and bacterial pneumonia cannot be told apart reliably by symptoms alone. A mix of both is common, particularly after flu.

By where it was caught

  • Community-acquired pneumonia (CAP): caught in everyday life, the most common type.
  • Hospital-acquired pneumonia: starts 48 hours or more after admission; more likely to involve resistant bacteria.
  • Ventilator-associated pneumonia: in people on a breathing machine.
  • Aspiration pneumonia: caused by inhaling food, drink, vomit or saliva into the lungs, common after strokes, in people with swallowing problems, heavy alcohol use or reduced consciousness.

Walking pneumonia

"Walking pneumonia" is an informal term for mild pneumonia in which people feel unwell but stay on their feet. It is often caused by Mycoplasma, which spreads easily in schools and families. See mycoplasma pneumonia.

Risk factors

  • age under 2 or over 65
  • smoking, heavy alcohol use
  • long-term lung conditions such as COPD, asthma, bronchiectasis or cystic fibrosis
  • heart failure, diabetes, kidney or liver disease
  • weakened immune system from HIV, cancer treatment, steroids or transplant drugs
  • difficulty swallowing after a stroke or with Parkinson's disease or dementia
  • recent viral infection, especially flu
  • living in a care home, or a recent hospital stay

Is pneumonia contagious?

Pneumonia itself is not passed on as "pneumonia", but the germs that cause it are. Flu, COVID-19, RSV, Mycoplasma and pneumococcus spread through coughs, sneezes and close contact. Someone exposed may get only a cold, while another person develops pneumonia. Aspiration pneumonia and most fungal pneumonias are not contagious. People are generally much less infectious after 24 to 48 hours of effective antibiotics for bacterial pneumonia, but viral infections can spread for longer.

How pneumonia is diagnosed

  1. History and examination: the doctor listens to the chest for crackles, reduced breath sounds or bronchial breathing, and checks temperature, breathing rate, pulse and blood pressure.
  2. Pulse oximetry: a finger clip measures oxygen saturation. Levels below about 92% to 94% are a concern.
  3. Chest X-ray: confirms pneumonia by showing shadowing (consolidation) and detects complications such as fluid.
  4. Blood tests in hospital: white cell count, CRP (an inflammation marker), kidney function, and blood cultures in severe cases.
  5. Viral swabs for flu, COVID-19 and RSV, which can change treatment.
  6. Sputum and urine tests for specific bacteria in more severe illness.

Assessing severity

Doctors use scores such as CURB-65 (confusion, high blood urea, breathing rate of 30 or more a minute, low blood pressure, age 65 or over) or the Pneumonia Severity Index to decide who can be treated at home, who needs hospital care and who needs intensive care.

Pneumonia treatment

At home

Most healthy adults with mild community-acquired pneumonia are treated at home:

  • Antibiotics by mouth, commonly amoxicillin, doxycycline or a macrolide such as azithromycin, depending on local guidance, your health and allergies. A typical course is 5 days for uncomplicated pneumonia once you are improving. Take the full course as prescribed.
  • Antivirals such as oseltamivir for flu, or COVID-19 antivirals for higher-risk people, ideally started early.
  • Rest and plenty of fluids.
  • Fever and pain relief: acetaminophen (paracetamol) or ibuprofen at the label dose. Do not give aspirin to children or teenagers.
  • Do not suppress a productive cough with strong cough medicines; coughing clears the lungs. Honey in warm water may soothe it in adults and children over 1 year.
  • Stop smoking and avoid secondhand smoke.

You should start to feel better within 48 to 72 hours. If not, contact your doctor.

In hospital

People with severe pneumonia, low oxygen, confusion, low blood pressure or serious underlying illness are admitted for:

  • intravenous antibiotics, switched to tablets once improving
  • oxygen therapy, and sometimes high-flow oxygen or ventilation
  • IV fluids
  • treatment of complications

Corticosteroids are added for some people with severe pneumonia, particularly severe COVID-19.

Complications

  • Sepsis: an extreme body-wide response to infection with low blood pressure and organ failure
  • Respiratory failure and acute respiratory distress syndrome (ARDS)
  • Pleural effusion: fluid around the lung; if infected, it is called empyema and needs draining
  • Lung abscess: a pus-filled cavity, more common after aspiration
  • Heart problems: heart attack, irregular heart rhythm and worsening heart failure are more common in the weeks after pneumonia, especially in older adults

Pneumonia recovery time

Recovery is gradual. A typical timeline for adults treated for community-acquired pneumonia, as described in NICE guidance:

Time after starting treatmentWhat to expect
1 weekFever should be gone
4 weeksChest pain and phlegm much reduced
6 weeksCough and breathlessness much reduced
3 monthsMost symptoms gone, though tiredness may remain
6 monthsMost people feel back to normal

Older adults and people with other health conditions may take longer. A follow-up chest X-ray about 6 weeks after treatment is often recommended for people over 50 and smokers, or if symptoms persist, to make sure the shadow has cleared and nothing else, such as lung cancer, is hidden behind it.

Prevention

  • Vaccines: - Pneumococcal vaccines: recommended in the US for all adults aged 50 and over, for children as part of routine infant vaccination, and for younger people with certain health conditions. - Flu vaccine every year for everyone aged 6 months and over. - COVID-19 vaccines as currently recommended. - RSV vaccines for older adults at increased risk, and RSV protection for infants through maternal vaccination or antibody injection. - Whooping cough (pertussis), Hib and measles vaccines for children.
  • Stop smoking, which damages the lungs' natural defenses.
  • Wash hands and cover coughs and sneezes.
  • Good oral hygiene and safe swallowing strategies for people at risk of aspiration.
  • Manage long-term conditions such as diabetes, COPD and heart failure.

Frequently asked questions

What are the first signs of pneumonia?

Early signs are often a cough that gets worse, fever and chills, feeling much more unwell than with a normal cold, and becoming short of breath with less effort. Some people notice sharp chest pain when breathing in. In older adults, new confusion or weakness may be the first sign.

Is pneumonia contagious?

The germs that cause pneumonia, such as flu, COVID-19, RSV, Mycoplasma and pneumococcus, can spread from person to person through coughs and close contact. Not everyone exposed gets pneumonia. Aspiration pneumonia is not contagious. Covering coughs, handwashing and vaccines reduce spread.

How long does it take to recover from pneumonia?

Most people feel noticeably better within a week, but a cough and tiredness commonly last 4 to 6 weeks. Full recovery can take 3 to 6 months, especially in older adults or after a hospital stay. Contact a doctor if symptoms are getting worse rather than slowly improving.

What is the difference between bacterial and viral pneumonia?

Bacterial pneumonia often starts suddenly with high fever and colored phlegm, and is treated with antibiotics. Viral pneumonia tends to come on more gradually, with a dry cough and aches, and antibiotics do not help it, though antivirals may for flu or COVID-19. Symptoms overlap, so tests guide treatment.

Can you have pneumonia without a fever?

Yes. Older adults, people with weakened immune systems and those taking fever-reducing medicines may have little or no fever. They might instead have confusion, fast breathing, low energy or poor appetite. Pneumonia should still be considered when breathing becomes fast or difficult.

What is walking pneumonia?

Walking pneumonia is a mild form of pneumonia where you feel unwell but can carry on with daily activities. It is often caused by Mycoplasma pneumoniae, with a dry cough, low fever, headache and tiredness lasting weeks. It is usually treated with antibiotics such as azithromycin or doxycycline.

Should I go to the hospital for pneumonia?

Go to the ER or call 911 or your local emergency number if you are struggling to breathe, have blue lips, chest pain with a racing heart, or new confusion. Contact a doctor urgently if you have pneumonia symptoms and are over 65, pregnant, very young or have a chronic illness.

Sources

This guide was written from current patient and clinical guidance, including:

  • American Thoracic Society/Infectious Diseases Society of America: Diagnosis and Treatment of Adults with Community-acquired Pneumonia
  • CDC: Pneumonia; Pneumococcal vaccine recommendations
  • NHLBI: Pneumonia
  • NICE: Pneumonia in adults, diagnosis and management (CG191)
  • American Lung Association: Learn about pneumonia
  • World Health Organization: Pneumonia in children fact sheet