If you store and look after your seed well, they will stay viable for many years.
A lot of people know about the seeds found in numerous pyramids and tombs. These seeds sat and waited for thousands of years and when given the opportunity they grew. But how? So long?

Temperature fluctuations

Seeds degrade more readily with temperature fluctuations. Seeds are best stored in your fridge, not necessarily because it’s cold but the stable temperature with-in, or find a place in a storage room you feel has the most stable temperature, you don’t have to be too fussy just be mindful. Certainly, don’t keep them on the cupboard near your heater in the living room where they get afternoon direct sunlight.
We built a specialised mud cellar seed-bank (pictured above) with walls 30-35cm thick of solid mud with no windows, this natural building material with its thermal lag greatly reduces temperature fluctuations. And has the ideal stable humidity for storage of garlic, pumpkins, etc.

Moisture fluctuations.

With the invention of glass and plastic, this is not such an issue, however, if moisture gets in and not taken care of there are a host of micro-organisms that will jump at the opportunity to do their thing with your seeds.
We take seed moisture content very seriously, all the seed we process is naturally dried but then further drying is achieved by placing them in airtight tubs with non-toxic silica beads for one week, this gets the moisture content down to around 3-4% and suitable for long term storage with no chance of mould or fungal growth. Mould and fungi love seed due to the high starch content. 

Sunlight

It might be common sense to keep your seed out of the sun, they will cook, but even indirect light on your shelf, for example, is not ideal. Keep them in a dark place or in a solid light-proof container.
Seed degradation for most varieties happens over years, when seeds are fresh 1-2years you might get 95-100% germination rates, 2-4years 90-95%, 4-6years 70-90%, and so on.
Tip, Use freshly popped pop-corn as an effective natral moisture absorbing substance instead of silica beads for absorbing excess moiture from your seed, change out every so often or when needed.
Take care of your seed and they will take care of you.
Darren