Calculator reference
Beerwright’s numbers come from one place: a pure TypeScript calculation engine with no DOM and no I/O. The recipe editor, the assistant and the brew log all call the same functions, so a gravity shown in the vitals rail and a gravity quoted by the assistant are the same gravity.
This section documents what those functions actually compute. Every formula on these pages is transcribed from the engine, and every citation is the citation the engine’s own source carries — the reference list below is not a bibliography assembled for the docs, it is the engine’s.
The four areas
Section titled “The four areas”| Page | Covers |
|---|---|
| Gravity, IBU and colour | Extract and efficiency, OG/FG, ABV, attenuation, three IBU models, three colour fits |
| Carbonation and packaging | CO₂ volumes against temperature and pressure, residual CO₂, priming sugar |
| Volume corrections | The volume waterfall, boil-off, absorption, shrinkage, strike temperature |
| Refractometer and hydrometer | Wort correction factor, reading a fermenting sample, temperature correction |
Where a choice exists, which one runs
Section titled “Where a choice exists, which one runs”Three calculations have more than one published answer, and Beerwright ships more than one for each. The defaults:
- ABV — the Zymurgy (1995) formula, not
(OG − FG) × 131.25. Both are available; they diverge above about 7 % ABV. - IBU — Tinseth (1997). Rager (1990) and Garetz (1994) are selectable.
- Colour — Morey (1999). Daniels (1996) and Mosher (1994) are selectable.
The engine reports which formula it used alongside each result, so the app can
label a colour morey-1999 and the assistant can quote it. If a number in the
app disagrees with a number in a book, the first thing to check is which model
the book used.
The engine works in one canonical set of units internally — kilograms, litres, degrees Celsius, specific gravity — and converts at the edges. Where a formula was published in US customary units it is implemented in them and converted on the way in, because that is what it was regressed against. Colour is the clearest case: malt colour units are defined in pounds per US gallon, so the kilograms and litres you enter are converted in that one function and nowhere else.
Pressure is the exception that stays imperial in the interface as well as the maths: regulators are labelled in PSI. Bar and kilopascals are offered alongside.
How exact these numbers are
Section titled “How exact these numbers are”The engine is covered by golden tests that pin published tables rather than its own output. Tinseth’s utilisation table is reproduced to within 0.0005 across nine gravities and seven boil times; the carbonation tables to 0.01 volumes, a tenth of the precision they are printed at; the volume waterfall to 10⁻⁹ litres, because that part is arithmetic rather than a fit.
Two things follow from that. First, a number here should match a number from any other calculator using the same model, and where it does not, the pages below say why. Second, the fits are fits: a formula regressed over 8–20 °Bx or 0–40 °C is not a claim about anything outside that range, and the engine does not clamp inputs to pretend otherwise — a nonsense temperature produces a visibly nonsense answer rather than a plausible wrong one.