It really depends on the perfume. Like someone said, I have perfumes from my family that are 40 years old, and still fine. Though, they're not really my style, so I don't use them. I also had a perfume that went off after half a year. I think what they use to make it and the packaging have a big part in how ling perfume lasts.
The good thing is, you really can tell. Check the color, and spray onto a sheet of paper to smell. If it seems off, throw it out. If it seems ok, try testing it on a small patch of skin to make sure it won't irritate before dousing yourself.