Skip to content
CoffeeHQ

Science

Why coffee goes stale

What was measured as roasted coffee ages: gas leaving over weeks, aroma compounds escaping or reacting, and what grinding and packaging change.

In short

Roasted coffee changes from the moment it leaves the roaster. Gas formed during roasting escapes for weeks. The small molecules that make up its smell evaporate or react. Neither process has a clock that applies to every coffee, and the common advice to drink coffee within a set number of days after roasting is custom, not measurement.

A few things have been measured: how much gas leaves and how fast, what grinding does to that, and how much packaging matters. This page reports those and marks where practice takes over.

The gas in a roasted bean

Sourced

Roasting produces gases, a large part of them carbon dioxide. Some leave during the roast and some stay trapped in the bean's pores. A research group in Switzerland measured the release by weighing roasted coffee continuously in a vented container for more than 400 hours, an arrangement they say mimics a bag with a one-way valve.

One arabica, from El Salvador, was roasted to three degrees at three speeds. Over 400 hours the light roasts lost 2.5 to 2.8 milligrams of gas per gram of coffee, the medium roasts 4.7 to 6.6 and the dark roasts 8.5 to 11.9. Roast degree mattered more than roast speed. Among medium and dark roasts the faster roasts released more gas and released it sooner; among light roasts speed made no such difference.

The release does not stop quickly. One light roast was followed for 800 hours and was still losing gas at the end, which the authors summarise as light-roasted whole beans still degassing a month after roasting. Their container was held at 35 degrees Celsius, warmer than a cupboard.

They also note that the totals they measured are a little lower than those found by methods that extract the gas with water, and suggest that some carbon dioxide stays bound in the coffee until it is wetted. That, they say, may be why even old coffee can show some crema as espresso.

What grinding does

Sourced

Grinding greatly increases the rate of release. In the same experiments, freshly ground coffee gave off gas at up to 40 milligrams an hour from a 12-gram sample, against up to 2 milligrams an hour from 15 grams of whole beans. Ground coffee released its gas much faster and, over the whole experiment, released less in total than whole beans did.

The difference is gas that went during grinding itself, before weighing began. Comparing their ground samples with their whole beans, the authors put that loss at up to 75 per cent of the trapped gas for freshly roasted coffee, within the 90 seconds before the first reading. They also cite earlier work giving losses from roughly a quarter to nearly three quarters, more for finer grinds; those earlier studies were not opened for this page.

These are measurements of gas. Aroma compounds leave ground coffee quickly as well, which is the usual reason given for grinding just before brewing, but no measurement of that was read here.

How much gas a bean holds, and where it comes from

Sourced

The Swiss figures above are for gas that left. A doctoral thesis from a Canadian university measured what was still inside. One arabica was roasted to four degrees, each at two temperatures, and the carbon dioxide remaining in the beans was extracted and weighed: about 6 to 7 milligrams per gram in the light roasts, about 11 in the medium, about 15 to 16 in the dark, and no more than that in the very dark. Roasting past dark did not add gas, which the author puts down to the starting materials running out and to gas escaping at second crack.

At any one degree of roast the amount was the same whether the coffee had been roasted hot and fast or cooler and slower. What differed was how quickly it then left: faster from the hot, fast roasts, faster from darker roasts, faster in warmer and in more humid air. So the degree of roast sets how much gas there is to lose, and the way the roast was run, with the conditions of storage, sets how soon it goes. That is one reason no single resting time fits two coffees.

Grinding the same coffees released about 26 to 30 per cent of the gas at a coarse grind, 33 to 38 at a medium and 45 to 59 at a fine one, measured as the difference between what the whole beans and the grounds still held. A review of espresso foam by two authors at a coffee company cites another study that found 4.0 to 8.6 milligrams per gram in coffee measured straight after grinding, more in robusta than in arabica and more in dark roasts than in medium.

The same thesis asked what the gas is made from, in two chapters of experiments. Chlorogenic acids, long the favoured candidate, gave only about 8 per cent of the possible yield when heated alone at roasting temperature, and soaking extra chlorogenic acid into green beans before roasting did not raise the gas they made; the author concludes they are one source and not the main one. Sucrose heated alone gave almost none and an amino acid alone little, but the two together produced a large amount, close to what the breakdown of the amino acid would predict. When green coffee was separated into fractions and each was roasted, about half the gas came from its smaller water-soluble molecules, which make up about a quarter of its weight, about a fifth from the insoluble bulk, and about a quarter could not be assigned to any one fraction. Carbon dioxide, on this account, is largely a by-product of the same reactions that brown the bean. These were flasks in an oven at 230 degrees Celsius, not a production roast. The same chapters show how much of the gas never stays in the bean: by the end of a very dark roast in that apparatus, nearly nine times as much had left during roasting as remained.

Aroma: escaping and reacting

Sourced

A second study from the same institute describes the loss of freshness as a growing imbalance in a coffee's aroma. Some compounds evaporate; others react with oxygen or with each other. Because they do so at different rates, the mixture that reaches the nose drifts away from what it was.

The authors tracked this with ratios between pairs of volatile compounds in the air above the coffee. They chose ratios because the amount of any single compound depends on the blend, the roast and the grind.

They also summarise older work on the oxidation of coffee's oils. Those studies linked staleness to a compound called hexanal, which appeared after roughly seven weeks of storage in air. The authors' point is that this comes late: a loss of aroma is perceptible, and a loss of cup quality noticeable, much earlier. Rancidity is the end of staling, not the start.

What the package does

Sourced

In that study, whole beans of one Guatemalan arabica were stored at room temperature for up to 57 weeks in four kinds of bag: plain paper, a paper and plastic film, and two films containing a layer of aluminium. All but the paper bag had a valve.

The bags with an aluminium layer held the measured ratios nearly steady. In the paper and plain plastic-film bags they climbed, and the difference from the aluminium bags was already significant after two weeks. The authors read one of the ratios as a sensitive marker of how much gas a packaging material lets through. Four commercial capsule systems showed the same pattern: those with aluminium preserved the ratios better.

These are chemical markers. Nobody tasted the coffee, and of the capsule results the authors say research was continuing into whether they are reflected in the cup. The valve's job, as the degassing study describes it, is to let gas out so that pressure does not build inside the bag.

Months in a sealed bag: the one tasting study

Sourced

Most of what is measured about staling is chemistry. One study tasted. Researchers in Vienna had ten trained assessors score filter coffee brewed from roasted, vacuum-packed beans on thirty attributes: when the coffee was fresh, after nine months and after eighteen. After nine months the attributes the panel counted as positive had weakened and the negative ones had strengthened, significantly so. After eighteen, a rancid smell and taste, the mark of oxidised oil, was clearly perceptible.

The study was prompted by best-before dates of twelve to twenty-four months on Austrian coffee, which its authors note are not set by law. It has two time points, nine months apart, and so says nothing about the first days and weeks that most advice concerns. What it does show is that a sealed, vacuum-packed bag slows staling without stopping it, and that the change is one a trained panel can taste well inside a printed date.

Chemistry, tasting and practice: three kinds of statement

CoffeeHQ explanation

Advice about freshness mixes three kinds of statement that have very different support. Sorting a claim into one of them is a quick test of how far to trust it.

A chemical change that was measured
Gas leaving over weeks, more of it from darker roasts; a quarter to more than half of it lost on grinding; ratios of aroma compounds drifting in bags that let gas through; a marker of rancid oil appearing after some weeks in air. These are well supported, each in one or two coffees.
A change somebody tasted or smelled under controlled conditions
Far less. A trained panel tasting vacuum-packed coffee at nine and eighteen months; consumers smelling frozen and unfrozen beans after nine weeks. No study read for this page had a panel taste one coffee day by day in its first weeks.
A practice
Rest before brewing, longer for espresso and for light roasts; buy small bags; grind just before brewing; keep coffee from air, heat, light and damp. Each is consistent with the chemistry and none has been tested as a rule. A number of days attached to any of them is a custom.

The freezer

Sourced

One study stored whole beans for nine weeks in a freezer or at room temperature and asked 48 consumers to judge them by smell. For a dark roast, the frozen coffee was placed close to a fresh control and the room-temperature coffee apart from it. For a light roast there was little difference either way. It was one lot of coffee, and it was judged by smell and not by taste. The page on storing coffee goes through that trial in detail, including what its authors say it cannot show.

The practical cautions about freezing, such as sealing portions so that condensation does not form on cold beans, are common practice. No test of them was read.

Resting, and the dates on a bag

Accounts differ

Roasters and baristas often advise leaving coffee for some days after roasting before brewing it, and longer for espresso than for filter and for light roasts than for dark. The reasoning is that gas escaping during brewing disturbs the contact between water and coffee. The degassing study says carbon dioxide affects the extraction process and may affect the taste of the cup; it did not brew anything, and no study that tasted coffee at different ages in its first days and weeks after roasting was read for this page.

What the measurements do support is narrower. Darker and faster roasts hold more gas and lose it sooner, and light roasts go on releasing gas for weeks. That is consistent with the practice of resting light roasts longer, without establishing any number of days. A window printed on a bag is the roaster's judgement about that coffee, and worth more than a general rule.

Telling stale coffee from a brewing fault

CoffeeHQ explanation

Flat and lacking aroma, with little or no bloom when water is added

Usually because: Often an old bag, or coffee ground well before it was brewed.

Change first: Try a fresher bag before changing the recipe.

Flat flavour from stale beans

Very fresh coffee that foams hard and brews unevenly

Usually because: Usually put down to gas still leaving the coffee, which is plausible and untested here.

Change first: Brew the same bag again some days later and compare.

Resting roasted coffee

What this page gives no date for

CoffeeHQ explanation

It gives no number of days after roasting at which coffee is at its best or past it, for any roast or method. It does not rank storage containers, and it does not say how much a vacuum canister adds to an airtight one. It makes no claim about how long ground coffee stays good. It does not cover green coffee, instant coffee or capsules beyond the one study mentioned. And every figure in it comes from one coffee in one laboratory and should not be read as a property of coffee in general.

What to do next