Coffee is the most popular beverage in the United States and many countries around the world (1).
There are countless forms of coffee and coffee-based drinks that vary in flavor and intensity. In addition to providing its signature boost in energy, coffee is rich in antioxidants that may promote health (2).
If you drink or prepare coffee, you may be wondering how long it can last once purchased. Unfortunately, there is a lack of scientific research and food safety guidance on proper coffee storage. More research on coffee storage and safety is needed.
This article provides tips for storing all types of coffee, using evidence-backed information, guidance from coffee brands’ websites, and my own recommendations.
Dima Sikorski/Stocksy United
General guidance on coffee shelf life
When stored properly, whole coffee beans and even ground coffee can last for a long time. Since coffee is dry, the varieties you buy for at-home use aren’t likely to develop mold or other forms of spoiling that stem from moisture.
However, the shelf life of coffee varies by its method of preparation.
In general, coffee that hasn’t been brewed lasts longer than brewed coffee. Where you store coffee — whether on the counter or in the pantry, fridge, or freezer — also makes a difference.
If coffee isn’t kept in a sealed, airtight container, its freshness and taste can start to deteriorate. Cold temperatures in the fridge or freezer can affect the taste of dry coffee, but they can also preserve coffee for longer periods.
Properly stored, dry coffee can generally last for a very long time. However, the type of coffee and how it’s stored make all the difference.
Whole coffee beans
Depending on how they’re stored, whole, roasted coffee beans can last for a few weeks to several months — or sometimes even years.
A sealed package of roasted coffee beans that hasn’t been opened and is stored at room temperature away from heat, moisture, and light should stay fresh until its best-by date.
Depending on the manufacturer, packaging, and when you purchased the coffee, this could be a few weeks to months or more.
Once a package of roasted coffee beans is opened, the beans will stay fresh for 1–3 weeks. For best results, transfer opened coffee beans to a dry, airtight container that blocks out light. Keep the container at room temperature away from any heat sources.
You can also keep coffee beans in the freezer in sealed containers for 3–4 months. Be sure there is no water present in the container before freezing. However, freezing isn’t considered the best way to preserve quality and taste.
Coffee beans that have been kept past these time periods may taste stale or lose freshness. Usually, they will just decline in quality and won’t actually be unsafe to consume.
To maximize your chances of getting the freshest beans, look for a degassing valve or a recent “roasted on” date on the packaging.
Degassing valves, which look like small circular vents, allow packaged coffee to release carbon dioxide that develops during roasting. This can improve freshness and prolong shelf life (3).
Unopened roasted coffee beans will stay fresh until their best-by date. Opened beans stored in an airtight container at room temperature away from heat and light will stay fresh for 1–3 weeks.
Similar to coffee beans, an unopened package of ground coffee should stay fresh until the manufacturer’s best-by date.
Opened packages of freshly ground coffee should be kept in an opaque, airtight container at room temperature. Keep ground coffee away from heat, light, and moisture. Ground coffee stored in this way will typically stay fresh for 1–2 weeks.
If you live in a humid environment and don’t want to risk exposing your ground coffee to moisture, you can keep it in the fridge or freezer in sealed containers. It will stay fresh for up to 2 weeks in the fridge and 1 month in the freezer.
Instant coffee is a type of ground coffee that has a longer shelf life. Some say that instant coffee can last for 2–20 years when stored properly — meaning in a sealed package or airtight container in a cool, dry, dark place.
Opened packages of instant coffee are also thought to last for up to several years. Check the packaging to see what the manufacturer recommends.
Coffee pods, like those used in a single-cup coffee maker, are another type of ground coffee. They will stay fresh until the best-by date, too.
Store coffee pods in a container or drawer away from heat and light. Since they are individually sealed, it isn’t as important to keep them in an airtight or tightly sealed container.
Remember that ground coffee is usually safe to drink after the best-by date, similar to coffee beans. However, it probably won’t taste as fresh or robust.
Unopened ground coffee will stay fresh until its best-by date. Opened or freshly ground coffee should be stored in an airtight container at room temperature away from heat, light, and moisture. For maximum freshness, consume within 1–2 weeks.
Brewed hot coffee and espresso
Many people believe that brewed coffee is freshest for about 20–30 minutes in an open cup or an hour in a sealed container.
However, you can still drink coffee a few hours after it’s brewed. Brewed coffee that doesn’t have milk or creamer added to it, such as a pot of black coffee sitting on a burner, is likely OK to drink for up to 4 hours. Coffee with milk should be consumed within a couple of hours.
There is little research on the shelf life of brewed coffee. Most recommendations for discarding brewed coffee come from testimonials or personal experience.
If you keep brewed coffee in a sealed container in the fridge, it may last longer. It’s likely safe to consume for up to 3–4 days when stored this way. However, it probably won’t taste that good.
If you add milk or creamer to your brewed coffee, drink it within 2 hours if left at room temperature. You can keep it in a sealed container in the fridge for a day or two. But be sure to smell it and check for any signs of spoiling before consuming, since milk can go bad.
Brewed espresso, like brewed coffee, should also be consumed shortly after brewing for the best taste. It can also be kept at room temperature for a few hours or in the fridge in a sealed container for a few days, but the taste will decline.
Brewed coffee and espresso taste best when consumed shortly after brewing. Within a few hours, the flavor will start to decline. You can keep brewed coffee in the fridge in a sealed container for a few days, but it won’t taste as good over time.
Cold brew will last much longer than brewed hot coffee in the fridge.
Stored in a sealed container in the fridge, cold brew concentrate can last for 7–10 days. If you add water to the concentrate before storing or are keeping a cold brew from a coffee shop in the fridge, it’s best to consume within 3–4 days.
Cold brew with added milk or creamer should be consumed within 2 hours, but it can also be stored in a sealed container in the refrigerator. However, it will only stay fresh for 1–2 days in the fridge. Check for any signs of spoiling — like mold or foul smells — before consuming.
Finally, you can store cold brew and brewed coffee in the freezer, but not in the way you may expect.
Fill an ice cube tray with cold brew or cooled brewed coffee. Let the cubes freeze for a couple of hours until solid, then transfer them to an airtight container or bag. Use within 2 weeks, either as an addition to fresh cold brew or melted down.
Cold brew concentrate lasts 7–10 days in a sealed container in the fridge. Cold brew already mixed with water stays fresh for about 3–4 days — unless it contains milk or creamer — when stored in the same way.
Risks of consuming spoiled or improperly stored coffee
If stored properly, coffee past its prime is rarely cause for concern, from a foodborne illness standpoint. Coffee made from old beans or grounds may not taste as good as fresh coffee, but it usually isn’t dangerous.
That being said, it’s still important to assess coffee for any signs of spoiling before drinking it. Mold, discoloration, or foul smells are a few of the signs that coffee has gone bad and should be discarded.
What’s more, be careful about coffee with added milk or creamer. Milk shouldn’t sit out at room temperature for more than 2 hours to avoid bacterial growth. Drinking spoiled milk can increase the risk of foodborne illness (4).
So, coffee with milk or milk-based products should be consumed within 2 hours. Discard it after that time, unless it’s stored in the fridge.
Coffee can be safe to drink, even after its recommended shelf life. However, its flavor and quality will decline over time. It’s important to check coffee for signs of spoiling before consuming and to drink brewed coffee with added milk within 2 hours.
The bottom line
The shelf life of coffee depends on the type and how it’s stored.
Dry coffee beans and ground coffee should be kept away from moisture, heat, light, and air in unopened packages or airtight containers. In general, drinking old coffee that has been stored properly isn’t dangerous, but it probably won’t taste as good as fresh coffee.
Brewed coffee doesn’t last as long as dry coffee. For best taste, it should be consumed shortly after brewing. But it can be stored in the fridge for varying time periods.
Refer to this list when figuring out how to store certain types of coffee. And remember: Before drinking coffee, check for any signs of spoiling, especially in drinks with added milk or creamer.