That refreshing first sip of a beer has a way of clearing your mind. But if you ever find yourself in a mode of contemplation when having a glass of your favorite lager, it’s easy to wonder just how many bubbles are floating in that wonderful layer of frothiness. Finally, there’s a study to put your burning curiosity to bed.

First, these bubbles are essential. Lagers are produced through a fermentation process in which the sugars in malted grains are converted to alcohol and carbon dioxide, the latter of which manifests in your glass in the form of bubbles. These bubbles impart flavor and scent compounds, as well as a pleasant carbonated effervescence, to each brew.

Researchers at the scientific journal ACS Omega have come to the conclusion that there are between 200,000 and 2 million of these carbon dioxide gas bubbles in every poured glass of beer.

To calculate this figure, scientists poured commercial lagers into tilted glasses and measured the carbon dioxide that was dissolved into them just moments later. After observing that bubbles would form where this dissolved gas gathered, they calculated just how many bubbles would form, a number that depends on the amount of crevices in the specific glass. The main takeaway? The more imperfections or dings in a glass, the more bubbles will form.

So if you notice that your local dive bar’s brews are tasting extra bubbly, it may have to do with the wear and tear on their glasses.