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.

    Frequently Asked Questions

    What is TDS and how do I measure it?

    TDS (Total Dissolved Solids) is the concentration of extracted coffee compounds in the liquid. Measure it with a refractometer designed for coffee (like a VST or Atago). Without a refractometer, aim for the target brew ratio and time as proxies.

    Why does my espresso taste sour?

    Sour espresso is under-extracted. The grind may be too coarse, the brew time too short, or the dose too low. Try grinding finer (in small increments), which slows the shot and increases extraction.

    Should I adjust dose or grind first?

    Adjust grind size first. Grind has the largest impact on extraction. Change the dose only to fine-tune the shot volume and body. A good workflow: set dose, adjust grind for time, then tweak ratio for taste.

    Ready to run the numbers?

    Open Espresso Extraction Calculator