calculators.coffee by Timberline Coffee School

Espresso Brew Formula Calculator

Build your espresso recipe: dose, target ratio, shot time, and pre-infusion.

Mass of dry ground coffee in the portafilter basket

Yield as a multiple of dose. 1:2 is the specialty baseline.

Total time from pump start to pump stop (includes pre-infusion)

Low-pressure soak before full extraction. Set 0 if not used.

Last updated

How to Use This Calculator

  1. Set Your Dose and Target Ratio

    Start with the dose your basket is built for (18 g is the modern double-basket baseline) and the ratio you want. 1:2 is where competition baristas calibrate; ristretto pulls run 1:1 to 1:1.5; lungo runs 1:2.5 to 1:3.

  2. Pick a Shot Time and Pre-infusion

    Enter the total shot time you want to hit, measured from pump start to pump stop. Add the pre-infusion seconds separately if your machine offers it. The calculator subtracts pre-infusion from shot time to derive the active extraction window.

  3. Pull, Taste, Adjust

    The calculator gives you the target yield to weigh into the cup, the effective extraction time to compare against, and a target flow rate during extraction. Use the grind direction suggestion as a starting point, then taste.

The Brew Formula: Where the Recipe Lives

Espresso ran on tradition for decades. 7 grams in, 25 mL out, in about 25 seconds: the classic Italian recipe codified by the SCA in the late 1980s. The numbers were simple because the equipment was simple. Single-boiler levers and rotary pumps did most of the work, and the baseline assumed a medium-dark roast that would tolerate aggressive extraction.

The modern specialty era pushed the recipe forward. Bigger baskets (18 to 22 g), lighter roasts, and tighter control over pressure and temperature changed what a good shot looks like. Today the working formula is dose plus ratio plus time, with pre-infusion as a fourth lever that pulled levers used to do mechanically. The numbers shifted: 18 g in, 36 g out, 28 seconds, with a few seconds of pre-infusion to settle the puck.

A formula is not a recipe. The formula tells you the targets: what to weigh, how long to wait, how fast the coffee should fall into the cup. The recipe is what you do when those numbers do not produce the cup you wanted. That is where grind, distribution, and tamp come in. The point of building a formula on paper first is so that when the actual shot misses, you know which variable to move.

Pre-infusion, Grind, and When to Move Each

Pre-infusion is the soak before full pressure. Water at 2 to 4 bar saturates the puck so the grounds swell evenly. The payoff shows up later: fewer channels, more uniform extraction, less bitterness on the back of the palate. 3 to 8 seconds is a useful starting range for most modern machines. Lighter roasts and finer grinds benefit most; darker, oilier roasts often need less (or none, since they extract quickly anyway).

The order to dial in: lock the dose, set the target ratio, then chase the time with the grind. If the shot runs short of your time target, grind one notch finer. If it runs long, grind one notch coarser. Do not change the dose to fix time; you will end up chasing two variables at once and never land. Once the grind puts you in the time window, taste. If it is sour, pull longer (looser ratio, like 1:2.2 instead of 1:2.0). If bitter, pull shorter or grind slightly coarser.

SymptomFirst MoveNotes
Shot runs fast (under 20 s active)Grind finerOne notch at a time. Re-pull before judging.
Shot runs slow (over 35 s active)Grind coarserIf grind is already coarse, check tamp pressure and dose.
Tastes sourLoosen ratio (1:2 to 1:2.2)Under-extracted. Slightly longer shot pulls more sweetness.
Tastes bitter or dryTighten ratio (1:2 to 1:1.8)Over-extracted. Or grind coarser if the time is already long.
Inconsistent shot to shotCheck puck prepDistribution and tamp level matter more than any formula change.

Frequently Asked Questions

What is the difference between a brew formula and a brew ratio?

A brew ratio is one number (yield divided by dose, expressed as 1:N). A brew formula is the full recipe: dose, ratio, shot time, and pre-infusion. The ratio tells you how concentrated the cup is. The formula tells you how to pull it. Two shots can share a 1:2 ratio and taste completely different if one runs in 22 seconds and the other in 35.

Why does pre-infusion matter?

Pre-infusion is the low-pressure phase before full extraction pressure hits the puck. It lets water saturate the grounds evenly so the puck swells, settles, and forms a more uniform bed. The payoff is fewer channels, more even extraction, and a sweeter cup. Lever machines do this mechanically. Most modern pump machines (Breville, La Marzocco Linea Mini, ECM) expose a pre-infusion setting in software or hardware. 3 to 8 seconds is a common range.

What is a reasonable target flow rate during extraction?

1.5 to 2.5 g per second is typical for a well-pulled modern double after pre-infusion finishes. Under 1.0 g/s suggests the grind is fine or the dose is heavy. Above 2.5 g/s suggests bypass, a coarse grind, or channeling. Flow rate during extraction is more useful than mean flow rate because it isolates the active extraction phase from the soak.

Should I change grind or time first when dialing in?

Grind first. Time is a consequence of grind, dose, and tamp at a fixed pressure. If the shot runs fast at your target dose and ratio, grind finer one notch and try again. If it runs slow, grind coarser one notch. Only adjust the formula (dose or ratio) once the grind is moving the shot into your time window. Chasing time by changing dose tends to spiral.

How long should the total shot run?

25 to 35 seconds total is the modern specialty window, including any pre-infusion. That number is a guide, not a law. A clean, well-distributed puck at a 1:2 ratio pulled in 28 seconds is the baseline most competition baristas start from. Adjust the grind to land in the window, then taste and refine.

Do I include pre-infusion in the shot time I enter?

Yes. Enter the total shot time from the moment the pump starts until you stop the pour, and enter the pre-infusion portion separately. The calculator derives effective extraction time (shot time minus pre-infusion) and uses that to compute target flow rate, because flow rate during the active phase is what you want to compare against.

Why does a 1:2 ratio give different cups on different coffees?

Bean density, roast level, age, and origin all change how a coffee extracts at a given recipe. A washed light roast Ethiopian and a natural Brazilian pulled at 18 g in, 36 g out, 28 seconds will not taste the same: different solubility, different acidity, different sugars. The formula is the starting point. Taste, then move one variable at a time.

Timberline Coffee School

Trent built this calculator. He also runs Timberline Coffee School, where baristas and roasters train through SCA-accredited programs covering espresso, brew method, and sensory skills.