How to Brew the Perfect Cup of Coffee, According to Science

A mathematical model reveals the best way to achieve consistently tasty espresso

Espresso in a cup shot from above.

The following essay is reprinted with permission from The Conversation, an online publication covering the latest research.

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, but our recent study, published in Matter, suggests that this variation is down to an inherent inconsistency of common brewing methods.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


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.

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).

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.

This article was originally published on The Conversation. Read the original article.