Coffee News: from Seed to Cup

Introducing The Mathematical Formula for Espresso Extraction

,

We can measure extraction in the final product. We know what impact, broadly speaking, longer and shorter extractions will have on an espresso shot. But have you ever wondered how quickly coffee solids are extracted when you run your espresso shot?

My wife and I were keen to take a more empirical look at extraction. I have over 20 years of experience working in data mining, and we opened our own coffee shop back in 2014. So we set up an experiment – and found a mathematical function that will tell us the rate of extraction.

Spanish Version: Introduciendo la Fórmula Matemática para la Extracción del Espresso

espresso shot

Can you calculate the yield of an espresso shot – without a refractometer? Credit: Finca Dorchester

What Happens to Coffee Solids During Your Espresso Brew?

Coffee solids dissolve more rapidly at the beginning of the espresso shot. You can see this in the dark coffee colour that initially comes out of the portafilter. But as the espresso shot progresses, it becomes more difficult to dissolve these solids. They are extracted at a lower rate – resulting in a lighter colour towards the end of the brew.

The amount of dissolved solids in this liquid-form coffee is often measured as a percentage of the mass of the dry coffee. This is called “yield”. We would expect yield to be higher during the initial stages of the brew. But we wanted to work out the rate of change so that we could take some of the guesswork out of espresso extraction.

espresso acaia scale

18g of dry coffee grounds were used for the espresso shots in this experiment. Credit: Finca Dorchester

How to Measure Dissolved Solids & Extraction Rates

You can measure the amount of dissolved solids in a liquid using a refractometer. From there, we can calculate the extraction yield. And by running separate espresso shots and stopping the brew at various stages, we can gather data on the relationship between espresso mass and extracted dissolved solids.  

So we conducted an experiment. We ran 32 separate espresso shots, stopping them at different points. We measured the mass of the espresso collected, then calculated the resulting yield. And then we plotted our results.

espresso graphic

Scatter plot of espresso yield against espresso mass. Credit: Finca Coffee Roasters

Analysing The Data

The scatter plot shows that the solids are being extracted rapidly during the initial stages of the espresso shot, indicating a sharp rate of rise. Then the rate of change of yield grows increasingly slower as the mass of the espresso increases during the latter stages of the brew.

This indicates what, in maths terms, is a power function relationship. A power function is of the form y = ax^b, where a and b are constants. In this case y is the yield and x is the espresso mass.

Next we had to check we were correct about it being a power function relationship. Taking logs would do this, since it would make a linear relationship between the data visible. y = ax^b becomes log(y) = log(a) + b(log(x)), which is of the linear form y = mx + c. So we took logs of the yield and espresso mass and plotted the data. It backed up our interpretation, so we went back to the original data to see if we could find the mathematical power function for the relationship.

espresso graphic

Log scatter plot. Credit: Finca Coffee Roasters

Finding The Espresso Power Curve  (EPC)

We analysed the original data to find that y = 3.9x^0.45 (when x ≥0) was the best fit for this curve. Statistical analysis showed a strong correlation between this formula and the data.

We decided to call this function an Espresso Power Curve (EPC).

We have to be cautious when using this function, however. There are limits to the range in which it will be valid. For example, there is only a set amount of solids that can be extracted.

espresso graphic

The Espresso Power Curve (EPC). Credit: Finca Coffee Roasters

What Does This Tell Us About Espresso Extraction?

From this function, we can calculate the total yield (y) from any espresso mass (x) within a sensible range. For example, at 5g the yield is 8%. As 10g, 10.9%. (See how it’s slowing down already?) At 32g it’s 18.3% and at 40g it’s 20.2%.

We can also compare the ratio of yield to mass as a percentage. At 10g, it’s 1.09%/g; at 20g, it’s 0.74%/g; and at 40 g it’s 0.51%/g. The slowing down of the rate of extraction is clear.

We can also tell from this that 50% of the total yield is obtained when just 21% of the espresso mass is collected (the yield is 9.15% at 6.8g of espresso).

And this has implications for understanding the differences between a ristretto, espresso, and lungo.

What Can We Learn From More Research?

As I said above, there are limits to the espresso power curve. The range of values that a and b can take, and how much deviation we can expect, has yet to be determined.

Further studies with larger sample sizes would help to confirm our results. We would also expect that a “family” of Espresso Power Curves of the form y = ax^b  exists. These might vary depending on different factors, such as espresso mass, espresso recipe, coffee origin, and roast profile. We’re looking forward to seeing more research on this in future.

Extracts and data for this article have been taken from a paper written by Finca Coffee Roasters: “A Mathematical Function for Espresso Extraction – An Espresso Power Curve”.

Written by Don Iszatt of Finca Coffee Roasters. Feature photo credit: Paul Mordheweyk

Please note: this article has been edited to correct a formatting error and add: “Further studies with larger sample sizes would help to confirm our results.”

Perfect Daily Grind

Want to read more articles like this? Sign up to our newsletter!

Print Friendly, PDF & Email