How Can You Get Cavities? Causes and Risk Factors

Cavities form when bacteria in your mouth feed on sugars and starches from food, producing acids that dissolve the mineral structure of your teeth. This process isn’t instant. It happens gradually, over weeks or months, as repeated acid attacks weaken your enamel until a permanent hole forms. Understanding how each step works helps explain why some people get cavities easily while others rarely do.

What Happens Inside Your Mouth

Your mouth is home to hundreds of species of bacteria, but one in particular drives most tooth decay. This bacterium thrives on sugar, especially table sugar (sucrose). It does two things that make it especially damaging: it converts sugar into a sticky, glue-like substance that helps it cling to your teeth in a film called plaque, and it ferments sugar into organic acids.

When you eat something sugary or starchy, these bacteria get to work quickly. Within about an hour, they can drop the pH on your tooth surface from a neutral 7.2 down to roughly 5.5. That matters because tooth enamel starts losing minerals at around pH 5.5. Each time you eat or drink something with carbohydrates, this acid attack begins again.

What makes the process worse is that the bacteria can also store carbohydrates internally for later use. This extends the acid exposure well beyond the time you’re actually eating, keeping your teeth in a demineralizing environment even between meals.

How a Cavity Develops Stage by Stage

Tooth decay doesn’t go from nothing to a cavity overnight. It moves through distinct stages, and in the earliest one, the damage is actually reversible.

The first visible sign is a white spot on the tooth surface, an area where minerals have been pulled out of the enamel. At this point, no hole exists. Your saliva and fluoride from toothpaste can actually push minerals back into the weakened enamel and repair it. This is remineralization, and it’s why fluoride matters so much: it helps rebuild what acid takes away.

If acid attacks keep winning, though, the enamel breaks down further and a physical hole forms. Once that happens, the damage is permanent and needs a filling. The decay doesn’t stop there. Beneath the enamel lies dentin, a softer layer that’s far less resistant to acid. Decay spreads faster through dentin, and you may start noticing sensitivity to hot, cold, or sweet foods and drinks.

Left untreated, bacteria and acid eventually reach the innermost part of the tooth, called the pulp, which contains nerves and blood vessels. This is when real pain starts. The final stage is an abscess, a pocket of infection that forms at the root of the tooth. By then, a simple filling is no longer enough.

The Foods and Habits That Speed It Up

Sugar is the obvious culprit, but frequency matters more than quantity. Sipping a sugary drink over two hours is worse for your teeth than drinking the same amount in five minutes, because each sip restarts the acid cycle. The same logic applies to snacking. Every time carbohydrates touch your teeth, bacteria produce acid for roughly 20 to 30 minutes afterward.

Sticky foods like dried fruit, candy, and chips that lodge in the grooves of your teeth are particularly problematic because they stay in contact with enamel longer. Acidic drinks like soda, citrus juice, and sports drinks add a double threat: they feed bacteria and directly erode enamel on their own.

Refined carbohydrates like white bread and crackers break down into sugars quickly in your mouth, making them nearly as cavity-promoting as sweets. Even foods marketed as healthy, like granola bars or flavored yogurt, often contain enough added sugar to fuel bacterial acid production.

Why Saliva Is Your Best Natural Defense

Saliva does far more than keep your mouth moist. It’s a sophisticated defense system against cavities. It contains calcium and phosphate, the same minerals that make up enamel, and delivers them back to weakened tooth surfaces. It also contains bicarbonate, a buffering agent that neutralizes bacterial acids and raises the pH of plaque back toward safe levels.

When saliva flow increases (from chewing, for example), the concentration of bicarbonate rises, making it even more effective at counteracting acid. This is one reason sugar-free gum after meals can help protect teeth: it stimulates saliva production right when you need it most.

Anything that reduces saliva flow significantly raises your cavity risk. Chronic dry mouth is one of the biggest risk factors for rapid tooth decay, and it’s surprisingly common. Hundreds of medications list dry mouth as a side effect, with antidepressants and antipsychotics among the most frequent offenders. These drugs block the nerve signals that trigger saliva production. People taking multiple medications are especially vulnerable, as the drying effects stack. If your mouth feels persistently dry, that alone can shift the balance heavily in favor of decay.

Why Some People Are More Prone to Cavities

You may know someone who rarely brushes and never gets a cavity, while you get one every year despite careful hygiene. Part of this comes down to biology. The thickness, hardness, and mineral composition of your enamel are partly determined before your teeth ever break through your gums.

A condition called enamel hypoplasia means the enamel didn’t form correctly during development, leaving teeth with thinner or weaker protective layers. This can result from vitamin D or calcium deficiency during childhood, certain infections, or even conditions during pregnancy like gestational diabetes or smoking. A genetic form of the condition, amelogenesis imperfecta, affects roughly 1 in 14,000 people in the U.S. People with less enamel simply have less armor against acid, making cavities more likely even with good oral hygiene.

The specific mix of bacteria in your mouth also varies from person to person, influenced by genetics, diet, and who you’ve shared food or kisses with throughout your life. Some people harbor higher concentrations of acid-producing bacteria than others. The shape of your teeth plays a role too: deep grooves and tight spaces between teeth create sheltered spots where plaque accumulates and your toothbrush can’t easily reach.

Where Cavities Form Most Often

Not all tooth surfaces are equally vulnerable. The chewing surfaces of your back teeth (molars) have pits and grooves that trap food and bacteria, making them the most common site for cavities in children and teenagers. The areas between teeth, where only floss can reach, are the most common location for adult cavities.

Cavities along the gum line become more common with age, especially as gums recede and expose the root surface. Root surfaces aren’t covered by enamel; they’re protected only by a thinner material called cementum, which dissolves at a higher pH than enamel. This means roots can start decaying in conditions that wouldn’t damage the crown of the tooth.

Existing dental work can also become a weak point. The margins where a filling meets natural tooth structure can develop tiny gaps over time, giving bacteria a sheltered entry point. This is why old fillings sometimes need to be replaced even if they look fine on the surface.

Stopping the Process Before It Starts

Since cavities require both bacteria and frequent acid exposure, prevention targets both sides of that equation. Brushing with fluoride toothpaste twice a day removes plaque before it can produce enough acid to cause damage. Flossing clears the between-tooth zones that your brush misses entirely. Fluoride itself integrates into enamel and makes it more acid-resistant, while also helping reverse those early white-spot lesions before they become true cavities.

Reducing how often you eat and drink sugary or starchy foods limits the number of acid attacks per day. Drinking water after meals helps rinse away food particles and dilute acids. If you take medications that cause dry mouth, sipping water throughout the day and using sugar-free gum or lozenges can partially compensate for the lost saliva. Some people benefit from prescription-strength fluoride toothpaste or fluoride varnish applied by a dentist, particularly if they’re at higher risk due to dry mouth, enamel defects, or a history of frequent cavities.