It depends entirely on the milk content. Dark chocolate can last for years. Milk and white chocolates, however, contain dairy fat which goes rancid after about 6 to 8 months. For chocolate to remain enjoyable, seal it in an airtight container in a cool place, to prevent it from absorbing odors.