Pneumocystis pneumonia (PCP or pneumocystis) is the most common opportunistic infection (OI) in people with HIV. Without treatment, over 85% of people with HIV would eventually develop PCP.  It has been the major killer of people with HIV.  Although PCP is now almost entirely preventable and treatable, it still causes death in about 10% of cases.

Currently, with strong antiretroviral therapy (ART) available, PCP rates have dropped dramatically. Unfortunately, PCP is still common in people who are infected with HIV for a long time before getting treatment. In fact, 30-40% of people with HIV develop PCP if they wait to get treatment until their CD4 cell counts are at or below 50 cells/mm3. The best way to reduce cases of PCP is testing for HIV to identify cases sooner.

PCP is caused by a fungus. It used to be called pneumocystis carinii, but scientists now call it pneumocystis jiroveci. A healthy immune system can control the fungus. However, PCP causes illness in children and in adults with a weakened immune system.

PCP almost always affects the lungs, causing a form of pneumonia. People with CD4 cell counts under 200 cells/mm3 have the highest risk of developing PCP.  People with counts under 300 cells/mm3 who have already had another OI are also at risk. Most people who get PCP become much weaker, lose a lot of weight, and are likely to get PCP again.

The first signs of PCP are difficulty breathing, fever, and a dry cough. Anyone with these symptoms should see their healthcare provider immediately. However, everyone with CD4 counts below 300 cells/mm3 should discuss PCP prevention with their healthcare provider before they experience any symptoms.


For many years, antibiotics were used to prevent PCP in cancer patients with weakened immune systems. In 1985, a study showed that these drugs would also prevent PCP in people with AIDS. The drugs used to treat PCP include trimethoprim-sulfamethoxazole (TMP/SMX), dapsone, pentamidine, and atovaquone. 

TMP/SMX (Bactrim or Septra) is the most effective anti-PCP drug. It’s a combination of two antibiotics: trimethoprim (TMP) and sulfamethoxazole (SMX).

Dapsone is similar to TMP/SMX. Dapsone seems to be almost as effective as TMP/SMX against PCP.

Pentamidine (NebuPent, Pentam, Pentacarinat) is a drug that is usually inhaled in aerosol form to prevent PCP. Pentamidine is also used intravenously (IV) to treat active PCP.

Atovaquone (Mepron) is a drug used in people with mild or moderate cases of PCP who cannot take TMP/SMX or pentamidine.

Based on a small study, if standard therapy doesn’t work, patients might be able to use Neutrexin (trimetrexate) combined with Leucovorin (folinic acid.)


The best way to prevent PCP is to use strong ART.  People who have a CD4 cell count less than 200 cells/mm3 can prevent PCP by taking the same medications used for PCP treatment.

Another way to reduce the risk of PCP is to not smoke or to stop smoking. People with HIV who smoke develop PCP 2-3 times faster than people with HIV who do not smoke. One study found that ex-smokers who stopped for at least a year developed PCP no quicker than non-smokers.

Combination ART can make your CD4 cell count go up. If it goes over 200 cells/mm3 and stays there for 3 months, it may be safe to stop taking PCP medications.  However, because PCP medications are inexpensive and have mild side effects, some researchers think they should be continued until your CD4 cell count reaches 300 cells/mm3.

Be sure to talk with your healthcare provider before you stop taking any of your prescribed medications. 


Bactrim or Septra is the most effective drug against PCP. It is also inexpensive, costing only about $10 per month. It is taken in pill form, not more than one pill daily. Cutting back from one pill a day to three pills a week reduces the allergy problems of Bactrim and Septra and seems to work as well.

However, the SMX part is a sulfa drug and almost half of people who take it have an allergic reaction. This usually is a skin rash, sometimes a fever. Allergic reactions can be overcome using a desensitization procedure. People start with a small amount of the drug and take increasing amounts until they can tolerate the full dose. Dapsone causes fewer allergic reactions than Bactrim or Septra. It is also fairly inexpensive, at about $30 per month. Dapsone is taken as a pill and, like Bactrim or Septra, not more than one pill daily.

Pentamidine involves a monthly visit to a clinic with a nebulizer, the machine that produces a very fine mist of the drug. The mist is inhaled directly into the lungs. The procedure takes about 30-45 minutes. You pay for the drug plus the clinic costs, between $120-250 per month. Patients using aerosol pentamidine get PCP more often than people taking the antibiotic pills.


PCP is now almost totally treatable and preventable. However, it is still common in people who do not know they have HIV. Strong antiretroviral drugs (ARVs) can keep the CD4 cell count from dropping. If your CD4 cell count is below 300 cells/mm3, talk to your healthcare provider about taking drugs to prevent PCP.  Everyone whose CD4 cell count is below 200 cells/mm3 should be taking anti-PCP medication.


CDC: Pneumocystis pneumonia

HIV.gov: Pneumocystis Pneumonia

POZ: Pneumocystis Pneumonia (PCP)

UCSF HIV InSite: Pneumocystosis and HIV

Reviewed March 2021 

Print PDF