What Is an AFB Stain?

Medically Reviewed by Minesh Khatri, MD on May 28, 2023
4 min read

Your doctor may use an acid-fast bacteria (AFB) stain test to see if you have a lung disease like tuberculosis (TB). In addition to showing tuberculosis, an AFB stain can also show if you have another kind of mycobacterial infection like leprosy or a TB-like disease that can affect people with HIV/AIDS.

Mycobacteria are a kind of bacteria that are found in water and soil. Although they are usually harmless, if they enter your body, they can cause a number of problems, including lung issues and other infections or sores on your skin.

An acid-fast bacteria test looks at a small amount of phlegm or sputum that you're coughing up or a very small amount of your tissue. It can tell whether the bacteria or fungus causing your illness falls into one of these categories. 

This test can also be called an acid-fast bacillus smear and culture, AFB smear and culture, TB culture and sensitivity, or a mycobacterial culture.

Acid fastness is a unique characteristic shared by a group of bacteria. It means that once they are stained with a special medical dye, they will keep their color even when exposed to decolorizing acid, which would normally make the color go away. This makes them easy to see and identify under a microscope. 

Your doctor will use one of four methods to collect some of your sputum (mucus in your lungs or airways):

  • Coughing. Most of the time, your doctor will rely on collecting some of the material that you cough up for an AFB stain.
  • Induction of coughing. If you do not have a productive cough, your doctor can have you breathe in aerosolized saline to make you cough.
  • Bronchoscopy. In this invasive procedure, your doctor looks at your airway or lungs with a scope and collects sputum.
  • Gastric aspiration. When sputum is swallowed instead of coughed up, your doctor can retrieve it from your stomach.

The collected sputum is sent to a lab, where it is smeared onto a small dish. Using a process known as the Ziehl Neelsen method, a fuchsia-colored dye is added to the sample. The dye soaks into the cell walls of the bacteria. 

When the sample is rinsed with specialized acid, it removes the dye from the surrounding material. Bacteria like the one that causes tuberculosis are not affected by the acid and keep their pink color. This makes them easy to visualize and identify — and makes the test inexpensive, widely available, and largely reliable.

There are a few reasons that you may need this test, including:

You have a lung infection. If you have symptoms of a lung infection, your doctor may use an AFB stain to explore the cause. These symptoms often include a chronic or long-lasting cough, coughing up blood, significant weight loss, fever, chills, and fatigue.

You're high-risk or positive for TB. If a skin or blood test comes back positive for tuberculosis, or if you have a weakened immune system due to a condition like human immunodeficiency virus (HIV) or acquired immunodeficiency syndrome (AIDS), your doctor may use this test to further see if the disease is present. You might also be considered high-risk if you have been in a hospital, nursing home, or correctional facility.

You have TB outside of your lungs. While tuberculosis often impacts your lungs, it can also infect other parts of your body like your spinal cord or kidneys. Your doctor may use an AFB stain to see if it is affecting your lungs as well as other places.

You have HIV or AIDS. If you have HIV, AIDS, or a similar condition, you are more at risk for contracting TB. If you've been exposed to someone who is positive for tuberculosis, this test can help tell if you have contracted it.

You've had a TB infection. Finally, your doctor may use this test if you have been successfully cured of TB. An AFB stain can help confirm that your recovery is complete and the tuberculosis is gone.

If your AFB stain does not have any bacteria that hold onto the dye, then the result is considered negative. This means that you most likely do not have TB or another mycobacterial infection in your lungs.

If there is a small number of bacteria that keep their dye color, the results may be considered an early positive or inconclusive. The more bacteria that are seen under the microscope, the more intensely positive and infectious you probably are.

A positive test will inform your doctor as to what is causing your infection, and what the next treatment steps might be. If you have TB, you will be treated with anti-tuberculosis medication.

False-positive and false-negative results are possible. If your results are inconclusive, or your doctor thinks that the test may not be accurate, your provider may order other scans or testing to get more information on your condition.

There are no risks to an AFB stain test. If your doctor needs to perform a bronchoscopy or gastric aspiration to retrieve sputum, there are some risks associated with that part of the procedure.

Though you may experience some mild discomfort when coughing — which is a typical symptom of a lung infection — an AFB stain test is not painful. It requires no preparation ahead of time.