Calculate the percentage of alcohol by volume (ABV) in a fermented beverage based on its original gravity and final gravity.
Understanding Alcohol By Volume (ABV)
Alcohol By Volume (ABV), often displayed as a percentage on alcoholic beverage labels, represents the amount of ethanol (alcohol) present in a liquid, expressed as a proportion of the total volume. For fermented beverages like beer, wine, and mead, ABV is a crucial metric determined by the fermentation process. Yeast consumes sugars in the liquid (wort or must) and converts them into alcohol and carbon dioxide. The starting and ending sugar concentrations, measured as gravity, directly influence the potential and actual alcohol production.
How the Calculation Works
The Alcohol By Volume (ABV) is calculated using the Original Gravity (OG) and Final Gravity (FG) readings. Gravity is a measure of the density of the liquid relative to water, and it's directly related to the sugar content. Higher gravity means more dissolved sugars.
Original Gravity (OG): This is measured before fermentation begins. It indicates the initial amount of fermentable sugars present in the wort or must. Higher OG generally means a higher potential alcohol content.
Final Gravity (FG): This is measured after fermentation is complete. It indicates the remaining amount of dissolved sugars (unfermented or residual sugars) in the beverage. A lower FG means more sugar has been converted into alcohol.
The most common formula used by brewers and winemakers to estimate ABV from OG and FG is:
ABV = (OG - FG) * 131.25
Where:
OG is the Original Gravity (e.g., 1.050)
FG is the Final Gravity (e.g., 1.010)
131.25 is a conversion factor derived from the fact that each point of gravity difference roughly corresponds to 0.13125% ABV, and the specific gravity scale where 1.000 is water.
Example:
If a beer has an Original Gravity (OG) of 1.050 and a Final Gravity (FG) of 1.010:
ABV = (1.050 - 1.010) * 131.25
ABV = 0.040 * 131.25
ABV = 5.25%
This indicates the beer has approximately 5.25% Alcohol By Volume.
Use Cases
Homebrewing and Winemaking: Essential for tracking fermentation progress and ensuring the final product meets target alcohol levels.
Quality Control: Used by commercial breweries and wineries to verify the alcohol content of their products.
Recipe Development: Helps in formulating recipes to achieve desired alcohol concentrations.
Understanding Beverages: Allows consumers to understand the relative strength of different alcoholic drinks.
function calculateABV() {
var originalGravity = parseFloat(document.getElementById("originalGravity").value);
var finalGravity = parseFloat(document.getElementById("finalGravity").value);
var resultDiv = document.getElementById("result");
if (isNaN(originalGravity) || isNaN(finalGravity)) {
resultDiv.innerHTML = "Please enter valid numbers for both Original and Final Gravity.";
resultDiv.style.backgroundColor = "#dc3545"; /* Error red */
return;
}
if (originalGravity <= finalGravity) {
resultDiv.innerHTML = "Final Gravity cannot be greater than or equal to Original Gravity. Check your readings.";
resultDiv.style.backgroundColor = "#dc3545"; /* Error red */
return;
}
if (originalGravity < 1.000 || finalGravity < 1.000) {
resultDiv.innerHTML = "Gravity readings should generally be above 1.000. Please check your values.";
resultDiv.style.backgroundColor = "#ffc107"; /* Warning yellow */
return;
}
var gravityDifference = originalGravity – finalGravity;
var abv = gravityDifference * 131.25;
// Format the ABV to two decimal places
var formattedABV = abv.toFixed(2);
resultDiv.innerHTML = "Estimated ABV: " + formattedABV + "%";
resultDiv.style.backgroundColor = "#28a745"; /* Success green */
}