We normally consider seed will remain viable for about 3 years under cool, dark, dry, conditions though there are exceptions. For example, members of the carrot family (carrots, parsnips and parsley) are short-lived and are usually good for only 1 to 2 years. Colorado State University has a publication giving more detailed information on the longevity of specific species at https://extension.colostate.edu/topic-areas/yard-garden/storing-vegetable-and-flower-seeds-7-221/ .
If you are unsure of viability and have plenty of seed, there is an easy method of determining how good your seed is. Place 10 seeds on a paper towel moistened with warm water and cover with a second moistened towel. Roll up the towels and place inside a plastic bag with enough holes for air exchange but not so many that the towels dry quickly. Place the bag in a warm place such as the top of a refrigerator. Remoisten towels with warm water as needed. After the first week, check for germination. Remove sprouted seed and check again after another week. Add these numbers together to determine the percent germination. (Ward Upham)