A cavity forms when acid produced by bacteria in dental plaque dissolves tooth mineral faster than saliva can repair it, creating a tiny hole that deepens over months to years until it reaches the softer dentin and, eventually, the pulp. The process is a chemical and microbial cascade, not a sudden event. Enamel demineralizes at roughly pH 5.5, and each acid attack can last 20 minutes or more after a single sugar exposure.

The chemistry of demineralization

Tooth enamel is about 96 percent mineral by weight, mostly a calcium phosphate crystal called hydroxyapatite. That crystal dissolves when the fluid around it turns acidic. Bacteria such as Streptococcus mutans and Lactobacillus ferment dietary sugars into lactic acid within seconds of exposure. When plaque pH drops below a critical threshold—roughly 5.5 for enamel and around 6.2 to 6.5 for the softer root surface—the mineral begins to leach out.

Saliva normally reverses this. It buffers acid, supplies calcium and phosphate, and carries them back into partially demineralized enamel in a repair process called remineralization. A cavity is what happens when demineralization wins that tug-of-war repeatedly over time. The balance tips with frequent sugar exposures, dry mouth, or plaque that stays put.

The earliest lesion is a white spot: subsurface mineral loss with an intact surface layer. At that stage the process is still reversible. Once the surface collapses, the defect is permanent and the body cannot rebuild it.

Why cavities penetrate inward faster than they spread

Enamel is the hardest tissue in the body, harder than bone, yet it is brittle and thin—about 2.5 millimeters at most on chewing surfaces. Dentin beneath it is softer and more porous, threaded with microscopic tubules that lead toward the pulp. The upshot is counterintuitive: a cavity can look small on the surface while spreading widely through dentin underneath, like a narrow tunnel opening into a cavern.

Dentin is also more soluble in acid than enamel, so once decay breaches the enamel cap, progression accelerates. From there the infection can reach the pulp—the nerve and blood supply—and trigger pain, infection, or abscess. This is why a dentist probes with a sharp explorer and takes radiographs: the visible opening often understates the damage.

The time course of a cavity

Decay is a chronic, episodic process measured in months, not minutes. The timeline below reflects typical progression for an untreated lesion in a permanent tooth; rates vary widely with diet, saliva, and oral hygiene.

Stage Approximate timing What is happening
Plaque accumulation Hours to days Bacterial biofilm matures on the tooth surface
Acid attack Within seconds of sugar pH drops below 5.5; mineral begins dissolving
Reversible white spot Weeks to months Subsurface demineralization; surface still intact
Enamel breakdown Months Surface collapses; a physical hole forms
Dentin involvement Months after enamel breach Softer dentin decays faster and wider
Pulp exposure Variable, often months to years untreated Bacteria reach the nerve; pain and infection
Abscess or tooth loss Variable Infection spreads beyond the tooth

The lesson embedded in that table: there is usually a long window in which a lesion is still reversible. Most cavities are not emergencies at the start.

Quantified context: sugar, frequency, and thresholds

What matters most is not just how much sugar someone eats but how often. Each sugar exposure fuels an acid attack that can persist 20 to 30 minutes. Sipping a sweet drink across an hour can produce near-continuous acid exposure, whereas eating the same sugar in one sitting produces one attack.

The key numbers to hold onto: enamel demineralizes below about pH 5.5, and a healthy resting plaque pH sits near neutral (around 6.5 to 7). Fluoride shifts the equilibrium—it makes enamel more resistant to acid and enhances remineralization, which is why fluoridated water and toothpaste measurably reduce decay across populations, according to the CDC. Sugar frequency, dry mouth, and fluoride exposure are the levers that move the balance.

Where the simple story breaks down

Textbook explanations treat cavities as a uniform sugar-and-bacteria problem. Reality is messier, and this is the professional caveat worth stating plainly: the same diet produces very different outcomes in different mouths. Saliva flow is a major variable. Medications, aging, and certain conditions reduce saliva, removing the buffer that normally protects teeth. Root-surface decay becomes far more common as gums recede.

Not all decay is the same. Smooth-surface cavities on the sides of teeth progress slowly; pit-and-fissure cavities on chewing surfaces start early and are easy to miss. Bottle feeding and frequent snacking in early childhood can produce rapid, widespread decay. None of this contradicts the acid mechanism—it simply shows that the host, not just the bacteria, determines the pace.

Common misconceptions

Sugar itself does not dissolve teeth. Bacteria convert sugar to acid, and the acid does the damage. A cavity does not always hurt. Pain typically signals deep decay or pulp involvement, not early disease. Enamel does not regrow. Early lesions can remineralize, but a true hole never fills itself. Brushing immediately after an acidic meal can abrade softened enamel. Waiting about 30 minutes is the gentler choice. Small cavities do not reliably "heal" with hygiene alone. Reversible lesions may arrest, but established defects need professional care. Fluoride is not a coating that blocks decay. It changes the chemistry of demineralization and remineralization.

Practical actions and thresholds

The goal is to keep teeth above the demineralization threshold and give saliva time to repair. Concrete steps:

Brush twice daily with a fluoride toothpaste; the American Dental Association recommends fluoride as a proven decay preventive. Limit sugar exposures to mealtimes rather than grazing throughout the day. Drink water after sugary or acidic foods to help restore neutral pH. Chew sugar-free gum after meals to stimulate saliva flow. Address dry mouth with a clinician, since reduced saliva accelerates decay. Keep routine dental visits; early lesions are far easier to arrest than to restore.

Thresholds to reconcile: remineralization and demineralization are not fixed switches but a balance point that shifts with pH, fluoride, and time. A single acid attack is survivable; repeated attacks without recovery time are what create cavities. The practical target is fewer attacks and more recovery windows, not perfection.

Limitations of what this explains

This mechanism describes the disease process, not a diagnosis or treatment plan. Individual risk varies with genetics, medications, medical conditions, and access to care. Anyone with tooth pain, a visible hole, or swelling should see a dental professional rather than rely on general information. The chemistry is well established; the individual outcome is not predictable from a web page.