I think it really depends on how well it is stored. If you keep it completely dry, it should last a VERY long time.
Once you get the hang of making soap, you could try making your own lye too, though I would only want to have to do that in a SHTF situation since it is a touchy material.
I just made a big batch of soap from lye that had to be ten years old from when we put new floors in the kitchen. Had the can sealed tightly in a Ziploc freezer bag and the soap turned out fine. Now to get a new stash. DEE
Keep it totally dry and it will last indefinitely. I'm a soapmaker and I have a pretty good amount stored up but I do plan on teaching myself how to make a somewhat decent soap using the old methods (grease, ash & water). Mainly because if something DID happen, I have the equipment and whatnot to produce large quantities of soap which would be an excellent trade good once things calm down a bit. But then eventually the lye would run out - what then?