“Sugar rots your teeth!” You’ve likely heard those words, in some shape or form, coming from a parent, grandparent, teacher, or TV show. In school, you might have even conducted a classic experiment: putting an egg into a cup of soda to see how the shell softens and becomes flabby after a few days. That, the lesson implies, is what sugary soda does to your teeth.
However, sugar is not the direct cause of cavities. Nor is it a corrosive substance, like the common classroom experiment implies: In fact, it’s the tangy acid in the soda that softens the shell, not the sugar.
Sugar, however, is a great energy source for the bacteria living in your mouth that can cause tooth decay, says Dr. Diana Nguyen, the chief of General Clinical Dentistry and associate professor at University of California, San Francisco School of Dentistry. But should we really only blame sugar for cavities? Nguyen says the answer is more nuanced than you might think.
What actually causes cavities?
Our mouths are hosts to hundreds of types of bacteria. The main culprits behind cavities, though, are Streptococcus mutans and various types of Lactobacillus bacteria. These bacteria get a boost from carbohydrates, which they consume for energy.
When you eat something starchy or sugary (yes, sugar is a carbohydrate), these bacteria leap into action, breaking down carbs and producing lactic acid in the process. It’s that acid which weakens dental enamel (the hard white coating on teeth that protects them), eventually causing cavities.

But the human body does have a way of fighting back. “It’s not like you eat sugar, and then your mouth is acidic forever,” Nguyen says. Saliva plays an important role in bringing the pH level in your mouth back up to neutral. When you eat a chocolate bar or a piece of bread (or just about anything), your mouth waters, which helps to flush away harmful acids. Usually, your saliva can accomplish this task in around 30 minutes.
How do you prevent cavities?
So while carbohydrates such as sugar aren’t the active force behind cavities, it can accelerate their development—as can acid from soda or coffee.
Timing also matters. Constantly consuming carbohydrates or acidic drinks can make it hard for your saliva to return to a neutral pH level.
“People who are at higher risk of cavities are very often those who snack or drink sugary drinks or acidic drinks throughout the day,” says Nguyen. “If you’re constantly exposing your mouth to carbohydrates and acids, then you’re going to keep that pH level in your mouth down, and that will allow acid to continue to demineralize the enamel.”
Nguyen points out that, historically, people still got cavities even when refined sugar wasn’t as widely available. People can still develop cavities after consuming carbohydrate or acid-rich food and drinks at frequent intervals throughout their day. In that case, your mouth just never has enough time to return pH levels to normal.
Related ‘Ask Us Anything’ Stories
When should you brush your teeth after having sugar?
You should wait 20 to 30 minutes after eating to brush their teeth. “We would not recommend brushing the teeth right away after having coffee or right after having a snack,” Nguyen says. You want to first give your mouth time to get things back to normal.
Brushing when your mouth is more acidic can do more harm than good. “When that pH level is lowered, when your mouth is more acidic and those bacteria are active, [that acid] actually softens the enamel,” says Nguyen. If you then brush your teeth while that acid is hanging out, it can damage your enamel.
“Some people are trying to stay on top of their oral health. They want to keep their teeth healthy. They just had sugar, or they just had coffee, and they think, ‘Okay, I’ve got to get this off my teeth right away.’ But they could actually inadvertently cause more damage to their tooth structure,” Nguyen says.
If you can’t wait 30 minutes after eating to brush, water is your best friend. “Chase whatever you’re eating or drinking with a sip of water to dilute that acidity,” Nguyen says. “That will prevent you from causing inadvertent damage to your teeth.”
Along with sips of water, regular brushing and flossing can also help mitigate the effects of acid-producing bacteria in your mouth. Sticky plaque is actually bacteria build-up on teeth, and the acid it produces can harm your teeth unless it’s regularly removed. So it’s best to stay on top of your twice annual dental cleanings.
While your own saliva and over-the-counter fluoride rinses can help remineralize your teeth over time, keeping an eye on what—and when—you’re eating and drinking can help keep your mouth healthy.
In Ask Us Anything, Popular Science answers your most outlandish, mind-burning questions, from the everyday things you’ve always wondered to the bizarre things you never thought to ask. Have something you’ve always wanted to know? Ask us.

