The following essay is covered in The Conversation, an online publication.

Is it possible that the coffee you make at home tastes different from the drinks you buy at the cafe? Coffee from the same place can vary in taste. You may be quick to point the finger at the barista for changing the recipe, but our recent study suggests that this is down to an inherent inconsistency of common brewing methods.

We have found a way to make a great espresso every time.

The quality of a cup of coffee depends on a number of factors. The overall flavor is determined by the Brewing method. The most complicated way to brew espresso is by measuring it. The basis for latte and cappuccinos is espresso.

Hot water is forced through a bed of coffee. The barista decides how much coffee to use and how much water to use. When it comes to taste, water pressure, temperature and brew volume are important. A delicate balancing act is done by these parameters.

Even if the barista does everything perfectly, there are still many variations between espresso shots. The next shot may taste like motor oil. We believe we have created a procedure to help the barista out, and achieve the flavour profile they intended, every time.

Mathematics to the rescue

A team of mathematicians, chemists, materials scientists and baristas worked together to create a mathematical model that could be used to brew an espresso in a cafe. Predicting how much of the coffee ends up in the cup is something we use this to do. The coffee industry uses this percentage to assess coffee recipes.

We found that our model accurately predicts the yield when coffee is ground very finely, but not when it's not. Water flow through the espresso bed can be unpredictable, causing sections of the bed to become blocked. Parts of the coffee are under-extracted while others are over-extracted.

The goal of a barista isn't just to make great shots, they have to be reproduced as well. The yield of different shots can be looked at to see consistency. To make consistently tasty brews, the barista should use less coffee and grind the coffee a tad bit more coarse. They are able to achieve high yields by doing so.

The water flows faster through the coffee bed if the coffee mass is reduced. The coarse grind results in a bed that is easy to navigate and predictable. The shots taste the same every time.

We present a series of procedures that baristas can use to help navigate the various flavours available within their coffee. When tasting a mixture of both over and under-extracted coffee, complex flavours can still be emulated. Consumers could simply choose a roast with a flavour profile suited to their taste.

You can sign up for Scientific American's newsletters.

According to our findings, baristas can reduce their coffee waste by up to 25% per espresso shot, dramatically increasing their annual profits. In the US coffee market alone, the total savings would be over one billion dollars a year.

Climate change is said to be threatening the extinction of over half of the wild coffee species. It's better for the environment to use less coffee than it is for it to be good.

The conversation published this article. The original article is worth a read.