As already stated... As long as it is kept dry and in a relatively low humidity area of the house it will last years and years. You will know when it goes bad because no matter what you do, the accuracy from shot to shot will not be consistent. In all my years of shooting I have seen only one pound of Pyrodex go bad. A friend of mine was shooting one day and he could not group anything. I asked him how old the powder was and he said about five years old. I offered him some of my powder and he started shooting groups.
The strange part was, to look at the powder, there was no clumping or discoloration of it. It just would not shoot. He was going to torch it, but I asked him if I could have it to play with. I learned that if I increased the normal powder charge about 15% the accuracy returned.
I've had other powders around the house for as long as seven years with no ill effect. I also shot Goex one day at a friends. His Goex was so old I had to look twice at the can to even know it was Goex. It too, shot perfect. So keep the lid on tight, keep it in a cool dry place and you should be fine. Some people put a silicon bag in them. I save all of them little silicon bags from medicine bottles like aspirin, but then forget where I put them. My intention was to drop them in older powder. But my powder never gets old..