Tri-X and HP5+ in a fridge, I'd say in five years time you could still use them at box speed and notice absolutely no difference..
Conversely, I've used HP5+ of about 15 years of age (not cold stored) with very severe base fog and loss of sensitivity. That definitely was too much of a stretch. At the same time, much slower films like APX25, tmax100, PanF+ and PolypanF seem to perform virtually like fresh film at the same age and storage conditions. Based on my experiences with various films of various ages, I'd give a ballpark estimation as follows:
Not cold stored: 3-5 years for 400 b&w film
> 10 years for <100 b&w film
Cold stored:
5-10 years for 400 b&w film
Several decades for <100 b&w film
Color film:
Cold stored: ~10-15 years for <200 speed negative
Not cold stored: <5 years for <200 speed.
For chrome/positive color film and 400 and faster films: all bets are off past CA 3 years beyond the expiration date regardless of storage conditions.
This is based on the assumption that reasonable general fog and color accuracy for dark room printing or projection are desired. Hence, YMMV significantly if your requirements are less strict. In other words: my estimates may be on the conservative side.