Granulated sugar can last up to two years in the pantry after opening. Technically, sugar never spoils. While it's recommended that granulated sugar be discarded after two years, chances are it will still serve its baking purpose even beyond that.