The smaller the seed the longer it is likely to last and still grow (assuming it is kept in cool, dry, dark conditions). Bigger seeds like beans only tend to last at best 2 years before it becomes unlikely they will germinate, smaller seeds like carrots can last 2 or 3 years easily. I keep all my seeds in their packets, sealed inside an airtight plastic (Tupperware) box in my fridge. The fridge is a great place to store them if you want to extend their potential as viable seed, and can extend their usability by several years or more. The other advantage is that when you do eventually plant them out they will germinate faster because by being in the fridge you created an artificial winter for them, and once removed from the fridge and planted outside the contrast in temperatures made it seem like spring. Remember they should be in the fridge NOT the freezer though.
I also agree with amos316 when he/she said about seeds being found in the pyramids that were thousands of years old and still germinated. This was because they were in an extremely dry, dark environment where the lack of moisture, and therefore bacteria extended their viability for many years.