How to Tell If Bacteria Is Gram Positive or Negative

The primary way to tell if bacteria are gram-positive or gram-negative is through the Gram stain, a four-step lab technique that turns gram-positive bacteria purple and gram-negative bacteria pink. The color difference comes down to cell wall thickness: gram-positive bacteria have a much thicker protective layer that traps purple dye, while gram-negative bacteria have a thinner wall surrounded by a fatty outer membrane that lets the dye wash away.

Why the Two Types Stain Differently

The distinction between gram-positive and gram-negative bacteria is structural. Gram-positive bacteria are wrapped in a thick wall made of peptidoglycan, a mesh-like material that accounts for about 90% of the cell wall and measures 30 to 100 nanometers thick. Gram-negative bacteria have a much thinner peptidoglycan layer, only a few nanometers thick (roughly 10% of the wall), but they make up for it with something gram-positive bacteria lack entirely: an outer membrane rich in lipids.

That outer membrane is the key to the whole staining process. When alcohol is applied during the Gram stain, it dissolves the fatty outer membrane of gram-negative bacteria, leaving their thin peptidoglycan exposed and leaky. The purple dye complex washes right out. In gram-positive bacteria, the alcohol actually dehydrates the thick peptidoglycan, causing it to tighten and trap the purple dye inside. No outer membrane to dissolve, no leakiness, no dye loss.

The Four Steps of the Gram Stain

The Gram stain uses four reagents applied in sequence. Each one has a specific job, and the order matters.

  • Crystal violet (1 minute): This purple dye is the primary stain. It colors all bacteria purple regardless of type.
  • Iodine solution (1 minute): The iodine acts as a mordant, bonding with the crystal violet to form large dye complexes inside the cells. These complexes are too big to escape easily through intact, thick cell walls.
  • Alcohol decolorizer (about 30 seconds): This is the critical step. Ethanol (95%) strips the outer membrane from gram-negative cells and washes out the dye complexes. Gram-positive cells, with their thick dehydrated peptidoglycan, hold onto the purple. Timing matters here: too long and even gram-positive cells can lose their color.
  • Safranin counterstain (10 to 30 seconds): This pink-red dye stains the now-colorless gram-negative bacteria so they become visible. Gram-positive bacteria are already purple, so the pink dye doesn’t noticeably change their appearance.

Under the microscope, purple-to-blue cells are gram-positive and pink-to-red cells are gram-negative.

Common Bacteria in Each Category

Gram-positive bacteria include many well-known pathogens. Staphylococcus aureus (the culprit behind staph infections) appears as clusters of round cells. Streptococcus pneumoniae, a leading cause of pneumonia and ear infections, shows up as lancet-shaped pairs. Streptococcus pyogenes causes strep throat, cellulitis, and scarlet fever. Clostridia species, including C. difficile and C. tetani, are gram-positive rod-shaped bacteria that form spores. Listeria, associated with contaminated deli meats and unpasteurized dairy, is another gram-positive rod.

Gram-negative bacteria include E. coli, Salmonella, Pseudomonas, Neisseria (which causes gonorrhea and meningitis), and Klebsiella. These tend to be harder to treat with certain antibiotics because their outer membrane acts as an extra barrier to drug entry, which is one reason identifying Gram status quickly matters in clinical settings.

When the Stain Gives Unclear Results

Not every Gram stain produces a clean purple or pink result. Some bacteria are “gram-variable,” meaning a single sample shows a mix of both colors. This happens for two main reasons, both tied to cell age and division.

In one group of bacteria (including Bacillus and Clostridium species), cultures stain gram-positive when young but gradually shift toward gram-negative as they age. As doubling times slow and cultures enter stationary phase, the cell wall thins and becomes more fragile. By the time the culture is old, these bacteria are virtually gram-negative under the stain, even though they are structurally gram-positive organisms.

In another group (including Corynebacterium and related species), the shift is more subtle. By mid-growth phase, 10 to 30% of cells stain gram-negative. These tend to be cells that are actively dividing, with a vulnerable spot at the division site where the wall is weaker. As the culture ages further, 15 to 40% of cells may appear gram-negative due to small lesions that develop in the cell walls of non-dividing cells. For this reason, Gram stains are most reliable when performed on fresh cultures, typically 18 to 24 hours old.

A Faster Alternative: The KOH String Test

When a Gram stain isn’t available or you need a quick confirmation, the KOH string test takes less than 60 seconds. You mix a colony of bacteria into a drop of 3% potassium hydroxide on a glass slide and stir with a loop. If the bacteria are gram-negative, the KOH dissolves their thin cell wall, releasing sticky DNA that causes the mixture to become viscous and string out when you lift the loop. Gram-positive bacteria, protected by their thick peptidoglycan, remain unaffected, and the suspension stays watery.

Testing across 495 bacterial and yeast strains showed 100% correlation between the KOH string test and traditional Gram stain results. It won’t tell you the species, but it reliably sorts bacteria into the right category without staining reagents or a microscope.

High-Tech Identification Methods

In hospital labs, a technology called MALDI-TOF mass spectrometry can identify bacteria down to the species level, not just Gram status, by analyzing the unique protein fingerprint of a colony. It can produce a definitive species identification from a blood culture in as little as 20 minutes. Compared to conventional methods that take 26 to 84 hours, MALDI-TOF typically cuts identification time by at least 24 hours. In one study, combining Gram stain results with MALDI-TOF identification changed antibiotic choices in 35% of cases, mostly by helping doctors broaden or narrow treatment earlier.

For gram-positive bacteria specifically, MALDI-TOF reduced identification time to 5 to 18 hours versus 29 to 84 hours with conventional methods. For gram-negative bacteria, the gap was similar: 6 to 17 hours versus 36 to 132 hours. These tools don’t replace the Gram stain so much as build on it. The stain provides a fast initial answer in minutes, and advanced methods confirm the exact species over the following hours.