How To Make Good Coffee With Science and Mathematics

Thank you for visiting our site. We have been a trusted and expert coffee authority for over five years. The support of our readers and members sustains our site. Should you purchase products from retailers through links or adverts on our site, we may earn commissions at no additional cost to you. As an Amazon Associate, we earn from qualifying purchases made on Amazon. These commissions are vital in maintaining the operation of our site. We curate some content and strive to provide valuable links to some of the best places on the internet. Please read our disclaimers policy for more information. We trust you will enjoy our site!

Just when you thought you knew how to make good coffee, science comes along and gives your assumptions a good smack!

Some would say that making coffee is more of an art than science. Maybe.

However, science definitely has its place in showing us how to make good coffee. The following article surprises us because it effectively challenges our usual assumptions. I love it when long-held assumptions are challenged because it makes us think!

This article is republished from The Conversation under a Creative Commons license.

How to make the perfect cup of coffee – with a little help from science

Have you ever wondered why the coffee you make at home tastes different from the drinks you buy in cafes? Or why coffee from the same place can taste different throughout the week? You may be quick to blame the barista for changing the recipe, a our recent study, published in Matter, suggests that this variation is down to an inherent inconsistency of common brewing methods.

Luckily, we believe to have discovered a path to making a great espresso – to your taste – every time.

The quality of a cup of coffee depends on the coffee’s variety and origin, its roast and the water chemistry. The brewing method also plays a critical role in determining the overall flavor. Espresso is certainly the most complicated brewing method because it requires precise measurements.

However, espresso also happens to underpin all coffee menus, as it is the basis for lattes and cappuccinos.

The relative importance of the primary factors affecting drink quality, with the standard of the coffee plant being the most important. Source: Christopher H. Hendon, University of Oregon via The Conversation

To make espresso, hot water is forced through a finely-ground bed of coffee. The barista makes decisions about how much coffee and water to use, and how finely the coffee is ground.

The machine’s water pressure, temperature and brew volume are also crucial when it comes to taste. Together, these parameters control the relative proportion of around 2,000 different chemicals – a delicate balancing act.

Yet, even if the barista does everything perfectly, there remain large variations between espresso shots made following the same recipe. One shot may taste like raspberries and dark chocolate, and the next like motor oil. And while everyone has different flavour preferences, we believe we have derived a procedure to help the barista out, and achieve the flavour profile they intended, every single time.

Mathematics to the rescue

Our research team – which involved a team of mathematicians, chemists, materials scientists and baristas – formulated a mathematical model to simulate the brewing of an espresso in realistic cafe conditions.

We used this to make predictions of how much of the solid coffee ultimately ends up dissolved in the cup. This percentage – known as the extraction yield – is the key metric used by the coffee industry to assess different coffee recipes.

Solving a series of equations, we found that our model accurately predicts extraction yields that we see in real life, except when the coffee is ground very finely. This is because water flow through the espresso bed is quite unpredictable, resulting in sections of the bed becoming clogged.

In other words, parts of the coffee are under-extracted (low extraction yield), while others are over-extracted (high extraction yield).

espresso coffee pour
Pulling a shot of espresso using 15 g of coffee, 40 g of water, in 14 seconds. Source: Christopher H. Hendon, University of Oregon via The Conversation

But the objective of a barista isn’t just to produce shots that taste great, they also have to be reproducible. Consistency can be monitored by examining the extraction yields of different shots. Contrary to our expectation, we discovered that to make consistently tasty brews, the barista should use less coffee and grind the coffee marginally coarser. By doing so, they are able to achieve very reproducible, high-yielding shots.

The mathematical theory tells us that this is because reducing coffee mass means that the water flows faster through the shallower coffee bed. The coarse grind results in a relatively permeable bed, such that water flow and extraction are uniform and predictable. This method leads to fast, bright, sweet and acidic shots that taste the same each time.

Of course, not everyone will enjoy the same flavour profile – and we account for this by presenting a series of procedures that barista can use to help navigate the various flavours available within their coffee.

Complex flavours – a result of tasting a mixture of both over and under-extracted coffee – can still be emulated by running and then mixing two shots with different extractions. More importantly, consumers could also simply select a different roast, that features flavour profiles more suited to their palate.

One of our key findings, however, is that baristas are able to reduce their coffee waste by up to 25% per espresso shot, dramatically increasing their annual profits with no sacrifice in quality. Using our protocol we estimate that, in the US coffee market alone, the total savings would amount to $1.1 billion in America’s cafes per year.

What’s more, it has been estimated that 60% of wild coffee species are under threat of extinction due to climate change. So ultimately, using less coffee is not only better for making a consistently tasty espresso, it is also better for the environment.The Conversation


Jamie Foster, Senior Lecturer, University of Portsmouth and Christopher H. Hendon, Assistant Professor of Computational Materials Chemistry, University of Oregon
This article is republished from The Conversation under a Creative Commons license. Read the original article.

Related stories

Best Water for Coffee
How to Become a Star Barista
Chemistry of Coffee. Science behind the Black Nectar

Coffee Gear

Coffee Makers the Ultimate Guide
Grind Finest Coffee Blend: Best Hand Coffee Grinder 2019

Image credits

In order from top to bottom:

  • Design and composition by Steven using ‘Mathematics’ by [©Trifonov_Evgeniy/Getty Images Pro] via and ‘Making Coffee’ by [©Mariusz Blach/Getty Images Pro] via
  • Pie Diagram: Christopher H. Hendon, University of Oregon via The Conversation
  • Espresso Machine: Christopher H. Hendon, University of Oregon via The Conversation
  • A cup of delicious espresso: Braddock’s Dispensary

Join Our Good Brews Club

Join our Good Brews Club for discounts, giveaways, a chance to win free coffee every month, the best coffee recommendations, special deals, and much more!

>>>Click to learn more about the Good Brews Cub

Amazon and the Amazon logo are trademarks of, Inc, or its affiliates.