brewery-ops
Keg pour-cost math for breweries and taprooms. Enter keg cost and keg size in gallons to get the cost per pour at 12, 16, and 20 ounce servings, pours per keg after a foam-and-spillage allowance, and the margin percentage at your menu price. Use when pricing draft pours or checking whether a keg deal is actually profitable.
$ skillbank install brewery-ops@1.0.0 # pins exactly 1.0.0 · README + changelog included
Brewery Ops
Overview
A keg is not as many pours as the volume suggests — foam, spillage, and the sediment at the bottom eat 5–10%. scripts/pour.py takes the keg cost and size in gallons, subtracts a loss allowance, and prints the cost per pour and margin percentage at 12oz, 16oz, and 20oz servings, plus the pours per keg. Servings under a 75% margin get flagged, because most taprooms need 75–85% on draft to cover rent and labor. references/keg-yields.md lists standard keg sizes and realistic loss ranges.
It prices the liquid only — not glassware breakage, CO2, or the bartender's wage. Treat the margin as the liquid margin, then make sure the full P&L still works.
Installation
1. Copy the brewery-ops/ directory anywhere convenient. 2. Make the script executable (Unix):
chmod +x scripts/pour.py
No pip install needed — standard library only. All data stays local; nothing is uploaded.
Configuration
No config file. Common keg sizes for --gallons:
| Keg | Gallons | |------------------|---------| | Half barrel | 15.5 | | Quarter barrel | 7.75 | | Sixth barrel | 5.16 |
--loss is the foam/spillage/sediment allowance as a fraction (default 0.05). Heavy-foam styles or sloppy pours justify 0.08–0.10.
Inputs
pour.py --keg-cost COST --gallons SIZE --price PRICE [--loss FRAC]
| Argument | Default | Description | |--------------|---------|----------------------------------------------------| | --keg-cost | — | What you paid for the keg (required, > 0). | | --gallons | — | Keg size in gallons, e.g. 15.5 (required, > 0). | | --price | — | Menu price per pour (required, > 0). | | --loss | 0.05 | Loss fraction (0 up to, not incl., 1). |
Output: usable ounces, and per serving size the pours per keg, cost per pour, and margin percentage at the menu price.
Worked example
A half-barrel (15.5 gal) at $140, selling $7 pints:
$ ./scripts/pour.py --keg-cost 140 --gallons 15.5 --price 7.00
KEG POUR COST
Keg cost: $140.00
Keg size: 15.5 gal (1,984 oz, 1,885 oz usable after 5% loss)
Menu price per pour: $7.00
Serving Pours/keg Cost/pour Margin
--------------------------------------------
12oz 157 $0.89 87.3%
16oz 117 $1.20 82.9%
20oz 94 $1.49 78.7%
Margin < 75% is flagged — most taprooms need 75-85% on draft to cover rent, labor, and the pours that walk out the door as foam.
157 twelve-ounce pours at $0.89 each — the $7 pint carries an 87% margin and the keg clears about $960 in gross profit. If a distributor offers the same keg at $170, re-run it before you say yes.
Version history
Changelog
1.0.0 — 2026-09-27
- Initial release:
scripts/pour.pykeg pour-cost calculator (cost per - Playbook:
references/keg-yields.md— standard keg sizes and realistic
pour at 12/16/20 oz after a foam-and-spillage loss allowance, pours per keg, margin % at menu price, with a below-75%-margin flag).
loss ranges.