Cavities form when bacteria in your mouth feed on sugars and starches, producing acids that dissolve the mineral structure of your teeth. This process doesn’t happen overnight. Most cavities develop over months to years, progressing through distinct stages that start with invisible chemical changes and end with a visible hole in the tooth. About 21% of American adults between 20 and 64 have at least one untreated cavity, making this one of the most common chronic conditions in the world.
What Happens Inside Your Mouth
Your mouth is home to hundreds of species of bacteria, but one in particular drives most tooth decay: Streptococcus mutans. This bacterium thrives on carbohydrates and has specialized transport systems that let it absorb sugars even when they’re present in tiny concentrations. Once it takes in a sugar like sucrose, it metabolizes it rapidly and excretes lactic acid as a byproduct.
That lactic acid is the real problem. Your tooth enamel, the hard outer shell of each tooth, is made of a crystalline mineral called hydroxyapatite. It’s incredibly strong, but it has a weakness: acid. When the pH in your mouth drops below about 5.5, enamel crystals begin to dissolve. The lactic acid produced by bacteria can push pH as low as 4, well past that threshold. At that point, calcium and phosphate ions start leaching out of the enamel surface, a process called demineralization.
This acid attack doesn’t happen in isolation. Bacteria live in a sticky film called plaque (or biofilm) that clings to tooth surfaces, especially in grooves, between teeth, and along the gumline. The plaque traps acid right against the enamel, concentrating its effects on a small area. That’s why cavities tend to form in specific spots rather than across the whole tooth.
Your Body’s Built-In Repair System
Here’s something most people don’t realize: your teeth are constantly losing and regaining minerals throughout the day. Every time you eat, bacteria produce acid and minerals dissolve out of your enamel. Between meals, your saliva neutralizes that acid and delivers calcium and phosphate ions back to the tooth surface, rebuilding what was lost. This cycle of demineralization and remineralization happens dozens of times daily.
Saliva is remarkably good at this repair job. It buffers acid, washes away food particles, and supplies the raw materials your enamel needs to heal. Fluoride supercharges the process. It doesn’t actually become part of the enamel structure, but it has a strong chemical affinity for calcium phosphate and accelerates the formation of new mineral crystals on the tooth surface. That’s the entire basis for fluoride toothpaste and fluoridated water. Fluoride can only do its job, though, when enough calcium and phosphate are available in saliva.
A cavity forms when this balance tips. If acid attacks happen too frequently, last too long, or your saliva can’t keep up, mineral loss outpaces mineral gain. Over time, the enamel weakens from the inside out.
How a Cavity Progresses
The earliest sign of trouble is a white spot lesion: a small, chalky white patch on the tooth. It appears because the enamel beneath the surface has become porous from mineral loss, changing how light reflects off it. These spots are often only visible when the tooth is dry, which is one reason dentists blow air on your teeth during an exam. At this stage, the damage is completely reversible. Improved brushing, fluoride treatment, and dietary changes can allow the enamel to remineralize and the white spot to fade.
If the acid exposure continues, the enamel porosity increases and the spaces between mineral crystals widen. Acids penetrate deeper, and mineral loss beneath the surface accelerates faster than loss at the surface itself. This creates a hollow, weakened zone under what may still look like an intact tooth. Eventually the thin outer shell collapses, leaving a microcavity, a small physical break in the enamel.
Once bacteria gain access to the softer layer beneath the enamel (called dentin), decay speeds up considerably. Dentin begins dissolving at a higher pH, around 6.0, meaning it’s even more vulnerable to acid than enamel. Left untreated, the cavity grows into a visible hole and can eventually reach the innermost part of the tooth where nerves and blood vessels live, causing pain, infection, or abscess. The entire process from white spot to visible cavity typically takes months to years, depending on your diet, oral hygiene, and saliva quality.
Foods That Cause the Most Damage
Sugar gets most of the blame, and for good reason. Sucrose is the preferred fuel for cavity-causing bacteria. But sugar isn’t the only culprit. Refined starches can be just as damaging, sometimes more so. An enzyme in your saliva starts breaking down starch into simple sugars the moment food enters your mouth. Up to 50% of the starch in bread is converted to maltose within 30 seconds of chewing.
Highly processed starchy foods are the worst offenders. Research comparing different carbohydrate sources found that white bread caused plaque pH to drop more than twice as much as minimally processed foods like chickpeas (a drop of 1.5 pH units versus 0.7). Instant mashed potatoes, crackers, chips, and other foods where the starch has been cooked and broken down are more rapidly digested in the mouth, feeding bacteria faster and producing more acid. In some cases, these processed starches pose a greater cavity risk than sugary foods.
Frequency matters as much as quantity. Every time you eat or drink something containing carbohydrates, you trigger an acid attack that lasts roughly 20 to 30 minutes. Sipping a sugary drink over several hours exposes your teeth to nearly continuous acid, far worse than drinking the same amount all at once. The World Health Organization recommends keeping free sugar intake below 10% of total daily calories, and ideally below 5%, to minimize cavity risk throughout life.
Why Some People Get More Cavities
If you’ve ever wondered why some people seem cavity-prone despite decent brushing habits, saliva is often the answer. People with dry mouth, whether from medications, medical conditions, or aging, lose their primary defense against decay. Without adequate saliva, the mouth becomes more acidic, acid-producing bacteria multiply faster, minerals leach from teeth without being replaced, and food debris lingers longer. It’s one of the strongest risk factors for rapid cavity development.
Hundreds of common medications cause dry mouth as a side effect, including antihistamines, antidepressants, blood pressure drugs, and decongestants. Radiation therapy to the head and neck can permanently damage salivary glands. People in these situations often develop cavities at an accelerated rate, even on tooth surfaces that normally resist decay.
Other factors that shift the balance toward cavities include infrequent brushing (plaque left undisturbed for hours produces more acid), crowded or overlapping teeth (which trap plaque in hard-to-reach spots), receding gums (which expose the more vulnerable root surfaces), and diets high in frequent snacking. Children are particularly susceptible: nearly 18% of kids aged 6 to 8 have untreated decay in their baby teeth.
What Actually Prevents Them
Prevention comes down to disrupting the cycle at every possible point. Brushing twice daily with fluoride toothpaste removes plaque before it can produce sustained acid attacks and delivers fluoride directly to the enamel surface. Flossing clears bacteria from between teeth where your brush can’t reach. These basics matter more than any other intervention.
Limiting how often you eat sugary or starchy foods reduces the number of acid attacks per day. Choosing less processed carbohydrates, like whole grains and legumes over white bread and chips, produces less acid at the tooth surface. Drinking water after meals helps rinse away food debris and dilute acid. Sugar-free gum stimulates saliva flow, which accelerates remineralization between meals.
For people with dry mouth, staying hydrated, using saliva substitutes, and applying prescription-strength fluoride can help compensate for the lost protective effects of natural saliva. Regular dental cleanings remove hardened plaque (tarite) that brushing alone can’t eliminate, especially in the crevices where cavities most commonly start.