Cavities form when bacteria in your mouth feed on sugars and produce acids that dissolve the minerals in your teeth. It’s a process that happens gradually, often over months or years, and nearly 21% of adults between 20 and 64 have at least one untreated cavity right now. Understanding the chain of events that leads to a cavity gives you a real advantage in preventing them.
What Actually Happens Inside Your Mouth
Your tooth enamel is the hardest tissue in your body, made up of about 96% mineral (primarily calcium and phosphate arranged in a crystal structure). Despite that toughness, it has a specific vulnerability: acid. Certain bacteria that live in the sticky film on your teeth, called plaque, consume sugars from the food you eat and excrete acids as a waste product, primarily lactic acid. When enough acid builds up in one spot, it starts pulling calcium and phosphate ions out of the enamel crystals. This process is called demineralization.
The critical threshold is a pH of roughly 5.5, though it varies from person to person. If you have naturally high levels of calcium and phosphate in your saliva, your teeth can resist acid down to about pH 5.5. If those mineral levels are low, your enamel may start dissolving at a pH as high as 6.5. For reference, a healthy resting mouth sits around pH 6.5 to 7.0. Every time you eat or drink something with sugar, plaque bacteria drive that pH down to around 5.0 within just two to four minutes. It then takes roughly 45 minutes for your mouth to recover back to a safe pH. That entire window is time your enamel spends under acid attack.
Why Sugar Matters So Much
Sugar itself doesn’t damage your teeth directly. The problem is that sugar is the preferred fuel for acid-producing bacteria. When there’s excess sugar available, these bacteria ramp up their metabolism and pump out lactic acid as their main byproduct. The more frequently you give them sugar, the more acid attacks your teeth endure throughout the day.
This is why frequency matters more than quantity. Sipping a sugary drink over three hours is far worse than drinking it in five minutes, because you’re resetting that 45-minute acid clock over and over. Sticky or chewy sweets that cling to teeth are similarly problematic because they keep feeding bacteria long after you’ve finished eating. Starchy foods that break down into simple sugars in your mouth, like crackers and chips, can have the same effect.
How Your Body Fights Back
Your mouth has a built-in repair system: saliva. Saliva does three critical things. First, it physically washes away food particles and bacteria. Second, it contains bicarbonate and other compounds that neutralize acids, buffering the pH back toward safe levels. Third, and most importantly, saliva carries dissolved calcium and phosphate ions that can redeposit into damaged enamel, essentially patching early mineral loss before it becomes a permanent hole.
This repair process, called remineralization, is happening constantly. In a healthy mouth, demineralization and remineralization stay roughly in balance. A cavity only forms when the balance tips toward mineral loss for long enough that the damage becomes irreversible. Fluoride supercharges this repair process. When fluoride is present during remineralization, it integrates into the enamel crystal structure, creating a form of the mineral that is significantly more resistant to acid than the original. Even low concentrations of fluoride (under 100 parts per million) are enough to trigger this conversion.
The Stages of a Cavity
Cavities don’t appear overnight. They progress through distinct stages, and the earliest ones are actually reversible.
- White spots. The first visible sign is a chalky white patch on the tooth surface. This is enamel that has lost minerals but hasn’t broken down structurally yet. At this stage, good oral hygiene, fluoride, and adequate saliva flow can reverse the damage entirely.
- Enamel decay. If mineral loss continues, the white spot may darken to brown and the enamel surface starts to break down physically. Once there’s an actual hole in the enamel, you have a cavity that needs a filling. You may not feel any pain at this point because enamel has no nerve endings.
- Dentin decay. Beneath the enamel sits dentin, a softer, more porous layer. Once bacteria and acid reach dentin, decay accelerates quickly. This is often when you start noticing sensitivity to hot, cold, or sweet foods, because dentin contains tiny tubes that connect to the tooth’s nerve.
- Pulp damage. The innermost part of your tooth contains the nerve and blood supply. When decay reaches this layer, you’ll typically experience significant pain. Treatment at this stage usually means a root canal, where the infected tissue is removed and the tooth is sealed and capped.
- Abscess. If infection from the decayed tooth spreads beyond the root tip, a pocket of pus can form in the surrounding bone. This is a dental abscess, and it can cause severe, throbbing pain, swelling, and fever. In the worst cases, the tooth can’t be saved.
Why Some People Get More Cavities
Diet and brushing habits are the most obvious factors, but they don’t explain everything. Some people brush diligently and still get cavities, while others seem immune despite mediocre hygiene. Several less obvious factors play a role.
Dry mouth is one of the biggest hidden risk factors. Without adequate saliva, your mouth loses its primary defense against acid and its main source of repair minerals. Hundreds of medications, both prescription and over-the-counter, reduce saliva production. Antihistamines, decongestants, certain antidepressants, blood pressure medications, and drugs for overactive bladder are common culprits. Dry mouth is also worse at night, which is one reason nighttime brushing is so important.
The composition of your saliva matters too. People whose saliva naturally carries higher concentrations of calcium and phosphate can tolerate more acid exposure before their enamel starts dissolving. This is partly genetic and partly influenced by diet and hydration. The bacterial makeup of your mouth also varies from person to person. Some people harbor more aggressive acid-producing strains, and these bacteria can be passed between people through saliva, which is why parents are sometimes advised not to share utensils with infants.
Tooth anatomy plays a role as well. Deep grooves and pits on the chewing surfaces of molars trap food and bacteria in spots your toothbrush can’t easily reach. Crowded or overlapping teeth create similar hard-to-clean zones. Receding gums expose tooth root surfaces, which lack the thick enamel layer and are more vulnerable to decay.
Practical Ways to Shift the Balance
Since cavities are fundamentally about the balance between acid damage and mineral repair, prevention comes down to tipping that balance in your favor. Brushing twice a day with fluoride toothpaste addresses multiple angles at once: it physically removes plaque bacteria, disrupts the biofilm before it matures, and delivers fluoride directly to the enamel surface. Flossing handles the surfaces between teeth where your brush can’t reach and where cavities frequently start.
Reducing how often you eat sugary or starchy snacks limits the number of acid attacks per day. Drinking water after meals helps dilute acids and rinse away food particles. Chewing sugar-free gum stimulates saliva flow, which speeds up the pH recovery and delivers more repair minerals to your teeth. If you take medications that cause dry mouth, staying hydrated and using saliva substitutes or stimulants can help compensate.
Fluoride exposure beyond toothpaste, through fluoridated tap water or professional treatments, provides additional protection by continuously strengthening enamel against acid. Children are especially good candidates for dental sealants, thin protective coatings applied to the chewing surfaces of molars that physically block bacteria from settling into deep grooves. CDC data shows that about 11% of children ages 2 to 5 and nearly 18% of children ages 6 to 8 already have untreated decay, so early prevention matters.

