Where Do Cavities Come From? Causes Explained

Cavities form when bacteria in your mouth feed on sugars and starches, producing acids that dissolve the hard outer layer of your teeth. This process happens gradually, sometimes over months or years, and it’s the most common chronic disease in children worldwide. About one in five adults in the U.S. has at least one untreated cavity right now, and roughly 10% of adolescents do too. Understanding exactly how cavities develop can help you stop them before they start.

How Bacteria Build a Home on Your Teeth

Within minutes of brushing, a thin protein film called a pellicle coats every tooth surface. This film is harmless on its own, but it acts like a landing pad. Early-arriving bacteria latch onto it using weak chemical forces, then lock in more permanently through specific molecular bonds. Once those first colonizers are settled, other species piggyback on top of them through cell-to-cell interactions, building up layers of what we call plaque.

The bacterium most responsible for cavities is Streptococcus mutans. It’s uniquely dangerous because it can attach directly to tooth mineral, it thrives on sugar, and it produces sticky compounds that glue the whole bacterial community together. A close relative, Streptococcus sobrinus, and a group called lactobacilli also contribute by generating large amounts of acid. Together, these organisms turn the surface of your tooth into a tiny acid bath every time you eat something sugary or starchy.

The Acid Attack That Dissolves Enamel

Your tooth enamel is made of a crystalline mineral called hydroxyapatite, one of the hardest substances your body produces. But it has a vulnerability: acid. When plaque bacteria break down sugars and starches, they release lactic acid and other organic acids that get trapped between the plaque layer and the tooth surface. This drives the local pH below 5.5, which is the critical threshold where enamel starts to dissolve.

At that point, hydrogen ions from the acid pull calcium and phosphate out of the enamel crystals in a process called demineralization. The enamel softens, becomes more porous, and grows increasingly vulnerable to physical wear. Each meal or snack containing fermentable carbohydrates triggers one of these acid attacks, and the attack can last 20 to 30 minutes or longer depending on how quickly your mouth recovers.

It’s Not Just Sugar

Table sugar (sucrose) gets the most blame, and for good reason. It’s the preferred fuel for S. mutans and directly stimulates the growth of cavity-causing bacteria. But glucose and fructose from fruit juices, sodas, and processed foods do the same thing. What surprises many people is that starchy foods also play a significant role.

Research has shown that rapidly digested starches, those with a high glycemic index, cause plaque pH to drop almost as sharply as sugary foods do. In one study, the glycemic index of starchy foods explained about 60% of the variation in how low plaque pH fell after eating. White bread, certain breakfast cereals, and white rice all produced larger pH drops than their whole-grain or lower-glycemic counterparts. The mechanism is straightforward: faster-digesting starches break down into simple sugars more quickly, giving oral bacteria a burst of their preferred fuel.

Your Mouth Fights Back Constantly

Saliva is your body’s primary defense against cavities. It contains dissolved calcium and phosphate ions that can rebuild enamel in a process called remineralization. Above a pH of about 5.5, saliva is actually supersaturated with the minerals that make up tooth enamel, meaning it actively deposits those minerals back onto damaged surfaces. This is why cavities don’t form after a single meal. Your mouth is constantly cycling between acid attacks and mineral repair.

Saliva also buffers acid, washing it away and raising the pH back to a neutral range. The trouble comes when acid attacks happen too frequently, last too long, or your saliva flow is reduced. If the balance tips so that demineralization outpaces remineralization over weeks and months, a cavity forms.

From White Spot to Full Cavity

Cavities don’t appear overnight. The earliest visible sign is a white spot on the tooth surface, a chalky patch where minerals have been lost but the enamel structure is still intact. At this stage, the damage is reversible. Improved brushing, reduced sugar intake, and fluoride exposure can allow saliva to rebuild the weakened area.

If the acid attacks continue, though, the enamel breaks down further. The white spot darkens, the surface collapses inward, and a physical hole forms. That hole is a cavity, and it’s permanent damage. A dentist has to repair it with a filling because your body can’t regenerate lost enamel once the surface has broken through. Left untreated, decay moves deeper through the enamel into the softer layer underneath called dentin, which dissolves even more easily (its critical pH is 6.0, less acidic than enamel’s 5.5). Eventually, bacteria can reach the pulp, the living tissue inside the tooth containing nerves and blood vessels, causing pain and infection.

How Fluoride Changes the Chemistry

Fluoride protects teeth through a clever chemical trick. When fluoride ions are present during remineralization, they get incorporated into the enamel crystal structure, converting regular hydroxyapatite into a modified form called fluorapatite. This fluoride-containing mineral is significantly less soluble in acid, meaning your enamel resists future acid attacks better than it did before.

At the concentrations found in toothpaste and tap water (well below 50 parts per million at the tooth surface), fluoride promotes the formation of this more acid-resistant mineral. It doesn’t make teeth invincible, but it shifts the balance toward remineralization and makes it harder for acid to do its damage. This is why fluoride toothpaste remains one of the most effective tools for preventing cavities.

Genetics and Individual Risk

Some people seem to get cavities no matter how well they brush, while others rarely do. Genetics plays a real role here. Over 115 genetic conditions are known to affect how enamel forms, and even common, non-disease-causing gene variants can subtly change enamel structure and composition. Variations in genes coding for enamel proteins (like amelogenin) have been linked to higher cavity rates, likely because they produce enamel that’s slightly thinner, more pitted, or less mineralized.

Your genes also influence saliva composition, flow rate, and the types of bacteria that colonize your mouth. Someone who naturally produces less saliva or saliva with lower mineral content will remineralize more slowly, tipping the balance toward decay. These genetic factors don’t override diet and hygiene, but they help explain why two people with similar habits can have very different experiences with cavities.

What Tips the Balance Toward Decay

Cavities are ultimately about an imbalance. Acid production from bacteria on one side, mineral repair from saliva and fluoride on the other. Several everyday factors push that balance in the wrong direction:

  • Frequent snacking or sipping sugary drinks keeps plaque pH low for extended periods, giving your saliva less recovery time between acid attacks.
  • Dry mouth from medications, medical conditions, or simple dehydration reduces saliva flow and its protective mineral supply.
  • Poor plaque removal allows thicker bacterial colonies to trap more acid against tooth surfaces.
  • High-glycemic starchy foods break down quickly and fuel bacteria almost as effectively as pure sugar.
  • Enamel defects from genetics, childhood illness, or nutritional deficiencies create weaker starting material that dissolves faster.

The good news embedded in all of this: because cavities develop gradually through a chemical process your body is already fighting, the earliest stages are reversible. White spot lesions can heal if you reduce the frequency of acid attacks, keep plaque thin through regular brushing, and give fluoride and saliva the chance to do their repair work.