While bacteria can creep in and spoil other types of cosmetics, the numerous solvents contained in most major brands of nail polish essentially keep it from going bad -- as the cosmetic chemists at The Beauty Brains point out, not much can grow in an "ethyl acetate cocktail." The years won't normally take a terrible toll on a properly stored bottle of nail polish.
What the years can do, however, is dry your polish out. The polish's solvents act as a powerful preservative, but they're also prone to evaporation, which causes dry, crusty, not-very-usable nail polish. Speaking to Beautylish, Doug Schoon of Schoon Scientific -- a regulatory consulting service for cosmetics -- conservatively says that properly stored bottles won't dry out for 18 to 24 months. Many users, however, have gotten significantly longer life out of their polish, and Essie Cosmetics' Essie Weingarten tells the same source that "your nail polish should last forever, as long as you store it properly."
To keep your polish in smooth liquid form for as long as possible, replace the cap immediately after use, and keep that cap on tight. Because heat and sunlight can dry polish out, or even alter its color, always store your products in a cool and dry place. If you have a bottle you're particularly keen on keeping fresh, pop it in the fridge to maximize its shelf life.
Nontoxic nail polishes typically ditch chemical ingredients such as toluene, dibutyl phthalate and formaldehyde, and some replace solvent acetates with water. Because nontoxic ingredients vary widely, storage solutions and shelf life will vary by product. Always consult and follow the manufacturer's instructions for best practices.
Rather than focusing on its exact age, have a look at the product's texture to determine your nail polish's usability; clumpy composition indicates that the ingredients have begun to separate, and may be difficult to remix.
When your polish goes a little dry or just feels thicker than usual, there's still hope -- adding a few drops of nail polish thinner to the bottle could be all you need to bring it back to life. If you don't have any thinner handy, nail polish remover can do the trick, too. Since remover is much stronger than thinner, use it sparingly; often just one drop will do. Once you've added the thinner or remover, replace the cap tightly and give the bottle a thorough shake before applying.