Espresso Extraction Calculator Formula

Understand the math behind the espresso extraction calculator. Each variable explained with a worked example.

Formulas Used

Brew Ratio

brew_ratio = round(yield_g / dose * 10) / 10

Extraction Yield

extraction_pct = round(tds_pct * yield_g / dose * 100) / 100

Flow Rate

flow_rate = round(yield_g / brew_time * 100) / 100

Shot Type

ratio_category = yield_g / dose < 1.5 ? 1 : (yield_g / dose < 2.5 ? 2 : 3)

Variables

VariableDescriptionDefault
doseCoffee Dose(grams)18
yield_gLiquid Yield(grams)36
brew_timeBrew Time(seconds)28
tds_pctTDS (if measured)(%)9

How It Works

How to Calculate Espresso Extraction

Key Formulas

Brew Ratio = Liquid Yield / Dose

Extraction % = TDS% x Yield / Dose

Brew Ratios

  • Ristretto: 1:1 to 1:1.5 (intense, concentrated)
  • Normale: 1:2 (standard espresso)
  • Lungo: 1:3+ (longer, more diluted)
  • Ideal Targets

  • Extraction yield: 18-22% (SCA standard)
  • TDS: 8-12% for espresso
  • Brew time: 25-30 seconds for a 1:2 ratio
  • Troubleshooting

    If extraction is too high (bitter): coarsen the grind or reduce dose. If too low (sour): fine the grind or increase dose.

    Worked Example

    18 g dose, 36 g yield in 28 seconds, 9% TDS.

    dose = 18yield_g = 36brew_time = 28tds_pct = 9
    1. 01Brew ratio = 36 / 18 = 2.0:1 (normale)
    2. 02Extraction = 9% x 36 / 18 = 18%
    3. 03Flow rate = 36 / 28 = 1.29 g/sec
    4. 04This is a well-balanced extraction within the ideal range.

    Ready to run the numbers?

    Open Espresso Extraction Calculator