This calculator provides an estimation of alcohol by volume (abv) value of the beer, in other words, percentage of alcohol volume over the total volume of the beer. Formulas are described below the calculator.
There are different methods to calculate ABV, however, most of them are too expensive, complex and/or time consuming to be used for homebrewing. Examples are the distillation followed by hydrometry/refractometry, ebulliometer method (the ebulliometer is the measuring device that evaluates the boiling point of different liquids), gas chromatography method, spectroscopy method etc.
If you do not care much about plus/minus 0.5% error in ABV estimate, there is a simplier method which requires only a hydrometer to measure the specific gravity, namely, two values: original and final, under the same conditions (i.e. temperature).
Specific gravity is the ratio of the density of a sample to the density of water. The ratio depends on the temperature and pressure of both the sample and water. The pressure is always considered (in brewing) to be 1 atmosphere (1013.25 hPa) and the temperature is usually 20 °C for both sample and water but in some parts of the world different temperatures may be used and there are hydrometers sold calibrated to, for example, 60 °F (16 °C).
The density of a wort is largely dependent on the sugar content of the wort. During alcohol fermentation, yeast converts sugars into carbon dioxide and alcohol. The decline in the sugar content and the presence of ethanol (which is appreciably less dense than water) drop the density of the wort. The percentage of alcohol can be calculated from the difference between the original gravity (abbreviated OG) of the wort and the current specific gravity (abbreviated SG) of wort. By monitoring the decline in SG over time the brewer obtains information about the health and progress of the fermentation and determines that it is complete when gravity stops declining. If the fermentation is finished, the specific gravity is called the final gravity (abbreviated FG). For example, for a typical strength beer, OG could be 1.050 and FG could be 1.010.1
So, direct measurement of ABV can be replaced with an estimation based on original gravity and final gravity difference. There are two known approximations, so-called standard and alternate.
The standard equation, which can be easily computed by hand, is:
It is attributed to The Joy of Homebrewing by Charlie Papazian (I can't get the source to check this).
The alternate equation is:
It is attributed to Brew by the Numbers: Add Up What’s in Your Beer by Michael L. Hall2.
Again, both equations are approximations, and both give pretty close results for ABV below 6%, as you can see on the chart below (it plots ABV estimation for different OG and FG of 1.01). The latter, though, is supposed to be more accurate for higher gravity beers.