What Are Cavities Caused By: Bacteria, Sugar & More

Cavities are caused by acid. Specifically, bacteria living on your teeth feed on sugars from food and drinks, then produce acid as a waste product. When that acid drops the pH on your tooth’s surface below about 5.5, it starts dissolving the minerals that make up your enamel. Over time, this mineral loss creates a hole in the tooth: a cavity.

About 21% of American adults between 20 and 64 have at least one untreated cavity right now, according to CDC surveillance data from 2024. Cavities aren’t random bad luck. They result from a specific chain of events involving bacteria, sugar, acid, and time, and each link in that chain is something you can influence.

How Bacteria Turn Sugar Into Acid

Your mouth contains hundreds of bacterial species, but a handful are responsible for most tooth decay. The primary culprit is a bacterium called Streptococcus mutans, which thrives in the sticky film of plaque that coats your teeth. Alongside it, species of Lactobacillus and several others contribute to the process, especially as decay progresses.

These bacteria metabolize carbohydrates from your food and produce organic acids, primarily lactic acid and acetic acid. What makes S. mutans so effective at causing damage is a triple threat: it produces acid efficiently, it tolerates acidic environments better than most other oral bacteria, and it manufactures a sticky scaffolding (a glue-like matrix of polysaccharides) that helps it cling to your teeth and build up thicker layers of plaque. As acid levels rise in the plaque, the environment becomes hostile to harmless bacteria and increasingly favorable to acid-producing ones. The bacterial community shifts toward more cavity-causing species, creating a self-reinforcing cycle.

What Happens Inside Your Enamel

Tooth enamel is made of tightly packed mineral crystals, primarily a form of calcium phosphate. These crystals exist in a constant chemical balancing act with the fluid in the plaque on your teeth. At a neutral pH (around 7), minerals dissolve out of and redeposit back into enamel at roughly equal rates. Your teeth are always losing and regaining tiny amounts of mineral, and that’s normal.

The trouble starts when bacterial acid pushes the pH below 5.5, the critical threshold identified by the American Dental Association. Below that point, minerals dissolve out of the enamel faster than they can be replaced. The spaces between the mineral crystals expand, and the enamel surface becomes softer and more porous. This process is called demineralization.

If the acid exposure is brief, your saliva can neutralize it and help minerals flow back into the weakened enamel. But if acid attacks happen frequently throughout the day, the balance tips permanently toward mineral loss, and a cavity forms.

Which Foods and Drinks Fuel the Process

Not all sugars carry equal cavity risk. The World Health Organization identifies “free sugars” as the primary dietary driver of tooth decay. These include all sugars added to foods and beverages by manufacturers or at home, plus sugars naturally present in honey, syrups, fruit juices, and fruit juice concentrates. Table sugar, high-fructose corn syrup, and the sugar in a glass of orange juice all qualify.

Frequency matters more than quantity. Sipping a sugary drink over two hours bathes your teeth in acid far longer than drinking the same amount in five minutes. Every time sugar enters your mouth, bacteria produce acid for roughly 20 to 30 minutes. Snacking or sipping throughout the day means your teeth spend most of the day under acid attack, with little recovery time in between. Sticky foods like dried fruit, candy, and even starchy snacks that cling to tooth surfaces prolong the exposure further.

How Saliva Protects Your Teeth

Saliva is your mouth’s primary natural defense against cavities. It works in several ways at once: it physically washes away food particles and sugar, it contains buffering agents (mainly bicarbonate) that neutralize acid and bring pH back toward neutral, and it carries dissolved calcium and phosphate that can redeposit into weakened enamel. When fluoride is present, this remineralization process becomes even more effective, producing a mineral that’s more resistant to future acid attacks.

Anything that reduces saliva flow significantly raises your cavity risk. Dry mouth is a side effect of hundreds of medications, including common drugs for depression, high blood pressure, anxiety, allergies, and pain. Health conditions like diabetes, Sjogren syndrome, and the aftermath of stroke can also reduce saliva production. People undergoing radiation therapy to the head or neck often experience severe dry mouth. Without adequate saliva, plaque accumulates faster, acid lingers longer, and the remineralization process slows dramatically.

Catching Cavities Before They’re Cavities

Before a full cavity develops, the earliest sign of trouble is a white spot lesion: a chalky, opaque patch on the tooth surface where minerals have started to dissolve but the enamel hasn’t yet broken through into a hole. In young children, these white spots commonly appear along the gumline of the upper front teeth. In adults, they can show up anywhere plaque tends to accumulate.

White spot lesions are reversible. Because the enamel surface is still intact, remineralization can repair the damage if the conditions change. Reducing sugar frequency, improving brushing habits, using fluoride toothpaste, and staying hydrated can all tip the balance back in favor of mineral repair. Once the enamel surface actually breaks and a hole forms, that repair is no longer possible, and the tooth needs professional treatment.

Risk Factors Beyond Diet

Sugar and bacteria are the central players, but several other factors influence whether you actually develop cavities:

  • Plaque buildup: Inconsistent brushing and flossing allows thicker plaque to accumulate, trapping acid against the tooth surface for longer periods.
  • Tooth anatomy: Deep grooves and pits on the chewing surfaces of back teeth are natural traps for bacteria and food. These areas are the most common sites for cavities in children and teens.
  • Fluoride exposure: Fluoride strengthens enamel and makes it more resistant to acid dissolution. People without access to fluoridated water or fluoride toothpaste have higher rates of decay.
  • Dry mouth: As noted above, reduced saliva from medications or medical conditions removes your mouth’s most important protective mechanism.
  • Age: Cavities are common at both ends of life. Children’s enamel is thinner and more susceptible to acid. Older adults often deal with receding gums that expose the tooth root, which lacks enamel entirely and decays more easily.

Why Some People Get More Cavities Than Others

Two people can eat similar diets and brush with similar consistency, yet one develops multiple cavities while the other has none. Part of this comes down to the composition of their oral bacterial communities. Some people naturally harbor higher concentrations of acid-producing bacteria. The thickness and mineral content of enamel varies between individuals. Saliva flow rate and buffering capacity differ too, and these are partly determined by genetics.

That said, the fundamentals of cavity formation are the same for everyone: bacteria, sugar, acid, and time. Reducing any one of those factors lowers the risk. Cutting back on how often you eat or drink sugary things throughout the day is consistently one of the most effective changes, because it directly limits the number of acid attacks your teeth face.