Cavities form when bacteria in your mouth feed on sugars and produce acid that dissolves the mineral structure of your teeth. This process happens gradually, typically over months to years, and it’s remarkably common: about 21% of adults between 20 and 64 have at least one untreated cavity right now. Understanding the mechanics of decay can help you see why certain habits matter more than others.
What’s Actually Happening Inside Your Mouth
Your mouth is home to hundreds of species of bacteria, and they live in a sticky film called plaque that constantly forms on your teeth. When you eat carbohydrates, especially sugar, specific bacteria in that plaque metabolize those sugars and produce organic acids, primarily lactic acid. These acids accumulate against the tooth surface and lower the pH in that area.
Tooth enamel is made of a crystalline mineral called hydroxyapatite. It’s the hardest substance in your body, but it has a vulnerability: when the pH at the tooth surface drops below about 5.5, those crystals start to dissolve. Minerals like calcium and phosphate leach out of the enamel and into the surrounding fluid. This is demineralization, and it’s the first step toward a cavity.
The key bacteria driving this process are types that thrive in acidic conditions. They don’t just produce acid; they also manufacture a sticky, glue-like substance from sucrose that helps them anchor firmly to the tooth surface and to each other. This creates a dense, organized colony that’s hard to dislodge with saliva alone. The stickier and thicker this biofilm gets, the longer acid stays in direct contact with your enamel.
Your Saliva Is Constantly Repairing Damage
Here’s something most people don’t realize: your teeth are in a constant cycle of losing and regaining minerals throughout the day. Every time you eat, acid production drives minerals out of the enamel. Between meals, your saliva works to reverse that damage.
Saliva is naturally supersaturated with calcium and phosphate ions above a pH of about 5.3. That means it can deposit those minerals back onto the enamel surface, rebuilding the crystal structure in a process called remineralization. Saliva also contains bicarbonate, which acts as a buffer to neutralize acids and bring the pH back up. As long as remineralization keeps pace with demineralization, no permanent damage occurs.
A cavity forms when this balance tips. If acid attacks happen too frequently, or last too long, or your saliva can’t do its job effectively, the enamel loses more mineral than it gains back. Over time, the weakened area collapses into a physical hole.
Why Sugar Matters More Than Almost Anything Else
Cavities don’t develop without fermentable carbohydrates in the diet. Among all dietary sugars, sucrose (table sugar) has the greatest potential to cause decay. It’s not just that bacteria can feed on it. Sucrose is the raw material those bacteria use to build the sticky scaffold that holds plaque together. Other sugars like fructose and glucose also contribute, but sucrose uniquely promotes both acid production and biofilm adhesion.
A clinical trial in Finland tracked three groups consuming diets sweetened with sucrose, fructose, or xylitol (a sugar alcohol) over two years. The sucrose group had twice the number of decayed, missing, or filled tooth surfaces compared to the fructose group. The xylitol group had virtually none. Xylitol can’t be fermented by oral bacteria, so it essentially starves them.
Frequency matters more than quantity. Sipping a sugary drink over several hours exposes your teeth to repeated acid attacks, keeping the pH low for extended periods and giving saliva little chance to repair the damage. Eating the same amount of sugar in one sitting and then stopping is less harmful because your saliva gets time to neutralize the acid and restore minerals before the next challenge.
How a Cavity Progresses
Decay doesn’t appear overnight. Most cavities develop over a period of months to years, depending on your oral hygiene, diet, and saliva quality. The process moves through distinct stages.
The earliest sign is a white spot on the enamel surface. This is an area where minerals have been lost but the surface hasn’t yet broken down into an actual hole. At this stage, the damage is completely reversible. Fluoride, good hygiene, and reduced sugar intake can allow remineralization to rebuild the weakened area.
If demineralization continues, the enamel surface eventually breaks through. Once decay penetrates past the enamel into the softer layer underneath called dentin, it spreads more quickly. Dentin begins to dissolve at a higher pH (around 6.0 compared to 5.5 for enamel), and it’s less dense, so acid moves through it faster. This is often when you first notice sensitivity to hot, cold, or sweet foods.
Left untreated, decay can reach the innermost part of the tooth, the pulp, which contains nerves and blood vessels. This is when a mild nuisance becomes serious pain and potentially an infection that requires more invasive treatment.
Dry Mouth Accelerates Decay
Because saliva is your primary defense against cavities, anything that reduces saliva flow dramatically increases your risk. Dry mouth, known clinically as xerostomia, removes both the buffering capacity and the mineral supply that keep enamel intact. Without adequate saliva, acid lingers longer on tooth surfaces, and remineralization slows to a crawl.
Cavities in people with dry mouth tend to appear rapidly and in unusual locations, particularly around the gum line where teeth are most vulnerable. Hundreds of common medications cause dry mouth as a side effect, including antihistamines, antidepressants, blood pressure medications, and drugs used for overactive bladder. Radiation therapy to the head and neck, certain autoimmune conditions, and simple aging can also reduce saliva production.
How Fluoride Changes the Chemistry
Fluoride works by swapping into the mineral crystal structure of your enamel. When fluoride ions replace some of the hydroxyl groups in hydroxyapatite, the resulting crystal is harder, more stable, and more resistant to acid. The modified enamel doesn’t begin dissolving until the pH drops below about 4.5, well below the 5.5 threshold for untreated enamel. That’s a meaningful difference because most acid attacks from food and bacteria don’t push the pH that low.
Fluoride also promotes remineralization. When it’s present in saliva during the repair phase, minerals are deposited back onto enamel more efficiently. This is why regular exposure to small amounts of fluoride, through toothpaste, drinking water, or rinses, provides ongoing protection rather than a one-time fix.
Who Gets Cavities and Why
Cavities affect people across all age groups. CDC surveillance data from 2024 shows about 11% of children aged 2 to 5 already have untreated decay in their baby teeth, rising to nearly 18% by ages 6 to 8. Among adolescents, about 10% have untreated cavities in their permanent teeth. Adults carry the highest burden: nearly 21% of those aged 20 to 64 have at least one untreated cavity, dropping to about 13% among adults 65 and older.
Several factors beyond diet and hygiene influence who gets cavities. The natural composition of your saliva, the specific mix of bacteria you carry, the shape and spacing of your teeth (deep grooves and tight contacts trap more plaque), and whether you breathe through your mouth at night all play a role. Some people do everything “right” and still get cavities, while others seem resistant despite mediocre habits. That said, the fundamentals remain the same for everyone: reducing sugar frequency, disrupting plaque through brushing and flossing, maintaining saliva flow, and getting regular fluoride exposure are the most effective ways to keep the balance tipped toward repair rather than destruction.

