Coffee doesn't necessarily go bad. After a few weeks the taste definitely starts to dissipate and stale. There are a lot of factors that go into it, including roast shade, packaging, and where the coffee is stored.
How long will my coffee stay fresh?
It is recommended to drink coffee within the first two weeks of receiving it. Luckily, most coffee drinkers report drinking a pound of coffee in less than that amount of time, anyway. After that, coffee begins to stale. Much like cereal, it isn't dangerous to drink stale coffee, but it does start to lose and change its flavor.
Of course, there is a difference between coffee going stale and coffee going bad. In a pinch, a lot of people will sacrifice quality of taste for a caffeine kick--just make sure you're not drinking coffee that has gone rancid and will make you sick.
I have old coffee. Is it safe to drink?
As long as coffee is stored properly (unopened, sealed, dry), it's safe to drink for years. In fact, a lot of grocery stores and big chains keep coffee on the shelf for several months on their own, never mind the amount of time it will sit in someone's cupboard.
If you found old coffee that you're thinking about drinking, inspect it first. Do not brew it if the coffee:
- Has been stored without being tightly sealed
- Is wet in any way
- Smells of mildew or contains any visible mold
Use your judgement and be careful about what you brew. If the question is whether or not it's safe to drink coffee, the most notable example is a Redditor LitrillyChrisTraeger who found an unopened tin of coffee from fifty years ago.
He decided to brew and drink it, and he was left unscathed without so much as a belly ache. It's worth mentioning that it tasted absolutely terrible (read: burnt popcorn) and is obviously not recommended, but it goes to show you how tough coffee actually is.
Coffee doesn't go bad necessarily, and you can drink it safely for a long time-- but try and drink it within a few weeks for best results.