Skip to content
🛠️ToolsShed

Alcohol Unit Calculator

Calculate alcohol units and calories from drinks, compared to WHO weekly guidelines.

About this tool

The Alcohol Unit Calculator helps you track and understand your alcohol consumption by converting drinks into standardized units and calories. Alcohol units are a consistent way to measure the strength and quantity of alcoholic beverages, making it easier to compare different drinks and monitor your intake against health guidelines. This tool is especially useful for anyone who wants to make informed choices about their drinking habits and understand the nutritional impact of alcohol.

To use this calculator, simply enter the type of drink, its volume or quantity, and the alcohol by volume (ABV) percentage if applicable. The tool instantly computes the number of alcohol units, calories, and how your weekly consumption compares to the WHO's recommended guidelines. You can add multiple drinks, adjust portions, and see cumulative totals, making it perfect for tracking a week's worth of beverages or comparing different drink options at a glance.

A key feature is the comparison to weekly guidelines—most health authorities suggest limiting alcohol to 14 units per week or less. The calculator also breaks down calories, helping you understand the energy content alongside the units, which is valuable if you're monitoring both alcohol intake and overall diet. Keep in mind that individual tolerance and health circumstances vary, so this tool provides guidance only and should not replace professional medical advice.

Frequently Asked Questions

Code Implementation

def calculate_alcohol_units(volume_ml: float, abv_percent: float) -> float:
    """
    Calculate alcohol units using the UK standard formula.
    1 unit = 10 mL (8 g) of pure ethanol.
    """
    return (volume_ml * abv_percent) / 1000.0

# Example drinks
drinks = [
    ("Pint of 4% beer (568 mL)", 568, 4.0),
    ("Glass of 12% wine (175 mL)", 175, 12.0),
    ("Shot of 40% spirits (25 mL)", 25, 40.0),
    ("Can of 5% beer (330 mL)", 330, 5.0),
    ("Bottle of 5% beer (500 mL)", 500, 5.0),
]

print(f"{'Drink':<35} {'Units':>6}")
print("-" * 43)
for name, vol, abv in drinks:
    units = calculate_alcohol_units(vol, abv)
    print(f"{name:<35} {units:>6.2f}")

# Weekly tracker
weekly_drinks = [
    (330, 5.0),   # Mon - can of beer
    (175, 12.0),  # Wed - glass of wine
    (500, 5.0),   # Fri - bottle of beer
    (25, 40.0),   # Fri - shot
    (175, 12.0),  # Sat - glass of wine
]

total_units = sum(calculate_alcohol_units(v, a) for v, a in weekly_drinks)
recommended_limit = 14.0

print(f"\nWeekly total: {total_units:.2f} units")
print(f"Recommended limit: {recommended_limit} units/week")
if total_units <= recommended_limit:
    print("Within recommended limits.")
else:
    print(f"Exceeds limit by {total_units - recommended_limit:.2f} units.")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.