What Causes Cavities? How Tooth Decay Starts and How to Stop It

A cavity is a hole in your tooth caused by acid. Bacteria in your mouth feed on sugars from food and drinks, and they produce acid as a byproduct. That acid slowly dissolves the hard outer layer of your tooth (enamel), creating a cavity. Understanding how this process works is the first step toward preventing it.

6 min readMedically reviewed contentLast updated March 20, 2026

Key Takeaways

  • Cavities form when bacteria in dental plaque produce acid that dissolves tooth enamel over time.
  • Sugar and starch from food and drinks are the primary fuel for cavity-causing bacteria.
  • Risk factors include frequent snacking, dry mouth, poor oral hygiene, and genetics that affect enamel thickness.
  • Cavities progress through stages: white spot, enamel decay, dentin decay, and pulp involvement, which may require a root canal.
  • Fluoride toothpaste, limiting sugary snacks, and regular dental cleanings are the most effective prevention strategies.
  • Children and older adults are at higher risk, but cavities can develop at any age.

How Cavities Form: The Acid Attack

Cavities do not appear suddenly. They develop over weeks and months through a repeated cycle of acid attacks on the tooth surface. Here is how the process works.

Your mouth is home to hundreds of species of bacteria. Some of these bacteria form a sticky film on your teeth called plaque. When you eat or drink something containing sugar or starch, the bacteria in plaque break it down and produce acid. This acid lowers the pH on the tooth surface and begins dissolving the minerals in your enamel, a process called demineralization.

Your saliva works to repair this damage. It contains calcium, phosphate, and fluoride that help rebuild (remineralize) the enamel after each acid attack. When the acid attacks happen more often than your saliva can repair, the enamel breaks down permanently. A cavity forms.

Risk Factors for Cavities

Some people get cavities more easily than others. While bacteria and sugar are the direct cause, several factors influence how likely you are to develop tooth decay.

Diet and Eating Habits

Frequent snacking and sipping sugary drinks throughout the day keeps acid levels high in your mouth for extended periods. Sticky foods like dried fruit, candy, and granola bars cling to teeth and give bacteria more time to produce acid. Acidic drinks like soda, sports drinks, and citrus juice also erode enamel directly, even without bacterial involvement.

The timing and frequency of sugar exposure matters more than the total amount. Eating a piece of candy once and then rinsing your mouth causes less damage than slowly sipping a sugary coffee over two hours.

Dry Mouth (Xerostomia)

Saliva is your mouth's natural defense against cavities. It washes away food particles, neutralizes acid, and delivers minerals that repair early enamel damage. When saliva production drops, cavity risk increases significantly. Dry mouth can be caused by medications (antihistamines, antidepressants, blood pressure drugs), medical conditions (Sjogren's syndrome, diabetes), radiation therapy to the head and neck, and mouth breathing.

Oral Hygiene Habits

Brushing twice daily with fluoride toothpaste and flossing once daily removes plaque before it can do damage. Skipping these steps allows plaque to accumulate and harden into tartar (calculus) within 24 to 48 hours. Tartar cannot be removed by brushing alone and requires professional cleaning.

Genetics and Enamel Quality

Some people inherit thinner enamel or enamel with a mineral composition that is more vulnerable to acid. The shape and spacing of your teeth also matters. Teeth with deep grooves and pits on the chewing surface trap food and bacteria more easily. Crowded or overlapping teeth are harder to clean, which increases plaque buildup in those areas.

The Four Stages of Tooth Decay

Cavities develop in stages. Catching decay early makes treatment simpler and less costly.

Stage 1: White Spot Lesion (Reversible)

The earliest sign of decay is a white, chalky spot on the tooth surface. This indicates that minerals are being lost from the enamel (demineralization), but no actual hole has formed yet. At this stage, the process can be reversed with fluoride treatment, improved oral hygiene, and dietary changes. No drilling or filling is needed.

Stage 2: Enamel Decay

If demineralization continues, the enamel breaks down and a small cavity forms. Enamel has no nerve endings, so you typically will not feel pain at this stage. Your dentist can detect these cavities during a routine exam or on X-rays. Treatment involves removing the decayed portion and placing a filling.

Stage 3: Dentin Decay

Beneath the enamel is a softer layer called dentin. Once decay reaches the dentin, it spreads faster because dentin is less mineralized than enamel. You may start to feel sensitivity to hot, cold, or sweet foods and drinks. A filling is still the standard treatment, but a larger portion of the tooth may need to be removed. In some cases, a crown is necessary.

Stage 4: Pulp Involvement

If decay reaches the innermost layer of the tooth, the pulp, it causes inflammation and infection. The pulp contains nerves and blood vessels, so this stage typically produces significant pain, sensitivity to temperature, and sometimes swelling. At this point, a simple filling is no longer enough. You will need either a root canal to remove the infected pulp and save the tooth, or an extraction if the tooth cannot be saved.

An endodontist is the specialist trained to perform root canal treatment. If your dentist determines that decay has reached the pulp, they may refer you to an endodontist for evaluation.

Cavities in Children vs. Adults

Children are especially prone to cavities for several reasons. Their enamel is thinner and less mineralized than adult enamel. They tend to eat more sugary snacks and may not brush as thoroughly. Baby teeth also have thinner enamel than permanent teeth, which means decay can progress to the nerve faster.

Adults develop cavities too, particularly in areas where gums have receded and exposed the tooth root. Root surfaces lack the hard enamel covering that protects the crown of the tooth, making them highly susceptible to decay. Older adults taking multiple medications often experience dry mouth, which further increases risk.

Cavities around the edges of old fillings are also common in adults. Over time, fillings can crack or pull away from the tooth, creating gaps where bacteria can enter.

How to Prevent Cavities

Cavity prevention comes down to reducing acid attacks and strengthening your teeth's ability to resist them.

Daily Habits That Protect Your Teeth

  • Brush twice a day with fluoride toothpaste for at least two minutes. Fluoride strengthens enamel and makes it more resistant to acid.
  • Floss once a day to remove plaque and food particles from between teeth where your toothbrush cannot reach.
  • Limit snacking between meals. Each time you eat, you trigger a new acid attack that lasts about 20 to 30 minutes.
  • Drink water throughout the day, especially after meals. Water helps rinse away food particles and dilute acids.
  • Chew sugar-free gum after meals. This stimulates saliva production, which helps neutralize acid and remineralize enamel.

Professional Prevention

Regular dental checkups (typically every 6 months) allow your dentist to catch early decay before it becomes a cavity. Professional cleanings remove tartar that cannot be brushed away at home. Your dentist may also recommend fluoride varnish treatments, dental sealants (especially for children), or prescription-strength fluoride toothpaste for patients at high risk.

When a Cavity Becomes a Root Canal: Seeing an Endodontist

Most cavities are treated by a general dentist with fillings or crowns. However, when decay reaches the dental pulp and causes infection, a root canal is needed. Your general dentist may perform the root canal or refer you to an endodontist.

An endodontist is a dentist who has completed 2 to 3 years of additional training focused on treating problems inside the tooth. They use surgical microscopes and 3D imaging to treat complex infections with high precision. If you have severe tooth pain, prolonged sensitivity to heat or cold, swelling near a tooth, or a darkened tooth, these may be signs that decay has reached the pulp and you should be evaluated promptly.

Find a Dental Specialist Near You

Every endodontist on My Specialty Dentist has verified specialty credentials. If you have tooth pain that may indicate advanced decay, search by location to find an endodontist in your area.

Search Endodontists in Your Area

Frequently Asked Questions

Can you reverse a cavity?

Only in the earliest stage. A white spot lesion (the first sign of demineralization) can be reversed with fluoride treatment, better brushing, and dietary changes. Once a hole has formed in the enamel, the damage is permanent and requires a filling to restore the tooth.

Are cavities genetic?

Genetics can influence your susceptibility to cavities. Factors like enamel thickness, saliva composition, tooth shape, and even your oral microbiome have genetic components. However, diet and oral hygiene habits play a larger role for most people. Good habits can overcome a genetic predisposition.

How fast can a cavity form?

A cavity typically takes months to develop. The speed depends on your diet, oral hygiene, saliva quality, and enamel strength. In people with very dry mouth or very poor hygiene, cavities can form in as little as a few weeks. Regular dental visits help catch decay early.

Do all cavities need to be filled?

Not necessarily. Very early-stage cavities (white spot lesions) may be monitored and treated with fluoride rather than drilled and filled. However, once decay has broken through the enamel surface, a filling is typically needed to prevent further damage. Your dentist will recommend treatment based on the size and location of the cavity.

Can you get a cavity under a filling or crown?

Yes. This is called recurrent or secondary decay. Over time, the seal between a filling and the tooth can break down, allowing bacteria to enter the gap. Cavities under crowns are harder to detect and may require a new crown or root canal treatment if the decay reaches the pulp.

What is the difference between a cavity and tooth erosion?

A cavity is caused by bacterial acid attacking a specific spot on the tooth. Tooth erosion is caused by dietary acids (citrus, soda, vinegar) or stomach acid (from acid reflux or vomiting) wearing down enamel more broadly across the tooth surface. Both weaken teeth, but they have different causes and patterns.

Sources

  1. 1.Selwitz RH, et al. "Dental caries." Lancet. 2007;369(9555):51-59.
  2. 2.American Dental Association. "Caries Risk Assessment and Management." ADA.org.
  3. 3.Featherstone JDB. "The continuum of dental caries: Evidence for a dynamic disease process." J Dent Res. 2004;83 Spec No C:C39-42.
  4. 4.Centers for Disease Control and Prevention. "Oral Health: Cavities." CDC.gov. 2024.
  5. 5.Pitts NB, et al. "Dental caries." Nat Rev Dis Primers. 2017;3:17030.
  6. 6.American Association of Endodontists. "Root Canal Treatment." AAE.org.

Related Articles