You found a bag of ground coffee in the back of the pantry that you opened a month ago. It does not smell rancid, but it does not smell like much at all. You also have a batch of cold brew in the fridge from last week and a jar of instant coffee that has been sitting in the cabinet for two years. What is still worth drinking?
Does coffee go bad?
The short answer: Yes, but not the way most perishable food does. Coffee does not spoil in a food safety sense unless moisture causes mold to develop. Instead, it goes bad in a quality sense. The oils oxidize, the aromatics dissipate, and the flavor turns flat or stale. Ground coffee tastes best within 1 to 2 weeks of opening. Whole beans hold flavor for 2 to 3 weeks after opening. Brewed coffee should be consumed within 4 hours at room temperature or 3 to 4 days refrigerated. Expired coffee is generally safe to drink — it just will not taste good.
For related storage guidance, see Does Soy Sauce Go Bad?, Does Sesame Oil Go Bad?, and our full Food Storage Guide.

Key Takeaways

Ground coffee opened: best within 1 to 2 weeks, usable up to 1 month
Ground coffee unopened: 3 to 5 months in a sealed bag; check the best-by date
Whole beans opened: best within 2 to 3 weeks, usable up to 1 month
Whole beans unopened: 6 to 9 months past roast date in sealed bag
Instant coffee opened: 3 to 6 months; unopened up to 2 years
Brewed black coffee: 4 hours at room temperature; 3 to 4 days refrigerated
Cold brew concentrate: up to 2 weeks refrigerated in a sealed container; ready-to-drink cold brew: up to 1 week
Coffee pods (K-Cups): best by date, typically 8 to 12 months; safe well beyond
Mold from moisture exposure is the only genuine safety concern
Do not refrigerate whole beans or ground coffee: moisture and odors ruin quality

Safety vs. Flavor: The Key Distinction
Coffee behaves differently from most foods when it ages. Unlike milk or meat, coffee carries no meaningful food safety risk as it ages, provided it stays dry. The National Coffee Association confirms that roasted coffee beans will not expire in a dangerous way unless moisture enters and allows mold to develop. In fact, research on coffee’s health benefits consistently shows that regular coffee consumption is associated with positive outcomes. Safety is not the concern with old coffee. However, the flavor story is entirely different.
Roasted coffee contains hundreds of volatile aromatic compounds and oils that begin oxidizing the moment roasting finishes. Grinding accelerates this process dramatically by increasing the surface area exposed to air. As a result, ground coffee loses its best flavor within days or weeks of opening, not months. The coffee in that pantry bag is almost certainly still safe to drink. The question is whether it tastes worth drinking.
For this reason, specialty roasters think in terms of roast date rather than expiration date. A bag of coffee roasted six months ago and kept sealed is safer than one roasted two weeks ago and left 

Author