A cavity is a permanently damaged area in the hard surface of a tooth, caused by acid that bacteria produce when they feed on sugars left in your mouth. The process starts with invisible mineral loss on the enamel surface and, if left unchecked, eats through successive layers of the tooth until it reaches the nerve-rich pulp inside. Cavities are among the most common chronic diseases worldwide, yet the chemistry behind them is straightforward enough that most of the damage is preventable.
How Acid Eats Through a Tooth
Your teeth are mostly made of hydroxyapatite, a tightly packed mineral crystal of calcium and phosphate. That mineral is tough, but it has a weakness: acid. When the pH at the tooth surface drops, the fluid surrounding the enamel becomes undersaturated with respect to those calcium and phosphate ions, and the crystal begins to dissolve. The rate of dissolution depends on how acidic the environment is and on the specific organic acids present.1PubMed. Kinetics of hydroxyapatite dissolution in acetic, lactic, and phosphoric acid solutions This is not a one-time event. Every time you eat or drink something containing fermentable carbohydrates, acid-producing bacteria in the plaque on your teeth convert those sugars into organic acids like lactic acid, creating repeated bouts of mineral loss at the tooth surface.2Science and Innovation. Mechanism of Dental Enamel Demineralization: The Role of Organic Acids, pH, and Hydroxyapatite Dissolution – Section: Abstract
Between those acid attacks, your saliva works to repair the damage. Saliva dilutes and clears acids through swallowing, and its bicarbonate content buffers the pH back toward neutral.3PubMed Central. Saliva and dental erosion It also carries dissolved calcium and phosphate ions back to the tooth surface, allowing minerals to redeposit into the damaged crystal. A cavity forms when the balance tips: when acid attacks happen often enough, or last long enough, that saliva cannot keep up with the repair.
The Bacteria Driving the Process
Your mouth contains hundreds of bacterial species, but the one most consistently linked to cavity formation is Streptococcus mutans. It thrives in the sticky biofilm (plaque) that accumulates on tooth surfaces and is considered the main cariogenic organism in dental caries progression.4PubMed Central. Biofilm formation by Streptococcus mutans and its inhibition by green tea extracts – Section: Abstract What makes S. mutans so effective at causing damage is a combination of traits: it produces large amounts of lactic acid from sugar, it tolerates acidic environments that kill off competing bacteria, and it manufactures sticky polymers that help the biofilm cling to the tooth surface.5PubMed Central. Streptococcus mutans extracellular DNA levels depend on the number of bacteria in a biofilm
Other acid-producing species contribute too, including various Lactobacillus species and Bifidobacteria, but S. mutans tends to dominate in the early stages of enamel breakdown. People with high levels of mutans streptococci in their saliva and plaque tend to have higher rates of cavities, which is why some caries risk assessment approaches measure how much of this bacterium is present in your mouth.6PubMed Central. Salivary biomarkers for caries risk assessment
Why Frequency of Sugar Matters More Than Amount
It is a common misconception that the total amount of sugar you eat determines your cavity risk. In reality, how often you expose your teeth to sugar matters at least as much. After you eat something sugary, the pH in your plaque drops rapidly and stays low for a period. The classic model holds that it takes about 30 minutes for pH to recover after a sugary intake, though pH-telemetry experiments have shown that the drop can continue well beyond that 30-minute window.7Caries Research. Sugar Restriction for Caries Prevention: Amount and Frequency. Which Is More Important? – Section: When Do Two Occasions Count for Two or One Each new exposure resets the clock. So sipping a sugary drink over two hours creates a far longer acid attack than drinking it in five minutes, even though the total sugar consumed is the same.
This is also why starchy and sticky snacks can be more damaging than their sugar content suggests. Foods that cling to teeth or get packed into grooves keep feeding bacteria long after you have finished eating. The practical takeaway: limiting how often you snack, rinsing with water after eating, and avoiding prolonged sipping on sweetened beverages all reduce the cumulative acid exposure your teeth face each day.
Saliva as Your Built-In Defense System
Saliva does not get enough credit. Beyond simply washing food away, it performs several functions that directly protect teeth. It buffers acids, keeping the pH from dropping too low for too long. It delivers calcium, phosphate, and fluoride ions to the tooth surface, fueling the remineralization that repairs early damage. It coats teeth with a thin protein film called the acquired pellicle, which acts as a partial barrier against acid. And it contains antimicrobial proteins that help control bacterial populations.8PubMed. Salivary biomarkers for dental caries
This is why people with reduced saliva flow face dramatically higher cavity rates. Conditions that cause dry mouth, whether from medications (antihistamines, antidepressants, blood pressure drugs), radiation therapy to the head and neck, or autoimmune diseases like Sjögren’s syndrome, remove the mouth’s primary defense mechanism. A decrease in saliva flow leads to food retention that promotes plaque buildup, while the reduced buffering capacity allows acids to linger longer.9Padjadjaran Journal of Dentistry. The influence of tooth brushing time over saliva buffering capacity – Section: Abstract If you take a medication that dries your mouth, talk to your dentist about compensatory measures like more frequent fluoride use or saliva substitutes.
Stages of a Cavity
Cavities do not appear overnight. The process unfolds in distinct stages, and catching it early makes a real difference in what kind of treatment you need.
White Spot Lesions
The first visible sign of trouble is a white spot lesion: a chalky, opaque patch on the enamel surface. At this stage, the subsurface enamel has lost minerals, but the outer surface layer is still largely intact. White spot lesions are the first stage of caries, and their prevalence has been increasing in recent years, particularly among people undergoing orthodontic treatment, where brackets and wires make thorough cleaning difficult.10PubMed Central. White spot lesions: diagnosis and treatment – a systematic review – Section: BACKGROUND The good news is that white spot lesions are reversible. With improved hygiene, fluoride exposure, and reduced sugar frequency, the enamel can remineralize and the lesion can heal without any drilling.
Enamel Breakdown
If the acid attacks continue, the weakened enamel surface eventually collapses, creating a physical hole. Once that outer shell is broken, bacteria and acid gain direct access to the softer enamel beneath. At this point, the damage is no longer reversible on its own. A dentist will need to remove the decayed material and place a filling. Many people first notice a cavity at this stage, sometimes because of sensitivity to sweets or cold, sometimes because their tongue can feel a rough edge or hole.
Dentin Involvement
Beneath the enamel sits dentin, a living tissue laced with tiny tubules that run toward the nerve. Dentin is softer and more mineral-poor than enamel, so once acid and bacteria reach it, decay can spread faster. The initial dentin reaction involves the tubules becoming translucent and eventually discolored as demineralization advances from the enamel-dentin boundary inward.11PubMed. A structural analysis of approximal enamel caries lesions and subjacent dentin reactions Bacteria then penetrate the tubules and begin breaking down the material between them.12PubMed. Structural events in the caries process in enamel, cementum, and dentin Cavities at this stage tend to produce more noticeable pain, especially with hot, cold, or sweet stimuli, because the tubules create a direct path to the nerve.
Pulp Infection and Beyond
If dentin decay is not treated, bacteria eventually reach the pulp, the innermost chamber of the tooth containing nerves and blood vessels. Pulp inflammation can start as a reversible sensitivity but progresses to irreversible damage and, ultimately, tissue death. At this stage, a simple filling is no longer enough. You are looking at a root canal, a crown, or, in the worst cases, extraction. Untreated caries that reaches pulp involvement, fistulas, or abscesses has a significant negative impact on quality of life, particularly in children, affecting their ability to eat, sleep, and interact socially.13Journal of Iranian Medical Council. Relation between Consequences of Untreated Dental Caries (Pufa Index) and Oral Health Related Quality of Life in 4 to 6 Years Old Children – Section: Abstract14PubMed. Impact of untreated dental caries and its clinical consequences on the oral health-related quality of life of schoolchildren aged 8-10 years – Section: RESULTS
How Fluoride Protects Teeth
Fluoride works by inserting itself into the hydroxyapatite crystal, replacing a hydroxyl group and creating a modified mineral called fluorapatite. Fluorapatite has a more compact crystal structure, which makes it substantially more resistant to acid dissolution. The key reason: when pH drops, hydroxyl ion concentration falls much more steeply than fluoride ion concentration, so a fluoride-enriched crystal can withstand lower pH before it begins to break down.15PubMed Central. How Fluoride Protects Dental Enamel from Demineralization – Section: Conclusion Fluoride also promotes remineralization by attracting calcium and phosphate ions to the tooth surface and incorporating into the newly formed mineral.
You get fluoride from multiple sources: toothpaste, mouth rinses, professional treatments, and, in many areas, drinking water. The topical effect (fluoride directly contacting the tooth surface) is considered the most important mechanism. This is why brushing with fluoride toothpaste twice daily is considered the single most evidence-backed thing you can do to prevent cavities.
Dental Sealants
The chewing surfaces of back teeth (molars and premolars) have deep grooves and pits where food debris and bacteria collect and where toothbrush bristles often cannot reach. Dental sealants are thin resin coatings painted into those grooves, creating a physical barrier that prevents bacteria from colonizing the surface and makes cleaning easier.16PubMed Central. A concise review of dental sealants in caries management – Section: Abstract
The evidence behind sealants is strong. A Cochrane systematic review found that resin-based sealants on the chewing surfaces of permanent molars in children and adolescents reduced caries by roughly 11% to 51% compared to no sealant at two years, with the protective effect maintained at longer follow-up.17PubMed Central. Pit and fissure sealants for preventing dental decay in permanent teeth – Section: Authors’ conclusions An earlier Cochrane analysis modeled this more concretely: if 40% of unsealed tooth surfaces would develop caries over two years, sealing them dropped that figure to about 6%.18Cochrane Database of Systematic Reviews. Sealants for preventing dental decay in the permanent teeth – Section: Abstract Sealants are typically applied to children’s permanent molars soon after they erupt, usually between ages six and twelve, but they can benefit adults with deep, cavity-prone grooves as well.
Silver Diamine Fluoride
One of the more interesting developments in cavity management over the past decade is the wider adoption of silver diamine fluoride (SDF), a liquid that can arrest (stop the progression of) active cavities without drilling. SDF combines two active agents. The silver component kills cariogenic bacteria and inhibits enzymes that would otherwise break down dentin collagen. The fluoride component promotes the formation of fluorapatite, which is more acid-resistant, and further protects the tooth structure from breakdown.19PubMed. Arresting Dentine Caries with Silver Diamine Fluoride: What’s Behind It? Research has shown that SDF is bactericidal to S. mutans, reduces mineral loss from demineralized enamel and dentin, and inhibits the collagenases that destroy dentin protein.20PubMed Central. Mechanisms of silver diamine fluoride on arresting caries: a literature review – Section: RESULTS
The catch is cosmetic. SDF permanently stains the treated area black, which limits its appeal on front teeth in adults. But for young children who cannot sit through traditional restorative procedures, for elderly patients with root caries, or for anyone with limited access to dental care, SDF offers a painless, low-cost way to stop decay in its tracks. It is applied in seconds with a small brush and requires no anesthesia or drilling.
Xylitol and Sugar Substitutes
Xylitol is a sugar alcohol found naturally in some fruits and widely used as a sweetener in sugar-free gum. Unlike table sugar, xylitol cannot be fermented by S. mutans into acid, and there is evidence it may actively reduce cavity-causing bacteria. Multiple studies have found that xylitol chewing gum decreased mutans streptococci counts compared to gum sweetened with sorbitol.21PubMed Central. Specific effects of xylitol chewing gum on mutans streptococci levels, plaque accumulation and caries occurrence: a systematic review – Section: RESULTS Xylitol has been described as promising for reducing dental caries and even reversing early caries lesions.22PubMed Central. The effect of xylitol on dental caries and oral flora – Section: Abstract
That said, the evidence is less overwhelming than you might expect from the marketing. A meta-analysis found a modest reduction in mutans streptococci counts with xylitol compared to other caries prevention strategies, but the result was not statistically significant.23PubMed Central. Xylitol in preventing dental caries: A systematic review and meta-analyses – Section: Abstract Xylitol gum is best thought of as a useful supplement to brushing, flossing, and fluoride, not a replacement for any of them. Chewing any sugar-free gum after meals stimulates saliva flow, which helps clear acids regardless of the sweetener.
Cavities in Young Children
Early childhood caries (ECC) is one of the most common chronic diseases in preschool-aged children. It is often linked to feeding practices like prolonged bottle use at bedtime, where sugary liquids bathe the teeth for hours while saliva flow is naturally low during sleep.24PubMed Central. Early childhood caries A particular concern is that the bacteria responsible for cavities are not something babies are born with. Mutans streptococci are acquired from human reservoirs, typically through vertical transmission from caregivers, via shared utensils, kissing, or pre-chewing food.25PubMed. Early Childhood Caries (ECC): an infectious transmissible oral disease Evidence shows these bacteria can colonize infant mouths even before teeth emerge.
Reducing transmission risk does not mean avoiding all contact with your child. It means being aware that cavity-causing bacteria are transferable and taking practical steps: not sharing spoons or cleaning a pacifier in your own mouth, keeping your own oral health in good shape (fewer bacteria in your mouth means fewer to pass along), and beginning tooth-cleaning as soon as the first tooth appears. Once teeth are present, the American Academy of Pediatric Dentistry recommends using a smear of fluoride toothpaste from the first tooth onward.
Root Caries in Older Adults
Cavities are not just a childhood problem. Older adults face a distinct form of decay called root caries, which attacks the tooth root surfaces that become exposed as gums recede with age. Root surfaces are covered by cementum, a material much thinner and less mineral-dense than enamel, making them vulnerable to acid attack at higher pH levels than enamel would tolerate. Root caries is considered one of the most significant dental problems among older adults, driven by gum recession, reduced dexterity for brushing and flossing, increased use of medications that dry the mouth, and dietary shifts toward softer, more processed foods.26PubMed Central. Elderly at greater risk for root caries: a look at the multifactorial risks with emphasis on genetics susceptibility
For older adults, prevention focuses on the same fundamentals as for younger people, but with extra emphasis on managing dry mouth and maintaining fluoride exposure. Prescription-strength fluoride toothpaste or fluoride varnish applied by a dentist at regular visits can help protect exposed root surfaces. SDF, as described earlier, is also a practical option for arresting root caries in older adults who may struggle with complex dental procedures.
Water Fluoridation
Community water fluoridation remains one of the most effective and cost-efficient public health measures for cavity prevention. A recent review found that water fluoridation reduced caries by roughly 25% across most studies, and that stopping fluoridation consistently led to higher cavity rates and greater need for restorative treatment.27PubMed. An update on community water fluoridation, part 1: Mechanism of action, effectiveness, and cost savings – Section: RESULTS The protective effect is especially strong among groups at high risk for dental caries.28PubMed. The effectiveness of community water fluoridation in the United States
One thing worth understanding is that the measured benefit of water fluoridation has appeared to shrink over the decades. That is not because fluoridated water has become less effective. It is because fluoride toothpaste, fluoride rinses, and other fluoride products are now so widely used that people in non-fluoridated areas still receive some fluoride exposure, narrowing the gap. A national study of four-year-olds in New Zealand found that after adjusting for sociodemographic factors, children in non-fluoridated areas had higher rates of early childhood caries than those in fluoridated areas, though the strength of that association varied by ethnicity.29PubMed. Investigation Into the Effectiveness of Community Water Fluoridation and Dental Caries Experience in 4-Year-Old Aotearoa New Zealand Children: A National Repeated Cross-Sectional Study From 2010 to 2022 – Section: RESULTS Water fluoridation is one layer in a multi-layer defense, and it remains beneficial even when other fluoride sources are available.
Biomimetic Repair on the Horizon
Most current treatments either prevent cavities or replace lost tooth structure with artificial materials. An emerging approach tries something more ambitious: regenerating enamel-like mineral inside an early cavity. Self-assembling peptides are short protein chains designed to diffuse into the porous subsurface of a white spot lesion, form a scaffold, and serve as a template for new hydroxyapatite crystals to grow. Researchers have demonstrated that one such peptide, P11-4, diffuses into subsurface lesions, assembles into higher-order structures throughout the lesion volume, and supports the formation of new hydroxyapatite nanocrystals, increasing mineral density within the damaged area.30PubMed. Biomimetic Remineralization of Carious Lesions by Self-Assembling Peptide This process mimics the way enamel is originally built during tooth development.31PubMed Central. Biomimetic Enamel Regeneration Using Self-Assembling Peptide P11-4 – Section: Abstract
In laboratory comparisons, self-assembling peptide treatment produced higher surface hardness in demineralized enamel than either fluoride alone or casein phosphopeptide-amorphous calcium phosphate fluoride, both of which are established remineralizing agents.32PubMed Central. Comparative evaluation of remineralizing efficacy of biomimetic self-assembling peptide on artificially induced enamel lesions: An in vitro study – Section: Abstract The technology is already available in some clinical settings in Europe under the trade name Curodont Repair, though it is not yet widely used in the United States. It applies only to early-stage enamel lesions. Once a cavity has broken through the surface and involves dentin, you still need conventional restorative work. But for white spot lesions that would otherwise be monitored and hoped to remineralize on their own, peptide-based treatments offer a potentially more active approach to healing the tooth from the inside.