Skip navigation
URL of this page: https://medlineplus.gov/lab-tests/gram-stain/

Gram Stain

What is a Gram stain?

A Gram stain is a test that checks to see if you have a bacterial infection. A sample is taken from the site of a suspected infection, such as your throat, lungs, genitals, or a skin wound. Gram stains may also be used to check for bacteria in certain body fluids, such as blood or urine.

If you have a bacterial infection, your sample will have bacteria in it. A Gram stain will group the bacteria by color and shape to help determine which kind of bacteria is causing your infection. There are two main categories of bacterial infections: Gram-positive and Gram-negative. The categories are determined by how the bacteria react to the Gram stain test.

After the sample is taken, the Gram stain is colored purple. Then, a solvent is added to the stain. When the solvent combines with bacteria in a sample, the bacteria will either stay purple or turn pink or red. If the bacteria remain purple, they are Gram-positive. If the bacteria turn pink or red, they are Gram-negative. The two categories cause different types of infections:

Knowing whether bacteria is Gram-positive or Gram-negative can help your health care provider identify the type of infection you have and which antibiotics will be most effective in treating it.

Other names: Gram's stain

What is it used for?

A Gram stain is most often used to find out if you have a bacterial infection. If you do, the test will show whether the bacteria in your infection is Gram-positive or Gram-negative. This may help your provider decide what other tests are needed to help identify which bacteria are causing your infection and how to treat it.

A Gram stain may also be used to diagnose fungal infections.

Why do I need a Gram stain?

You may need this test if you have symptoms of a bacterial infection. Pain, fever, and fatigue are common symptoms of many bacterial infections. Other symptoms will depend on the type of infection you have and where it's located in your body.

What happens during a Gram stain?

Your provider will take a sample from the site of a suspected infection or from certain body fluids, depending on what type of infection you may have. Samples used for Gram staining can include:

  • Sputum (thick mucus) coughed up from your lungs
  • Drainage from a wound or your genitals
  • Urine

If your provider needs a sample from the fluid around your joints, heart, lungs, or spinal cord, they will use a fine-needle aspiration biopsy. This kind of biopsy uses a very thin needle to remove a sample of cells and/or fluid.

The most common types of Gram stain tests are listed below.

Wound sample:

  • A provider will use a special swab to collect a sample from your wound.

Blood test:

  • A provider will take a sample of blood from a vein in your arm.

Urine test:

  • You will provide a sterile sample of urine in a cup, as instructed by your provider.

Throat culture:

  • Your provider will insert a special swab into your mouth to take a sample from the back of your throat and tonsils.

Sputum culture. Sputum is thick mucus coughed up from the lungs. It is different from spit or saliva.

  • Your provider will ask you to cough up sputum into a special cup, or a special swab may be used to take a sample from your nose.

After your provider collects your sample, they will be sent to a laboratory. There, a laboratory professional will prepare and examine the sample.

Will I need to do anything to prepare for the test?

You don't need any special preparations for a Gram stain.

Are there any risks to the test?

There is no risk to having a swab, sputum, or urine test.

There is very little risk to having a blood test. You may have slight pain or bruising at the spot where the needle was put in, but most symptoms go away quickly.

What do the results mean?

Your sample will be placed on a slide and treated with the Gram stain. A laboratory professional will examine the slide under a microscope. If no bacteria were found, it means you probably don't have a bacterial infection, or there weren't enough bacteria in the sample.

If bacteria were found, certain qualities may help narrow down which types may be causing your illness. This will help your provider decide how to treat it.

  • If the bacteria was colored purple, it means you likely have a Gram-positive infection.
  • If the bacteria was colored pink or red, it means you likely have a Gram-negative infection.

Your results will also include information about the shape of the bacteria in your sample. Most bacteria are either round (known as cocci) or rod-shaped (known as bacilli). The shape can provide more information about the type of infection you have.

Your results may not identify the exact type of bacteria in your sample, but they can help your provider figure out what's causing your illness and how best to treat it. You may need more tests, such as a bacteria culture, to confirm what type of bacteria it is.

Gram stain results may also show whether you have a fungal infection. They may show what category of fungal infection you have: yeast or mold. But you may need more tests to find out which specific fungal infection you have.

If you have questions about your results, talk to your provider. Your provider will consider your symptoms, and medical history to understand the results of a Gram stain test. They may also want you to have a physical exam or additional tests.

Learn more about laboratory tests, reference ranges, and understanding results.

Is there anything else I need to know about a Gram stain?

If you are diagnosed with a bacterial infection, you will probably be prescribed antibiotics. It's important to take your medicine as prescribed, even if your symptoms are mild. This can prevent your infection from getting worse and causing serious complications.

A Gram stain cannot detect a virus.

Show references

The information on this site should not be used as a substitute for professional medical care or advice. Contact a health care provider if you have questions about your health.