I just used the last of the grain I had from last August and it tasted just slightly less fresh than this year's purchase but not to the point that I wouldn't use it. I'd say 18 months would be my limit before I'd toss it.
Hops are weird for me because some vac sealed pellets that I've kept in the freezer have gone cheesy and turned yellow within a year. I did have a freezer failure and they got warm for about a week, but I thought they'd last longer. In any case, I will be using fresher hops for finishing and save the older stuff for bittering.