Coffee Studies
Brewing Science

How Long Does Coffee Last? Freshness and Shelf Life

By Coffee Studies Editorial·Published July 19, 2026·5 min read

Quick answer

Roasted whole bean coffee is at peak flavour 4–14 days after the roast date and remains good to drink for 2–4 weeks; after that it is drinkable but noticeably flatter. Ground coffee degrades within minutes of grinding — oxidation of the increased surface area accelerates flavour loss dramatically, and pre-ground coffee loses most of its aromatic complexity within 1–2 weeks even in an airtight container. Brewed coffee is best within 30 minutes in the cup; refrigerated cold brew keeps for 10–14 days. Green (unroasted) beans last 1–2 years properly stored. Coffee does not go "bad" in a food safety sense — there is no microbiological cliff edge — but it goes stale: the volatile aromatic compounds that give fresh coffee its character oxidise and dissipate, leaving a flat, woody, papery cup.
An open bag of roasted whole bean coffee on a wooden countertop, a few dark beans scattered beside it, soft window light from the left, minimal composition

Coffee does not rot. It does not become dangerous with age. There is no food-safety cliff edge after which drinking a cup of old coffee will harm you. What happens to coffee over time is subtler and more interesting: the volatile aromatic compounds that give a fresh cup its brightness, fruit, sweetness, and complexity dissipate and oxidise until what remains is the skeleton — the bitterness and the body without the music. Understanding why that happens, and how fast, determines whether the coffee in your cabinet is worth brewing or worth replacing.

CO₂ peaks immediately after roasting, then declines for weeks

roasting generates large amounts of CO₂ trapped in the bean's cellular structure; this gas slowly off-gasses (degasses) after roasting and must partially dissipate before brewing — brewing too-fresh beans causes uneven extraction; the degassing curve is why specialty roasters recommend a rest period of 4–14 days after roast before optimal brewing[1]

Grinding increases surface area ~10,000× — oxidation accelerates

when a whole bean is ground, the surface area exposed to oxygen increases dramatically — by roughly four orders of magnitude compared to the intact bean; this is why ground coffee goes stale in hours to days while whole beans take weeks to months; the rate of oxidation of volatile aromatic compounds increases in proportion to the exposed surface area[4]

Volatile aromatics: the compounds that disappear as coffee stales

fresh coffee contains several hundred volatile aromatic compounds including aldehydes, ketones, furans, and pyrazines generated during roasting; these compounds give coffee its complexity and brightness; they are thermally and chemically unstable and dissipate through oxidation and off-gassing over time — their loss is what 'stale' means chemically[3]

What roasting does to the bean

To understand freshness and shelf life, it helps to understand what roasting creates[1]:

When green coffee beans are heated to roasting temperatures (typically 195–230°C), hundreds of chemical reactions occur: Maillard browning creates aromatic compounds; chlorogenic acids break down; sucrose caramelises; proteins denature; and carbon dioxide is generated in large volumes as a byproduct of pyrolysis reactions.

The roasted bean is:

  • Dry and brittle (moisture reduced from ~11% to ~1%)
  • Structurally porous with a cellular matrix full of microscopic gas pockets
  • Saturated with CO₂ trapped in those gas pockets
  • Loaded with volatile aromatic compounds in an unstable, reactive state

From this point, time and oxygen work against the coffee.

The degassing curve

CO₂ released from roasted beans is not purely a problem — it is also a marker of freshness[1]:

In the first 24–48 hours after roasting, CO₂ off-gasses rapidly. This is why freshly roasted beans are actually suboptimal for brewing immediately — the escaping gas creates uneven water distribution during extraction, causing under-extraction in some parts of the bed.

Over the following 1–3 weeks, degassing slows but continues. The CO₂ remaining in the bean pushes against incoming oxygen — as long as CO₂ is escaping outward, oxygen cannot easily penetrate inward to oxidise the aromatics. One-way valve bags on specialty roasted coffee exploit this: the valve allows CO₂ to escape but not oxygen to enter.

As CO₂ levels decline, this protective effect diminishes. Oxygen penetrates more easily. Oxidation of volatile compounds accelerates. The coffee stales.

The chemistry of staling

Staling has several distinct chemical mechanisms[3]:

Oxidation of volatile aromatics: The aldehydes, ketones, furans, and pyrazines generated during roasting are chemically unstable in the presence of oxygen. They react with oxygen to form different, typically less pleasant compounds — or simply degrade. The result is loss of the bright, complex aromatics and the development of flat, papery, or cardboard- like notes.

Loss of CO₂: As discussed, CO₂ departure reduces the protective barrier against oxygen penetration and also directly affects brewing — less CO₂ means less bloom, less crema in espresso, and less sensory freshness cue.

Lipid oxidation: Coffee oils (primarily diterpenes like cafestol and kahweol) oxidise over time, particularly in ground coffee where they are exposed to air. Rancid fat compounds contribute to the "old" or "musty" smell of stale pre-ground coffee.

Moisture absorption: Coffee absorbs moisture from the air. Water molecules accelerate oxidation reactions and also affect the mechanical integrity of the ground coffee, causing it to clump and reducing extraction evenness.

Roast level and shelf life

Darker roasts degas faster and go stale faster than lighter roasts[2]:

  • Light roasts: Lower internal temperature during roasting means less aggressive cell structure breakdown; CO₂ generated is somewhat lower; volatile aromatics are less altered from green bean precursors. Light roast beans typically have a longer optimal window (14–21 days or more) but require more rest before brewing.

  • Dark roasts: Higher roasting temperatures cause more aggressive cell breakdown, more CO₂ generation, more volatile losses during roasting itself. The post-roast degassing is more rapid, the protective CO₂ buffer depletes faster, and oxidation begins sooner. Dark roast coffee often peaks earlier (within a week of roasting) and deteriorates more quickly after that.

This is part of why instant coffee (which is spray-dried or freeze-dried brewed coffee) and dark-roasted mass-market coffee both rely heavily on vacuum sealing and nitrogen flushing to extend shelf life — the underlying coffee has often already lost much of its volatile complexity before it is packaged.

Practical implications

Buy whole beans, grind immediately before brewing: This is the single most impactful choice for coffee freshness. Pre-grinding even one day before brewing produces a measurably inferior cup compared to grinding fresh[4].

Check the roast date, not the 'best by' date: The roast date tells you when the clock started. A "best by" 18 months from purchase tells you almost nothing about freshness.

Store in an airtight container away from light and heat: Oxygen, light, moisture, and heat all accelerate staling. An opaque, airtight container at room temperature is the minimum. Avoid the refrigerator for whole beans — the temperature differential as you take the bag in and out causes condensation that degrades the beans faster than room temperature storage.

Freeze for longer storage: Freezing whole beans in an airtight container is effective for long-term storage (beyond 4 weeks). Allow the sealed bag to reach room temperature before opening to prevent condensation. This is specialised — for beans you are storing for a long time, not for daily-use beans.

The honest summary

Roasted whole bean coffee peaks 4–21 days after the roast date and is drinkable (with declining quality) for 2–3 months. Ground coffee loses most of its aromatic complexity within hours to days — the surface area exposure to oxygen makes ground coffee a significantly perishable product compared to whole beans. Brewed coffee peaks immediately and is best consumed within 30 minutes of brewing if hot; cold brew keeps refrigerated for 10–14 days. Green beans last 1–2 years. Coffee does not expire in a food safety sense but goes stale through well-defined chemical mechanisms: oxidation of volatile aromatics, CO₂ depletion, lipid rancidity, and moisture absorption. The most impactful freshness practice is grinding whole beans immediately before brewing.

Frequently asked questions

Does coffee expire?
Not in the food safety sense — roasted coffee does not harbour dangerous bacteria, grow mould under normal storage conditions, or become toxic with age. There is no date after which coffee becomes unsafe to consume. However, coffee does go stale: the volatile aromatic compounds responsible for fresh coffee's flavour and aroma oxidise and dissipate over time, leaving a flat, woody, papery cup. The 'best by' date on coffee packaging is a flavour quality indicator, not a safety cutoff. A bag of roasted coffee 6 months past its 'best by' date is safe to drink — it will just taste significantly less good.
How long does roasted whole bean coffee last?
At its best: 4–14 days after the roast date. Most roasters recommend a 'rest' period of at least a few days after roasting before brewing — freshly roasted beans still contain high levels of CO₂ that can interfere with extraction. The peak window for most coffees is roughly days 4–21 post-roast, depending on roast level (darker roasts degas faster and go stale faster than lighter roasts). After 4–6 weeks, whole bean coffee stored in an airtight container is noticeably flatter. After 3 months, it is significantly stale but still drinkable. After 6+ months, it is unpleasantly flat.
How long does ground coffee last?
Ground coffee degrades much faster than whole beans because grinding dramatically increases the surface area exposed to oxygen and humidity. Pre-ground coffee in an airtight bag is typically stale within 1–2 weeks. In a sealed commercial tin or vacuum-packed bag, it can maintain reasonable (if not excellent) flavour for 2–3 months. Freshly ground coffee from whole beans peaks in flavour within 15–30 minutes of grinding — this is why specialty baristas grind immediately before brewing. Pre-grinding the night before produces a noticeably inferior cup compared to grinding fresh.
How long does brewed coffee last?
Brewed coffee is at its best immediately after brewing. Hot brewed coffee oxidises rapidly when left on a burner or in a carafe — within 30 minutes it begins to develop stale, bitter notes from thermal oxidation. Cold brew coffee concentrate, properly stored in an airtight container in the refrigerator, keeps well for 10–14 days. Black drip coffee or Americano left in the fridge keeps for 3–4 days but flavour degrades significantly. Adding milk or cream to brewed coffee shortens safe storage to 1–2 days refrigerated (standard dairy safety guidelines apply).
How long do green (unroasted) coffee beans last?
Green coffee beans — the unroasted seeds — have significantly longer shelf life than roasted coffee. Properly stored (dry, dark, at stable temperature, in breathable bags or containers), green beans can last 1–2 years with acceptable quality. Specialty green bean traders often note that green beans reach their best flavour profile at 2–6 months post-harvest as the beans dry slightly and 'rest.' Beyond 2 years, green beans typically show 'past crop' characteristics — woodiness, loss of acidity and clarity — that persist through any roast.

References

Every factual claim in this article is drawn from the sources below. See the source library for how we grade evidence.

  1. [1]Carbon Dioxide Evolution and Moisture Evaporation During Roasting of Coffee BeansJournal of Food Science · 2005 · Observational study · Tier 2 · Moderate
  2. [2]Brewing FundamentalsCoffee Science Foundation · Reference work · Tier 2 · Moderate
  3. [3]Coffee volatile compounds and roast markersPMC / NIH · 2016 · Review · Tier 2 · Moderate
  4. [4]The effect of bean origin and temperature on grinding roasted coffeeScientific Reports · 2016 · Controlled trial · Tier 2 · Moderate

Related reading