What Causes Tooth Cavities: Bacteria, Sugar & More

Cavities form when bacteria in your mouth feed on sugars and starches, producing acids that dissolve the hard mineral surface of your teeth. This process, called demineralization, happens every time you eat. But a cavity only develops when acid attacks outpace your mouth’s natural repair system. Nearly 21% of U.S. adults between 20 and 64 have at least one untreated cavity right now, making it one of the most common chronic health problems in the country.

How Bacteria Turn Sugar Into Acid

Your mouth is home to hundreds of species of bacteria, many of them harmless. The ones that cause cavities are acidogenic, meaning they ferment carbohydrates and release organic acids as a byproduct. The primary acid responsible for cavities is lactic acid, though acetic and propionic acids also play a role. These acids lower the pH right at the tooth surface, pulling calcium and phosphate minerals out of the enamel.

The bacteria most strongly linked to cavities thrive in sticky films of plaque that cling to teeth, especially along the gumline and in the grooves of molars. When you eat something sugary or starchy, these bacteria get an immediate fuel source. Within minutes, acid production ramps up and the pH in plaque drops. If the plaque isn’t brushed away, the cycle repeats with every meal and snack, giving acid more and more contact time with your enamel.

Your Mouth’s Built-In Defense System

Saliva is your body’s primary tool for fighting cavities. It works in several ways at once: it physically rinses food particles off teeth, it contains calcium and phosphate ions that can redeposit into weakened enamel, and it carries buffering agents (bicarbonate, phosphate, and certain peptides) that neutralize bacterial acid. Saliva also breaks down urea and other compounds to release ammonia, which raises the pH back toward neutral.

This repair process, called remineralization, is happening constantly. A cavity only forms when the balance tips, meaning acid attacks happen more frequently or last longer than saliva can counteract. That’s why anything that reduces saliva flow or increases acid exposure raises your risk significantly.

What a Cavity Looks Like as It Progresses

Cavities don’t appear overnight. They develop through distinct stages, and the earliest stage is actually reversible.

The first visible sign is a white spot on the tooth surface. This chalky patch means minerals are leaving the enamel but the structure hasn’t broken down yet. At this point, fluoride treatments and improved brushing can sometimes reverse the damage entirely. If nothing changes, that white spot darkens to brown and the enamel starts to physically break down, forming an actual hole in the tooth.

Once decay pushes past the enamel into the softer layer underneath called dentin, things accelerate. Dentin is less mineral-dense than enamel, so acid eats through it faster. Dentin also contains tiny tubes that connect to the tooth’s nerve, which is why you start feeling sensitivity to hot, cold, or sweet foods at this stage. Left untreated, the decay eventually reaches the innermost pulp of the tooth, where the nerve and blood supply live. That’s when serious pain, infection, and potential tooth loss become real risks.

Risk Factors That Tip the Balance

Frequent Snacking and Sugary Drinks

It’s not just how much sugar you eat but how often. Every time sugar or starch enters your mouth, bacteria produce acid for roughly 20 to 30 minutes. Three meals a day gives your saliva enough time to recover between attacks. Sipping soda or snacking throughout the day keeps the acid level elevated almost continuously, and your saliva never gets a chance to fully repair the enamel.

Acidic Beverages, Even Sugar-Free Ones

Cavities and acid erosion are related but different problems. Cavities develop under plaque from bacterial acid. Erosion comes from dietary acids hitting the tooth directly, like phosphoric acid in cola or citric acid in fruit juice. Here’s the catch: diet sodas may be sugar-free, which makes them less likely to feed cavity-causing bacteria, but their acid content is identical to regular versions. They still soften and wear down enamel, making teeth more vulnerable to decay later.

Dry Mouth

Anything that reduces saliva flow removes your strongest natural defense. Over a thousand medications are now associated with dry mouth, including many that people take daily. Common culprits include antidepressants, blood pressure medications, antihistamines, decongestants, sleep aids, opioid pain medications, muscle relaxants, and ADHD stimulants. Chemotherapy drugs and anti-HIV medications can also cause it. If you’ve noticed your mouth feeling persistently dry after starting a new medication, that’s a real cavity risk factor worth addressing.

Medical conditions that affect saliva production, like Sjögren’s syndrome, and lifestyle factors like mouth breathing or heavy alcohol use also contribute.

Genetics

Some people genuinely are more cavity-prone than others due to inherited traits. Genes involved in enamel formation directly affect how thick, dense, and mineralization-resistant your enamel is. Other genetic factors influence the composition of your saliva, including specific proteins that affect how well bacteria can bind to tooth surfaces. Studies on twins have found that identical twins share higher rates of cavities than fraternal twins, supporting a meaningful hereditary component. There’s even evidence of a genetic link to sugar preference, meaning some people may be wired to crave the very foods that fuel cavities.

That said, genetics loads the gun but habits pull the trigger. Even people with genetically weaker enamel can avoid cavities with consistent oral care.

Why Some Teeth Are More Vulnerable

Not all tooth surfaces carry equal risk. The chewing surfaces of back molars have deep pits and grooves where food particles and bacteria collect easily and toothbrush bristles can’t always reach. The spaces between teeth are another high-risk zone, which is why flossing matters for cavity prevention and not just gum health. Teeth near salivary gland openings (lower front teeth, upper molars) tend to get more saliva exposure and are slightly more protected, while teeth farther from those openings are more vulnerable.

Existing dental work can also create risk. The edges where fillings or crowns meet natural tooth structure can develop tiny gaps over time, giving bacteria a sheltered spot to accumulate.

Who Gets Cavities Most Often

According to the CDC’s 2024 oral health surveillance report, about 11% of children aged 2 to 5 already have untreated decay in their baby teeth. That number climbs to nearly 18% for children aged 6 to 8. Among adolescents 12 to 19, about 10% have untreated cavities in permanent teeth. Adults aged 20 to 64 have the highest rate at nearly 21%, while adults 65 and older come in at about 13%.

These numbers reflect untreated cavities only. The total percentage of people who have ever had a cavity is far higher. Disparities by income, race, and access to dental care are significant, with lower-income populations consistently experiencing higher rates of both decay and delayed treatment.