What Gives You Cavities and How to Prevent Them

Cavities form when bacteria in your mouth feed on sugars and produce acid that eats through tooth enamel. It’s a chain reaction: sugar goes in, acid comes out, and your teeth pay the price. About one in four American adults between ages 20 and 44 has at least one untreated cavity, making it one of the most common chronic health problems in the country.

How a Cavity Actually Forms

Your mouth is home to hundreds of bacterial species, but one in particular drives most cavities. A bacterium called Streptococcus mutans sticks to your teeth by producing a glue-like substance from the sugars you eat. This sticky layer helps it cling to tooth surfaces, cluster together with other bacteria, and build up as plaque, the filmy coating you can sometimes feel with your tongue.

Once established, these bacteria do what they do best: ferment carbohydrates into acid. Every time you eat or drink something sugary, the bacteria metabolize those sugars and release acids directly onto your tooth surface. Tooth enamel, the hardest substance in the human body, starts dissolving at a pH below 5.5. For context, a healthy mouth sits around pH 7 (neutral). A sip of soda or a bite of candy can push the environment around your teeth well below that critical threshold within minutes.

The acid pulls calcium and phosphate minerals out of the enamel in a process called demineralization. If this happens occasionally, your body can repair the damage. But when acid attacks are frequent, the enamel breaks down faster than it rebuilds, and a cavity forms. What starts as a tiny weak spot on the surface eventually becomes a hole that works its way deeper into the tooth.

The Foods and Drinks That Fuel Decay

Sugar is the primary fuel, but it’s not just candy and cookies. The World Health Organization defines “free sugars” as all sugars added to foods and drinks by manufacturers or consumers, plus sugars naturally present in honey, syrups, fruit juices, and fruit juice concentrates. All of these feed cavity-causing bacteria equally well. A glass of apple juice delivers sugar to your teeth the same way a spoonful of table sugar does.

What matters almost as much as how much sugar you eat is how often you eat it and how long it stays on your teeth. Sipping a sugary coffee over two hours gives bacteria a steady acid bath for that entire window. Eating a piece of chocolate in two minutes and then drinking water creates a brief acid spike that your saliva can handle more easily. Sticky foods like dried fruit, caramel, and gummy snacks cling to the grooves of your teeth and extend the exposure time significantly.

Starchy processed foods also play a role. White bread, chips, and crackers break down into simple sugars in your mouth quickly. These refined starches get trapped in the pits and grooves of your molars, giving bacteria a slow-release food source.

Why Some People Get More Cavities

Diet explains a lot, but some people seem to get cavities no matter how carefully they eat. Several factors beyond sugar intake raise your risk.

Dry mouth is one of the biggest. Saliva is your mouth’s natural defense system. It neutralizes acid, washes away food particles, and delivers calcium, phosphate, and fluoride back to weakened enamel to help it rebuild. When saliva flow drops, that protection disappears. Hundreds of common medications cause dry mouth as a side effect, including antidepressants, antihistamines, decongestants, blood pressure drugs, and medications for Parkinson’s disease. Medical conditions like diabetes, Sjögren’s syndrome, and salivary gland disorders also reduce saliva production. If your mouth feels consistently dry, your cavity risk goes up substantially.

Tooth anatomy matters too. Your back teeth have deep pits and grooves on their chewing surfaces where food particles and bacteria collect easily. These areas are harder to clean with a toothbrush, which is why molars develop cavities far more often than smooth-surfaced front teeth. Some people naturally have deeper grooves, making them more vulnerable.

Acid reflux introduces stomach acid into the mouth, which erodes enamel from the inside out. People who experience frequent heartburn or gastroesophageal reflux can see significant enamel wear even with good brushing habits.

Spotting Decay Before It Becomes a Cavity

Cavities don’t appear overnight. The earliest sign of trouble is a white spot on the tooth surface, a chalky or matte-looking patch where minerals have started leaching out of the enamel. In young children, these white spots often show up along the gumline of the upper front teeth. In adults, they can appear anywhere plaque tends to accumulate.

At this stage, the damage is reversible. The enamel hasn’t broken through yet, and with the right conditions (less sugar, better cleaning, fluoride exposure), the tooth can actually reclaim minerals from saliva and repair itself. Once the surface collapses into an actual hole, that window closes. You might notice sensitivity to hot, cold, or sweet foods, visible dark spots, or a rough edge you can feel with your tongue. Pain typically comes later, once decay reaches the softer layer beneath the enamel.

How Your Body Fights Back

Your mouth isn’t defenseless. Saliva constantly works to reverse early damage by bathing your teeth in dissolved calcium and phosphate, the same minerals that make up enamel. When the pH in your mouth returns to neutral after an acid attack, these minerals can redeposit into weakened spots on your teeth. This is remineralization, and it happens naturally between meals as long as saliva flow is adequate and the intervals between sugar exposures are long enough.

Fluoride supercharges this process. When fluoride is present during remineralization, it gets incorporated into the enamel’s crystal structure, creating a version of the mineral that’s harder and more acid-resistant than the original. This is why fluoride toothpaste is so effective. It doesn’t just clean your teeth; it chemically strengthens them against the next acid attack. The same principle applies to fluoridated drinking water and professional fluoride treatments.

What Actually Prevents Cavities

Prevention comes down to disrupting the cycle at every possible point: starving the bacteria, removing the plaque, strengthening the enamel, and supporting your saliva.

Reducing how frequently you consume sugar has a bigger impact than reducing the total amount. Three meals with dessert expose your teeth to three acid attacks. Snacking on sugary or starchy foods six times a day means six. Drinking water after meals helps rinse away sugars and brings your mouth’s pH back toward neutral faster.

Brushing twice a day with fluoride toothpaste removes plaque before it hardens into tarite and delivers fluoride directly to the enamel surface. Flossing clears the tight spaces between teeth where your brush can’t reach, areas that are especially prone to decay. The grooves on your back molars, where pit and fissure cavities tend to start during the teenage years, benefit from dental sealants, a thin protective coating that fills in those vulnerable crevices.

If you take medications that dry out your mouth, staying well hydrated and chewing sugar-free gum can help stimulate saliva flow. Some people benefit from saliva substitutes or prescription rinses designed to replace the minerals that saliva normally provides.