Baking Resources
Home › Guides

Shelf-Life Checker: How Long Baking Ingredients and Bakes Last

Baking Resources Editorial · Reviewed by Joan Ramos · Updated December 2026

Shelf-Life Checker: How Long Baking Ingredients and Bakes Last
Quick answer: Sugar, honey, cornstarch and pure vanilla extract don’t spoil if kept sealed and dry, while opened baking soda and baking powder lose their lift after about 6 to 12 months. Most cookies, brownies and quick breads keep 3 to 5 days on the counter and about 3 months frozen. Anything set with eggs, cream or cream cheese (pumpkin and pecan pie, cheesecake, cream cheese frosting) can sit out only 2 hours and keeps 3 to 5 days in the fridge.

Free calculator from Baking Resources

Shelf-Life Checker: How Long Does It Keep?

Pick a baking ingredient or a baked treat, then where you plan to keep it. You’ll get how long it lasts there, whether that’s the right place, the signs it has gone off, and one storage tip.

 

Baking cupboards fill up with half-used bags and jars, and holiday baking leaves a counter full of pies, fudge and cookies. Some of it keeps for years. Some of it needs the fridge within 2 hours. The checker above gives you the answer for one item at a time, and the charts below show everything at once. Times follow USDA and FoodSafety.gov (FoodKeeper) guidance for perishables and assume each item is properly sealed.

Shelf life of baking ingredients

For staples like sugar, flour and cocoa, these are best-quality times: past them the item tastes flat or bakes weaker, but it isn’t unsafe unless moisture, bugs or mold got in. Dairy is different: follow the fridge times.

Chart: Baking Resources
IngredientPantryFridgeFreezer
All-purpose flour6 to 8 months opened1 year2 years
Whole wheat flour1 to 3 months6 to 8 months1 year
Almond flour1 month opened6 months1 year
Granulated, brown, powdered sugarIndefinitely, sealedNot neededNot needed (brown sugar: optional)
Baking soda6 months openedNot for bakingNot needed
Baking powder6 to 12 months openedNoNo
CornstarchIndefinitely, dryNot neededNot needed
Cocoa powder1 to 2 years openedNoNot needed
Chocolate chips (semisweet)About 1 year openedHot kitchens onlyAbout 1 year
Pure vanilla extractIndefinitely, cappedNot neededNot needed
Dry yeast, openedMove to fridge4 months6 months
Honey, corn syrupIndefinitely, sealedNot neededNot needed
Pure maple syrup, openedNoAbout 1 yearYears
Molasses, openedAbout 6 monthsUp to 1 yearNot needed
Shortening, openedAbout 3 monthsA little longerNot needed
Butter1 to 2 days, covered1 to 3 months6 to 9 months
Cream cheese, opened2 hours maxAbout 2 weeksAbout 2 months
Sweetened condensed milk, opened2 hours max5 to 7 daysAbout 3 months
Evaporated milk, opened2 hours max4 to 5 daysAbout 3 months
Pecans, walnuts (shelled)Up to 3 months6 to 9 months1 year or more
Sprinkles2 to 3 yearsNoNo
Food coloring gelYears, by best-by dateNot neededNot needed

For more detail, see how long baking powder lasts, how long yeast lasts, how long vanilla extract lasts and how to store chocolate.

How long baked goods last

“2 hours max” means the item must go in the fridge within 2 hours of cooling (1 hour if the room is above 90°F). Freezer times are for best quality.

Chart: Baking Resources
Baked goodCounterFridgeFreezer
Cookies, crisp1 to 2 weeksNot needed3 months
Cookies, soft or chewy3 to 5 daysNot needed3 months
Cookie dough, raw2 hours max3 to 5 days3 months
Cake or cupcakes, buttercream2 to 3 days3 to 5 days1 to 2 months
Cream cheese frosted cake2 hours maxUp to 5 days1 month
Cheesecake2 hours maxUp to 5 days1 to 2 months
Brownies3 to 4 days1 week3 months
Banana bread, quick bread3 to 4 days1 week3 months
Yeast bread2 to 4 daysNot recommended3 months
Pumpkin pie, pecan pie2 hours max3 to 4 days1 to 2 months
Apple pie2 daysUp to 4 days from bakingUp to 4 months
Fudge1 to 2 weeks2 to 3 weeks2 to 3 months
ToffeeAbout 2 weeksNot ideal3 months
Cinnamon rolls, glazed2 days1 week2 months
Cinnamon rolls, cream cheese icing2 hours max4 to 5 days1 month
Muffins2 to 3 daysNot ideal2 months
Scones1 to 2 daysNot ideal2 to 3 months
American buttercream (bowl)Up to 2 days, cool1 week3 months
Royal icing (meringue powder)2 weeks, coveredNot neededNot needed
Whipped cream2 hours max1 to 2 daysNot recommended

The full wrapping guide is in how to store baked goods.

Does sugar expire?

No. White, brown and powdered sugar don’t spoil, because bacteria and mold can’t grow in something that dry and sweet. Packages carry a best-by date (often about 2 years) for quality only. Sugar goes bad only if water, bugs or strong smells get in. Brown sugar turning hard is just moisture loss; a slice of bread in the bag softens it overnight.

Does flour go bad?

Yes, slowly. White all-purpose flour keeps 6 to 8 months once opened in the pantry, about a year in the fridge and up to 2 years in the freezer. Whole wheat and nut flours go rancid much sooner (1 to 3 months in the pantry) because they still contain oil. Rancid flour smells sour, bitter or like old crayons. See how to store flour for every type and the best containers.

Does baking soda expire? How to test it

Baking soda doesn’t spoil, but it slowly loses strength once opened. For full lift, use it within about 6 months of opening. To test it, stir 1/4 teaspoon into 2 teaspoons of white vinegar or lemon juice. Strong, instant fizzing means it’s good. A few slow bubbles mean it’s time for a new box (the old one can clean the sink). Baking powder has its own hot-water test: see how long baking powder lasts.

Do sprinkles expire?

Not in the food-safety sense. Sprinkles are mostly sugar, so they keep their best quality for about 2 to 3 years in a sealed jar. With age the colors fade and the coating can taste waxy or stale. Throw them out if they clump from moisture, bleed color, or smell rancid (some contain oil). Don’t keep them in the fridge; condensation makes the colors run.

Does pecan pie need to be refrigerated?

Yes. Pecan pie filling is set with eggs, so the USDA treats it like a custard pie: refrigerate it within 2 hours of cooling. It keeps 3 to 4 days in the fridge and 1 to 2 months in the freezer. Pumpkin and sweet potato pie follow the same rule; fruit pies like apple can sit out for up to 2 days. More times are in how long pumpkin pie lasts.

How long does banana bread last?

Banana bread lasts 3 to 4 days at room temperature, wrapped, and up to a week in the fridge (helpful in humid weather, when it can mold sooner). Frozen, it keeps its best quality for about 3 months. Wrap the cooled loaf or slices in plastic, then foil, and thaw on the counter. Check the bottom for mold first; moist loaves go there before anywhere else.

How long does fudge last?

Fudge keeps 1 to 2 weeks at room temperature in an airtight container, 2 to 3 weeks in the fridge, and 2 to 3 months in the freezer. Wrap it in plastic before boxing it, or the edges dry out and turn grainy. Old fudge that’s dry or sugary is still safe; toss it only if you see mold or it smells off.

Can you freeze cheesecake?

Yes, and it freezes better than most desserts. Chill the baked cheesecake overnight, then wrap it in plastic and foil (whole or in slices) and freeze for 1 to 2 months. Thaw it overnight in the fridge, never on the counter. Add fruit toppings or whipped cream after thawing. See how long cheesecake lasts for every kind.

Can you freeze brownies?

Yes. Brownies keep about 3 months in the freezer. Freeze the cooled slab uncut, or cut squares wrapped one by one so you can grab a single brownie. They thaw in about an hour on the counter. Cream cheese brownies should thaw in the fridge. More in how long brownies last.

How long can buttercream sit out?

American buttercream (butter and powdered sugar) can sit out up to 2 days, covered, in a room under about 72°F (22°C), because all that sugar keeps bacteria in check. In a warm kitchen, refrigerate it; it keeps about 1 week there. Meringue buttercream is best kept to about 1 day in a cool room. Cream cheese frosting and whipped cream can sit out only 2 hours. Details for each kind are in how to store frosting.

Worked example: Thanksgiving pies made ahead

  1. Pecan pie, baked Monday: cool it, then refrigerate within 2 hours. Good through Thursday (3 to 4 days).
  2. Pumpkin pie, baked Wednesday: same rule, fridge within 2 hours. Good through Saturday or Sunday.
  3. Apple pie, baked Wednesday: loosely covered on the counter until Friday, then into the fridge for leftovers.
  4. Cheesecake, baked two weeks early: frozen, then thawed in the fridge Wednesday night.
  5. On the day: the custard pies come out for dessert and go back in the fridge within 2 hours.

Left it out or not sure? Keep it or toss it

Chart: Baking Resources
What happenedWhat to do
Pumpkin, pecan or cream pie sat out overnightToss it. Egg and dairy fillings are unsafe after 2 hours, even if they look and smell fine.
Cream cheese frosted cake out for 3 hours at a partyToss the leftovers. Next time, serve it and put it back within 2 hours.
Buttercream cake on the counter for 2 daysFine in a cool room. Eat it today or move it to the fridge.
Fuzzy spot on bread or a muffinToss the whole loaf, or any muffin that touched it. Mold spreads further than you can see.
Brown sugar hard as a rockStill good. Seal it with a slice of bread overnight.
Baking soda or powder with no dateRun the fizz test from the checker above before you bake.
Flour or nuts smell bitter or like crayonsRancid. It will make the whole bake taste off, so replace it.
Gray or white streaks on chocolateBloom. Safe and fine for baking and melting.

Storage tips that make things last longer

Mistakes to avoid

Frequently asked questions

Does honey expire?

No. Sealed honey keeps indefinitely. It may crystallize, which is normal; set the jar in warm water to melt it. Toss it only if it foams, smells fermented or grows mold.

Does cocoa powder go bad?

Not in a way that makes it unsafe. It keeps its best flavor 1 to 2 years after opening, then slowly tastes flat. Toss it if it smells musty or shows mold.

Does brown sugar go bad?

No. It can harden as it dries out, but it’s still safe. Soften it with a slice of bread in the bag overnight, or a few seconds in the microwave with a damp paper towel.

How long does cheesecake last in the fridge?

Up to 5 days, covered. It can sit at room temperature for only 2 hours. For longer storage, freeze it for 1 to 2 months.

Does pumpkin pie need to be refrigerated?

Yes. Pumpkin pie is a custard pie made with eggs and milk, so refrigerate it within 2 hours of cooling. It keeps 3 to 4 days in the fridge.

Can you freeze fudge?

Yes. Wrap it tightly in plastic, then foil or a freezer bag, and freeze for 2 to 3 months. Thaw it in the wrapping so moisture doesn’t bead on the surface.

Does frosting with cream cheese need to be refrigerated?

Yes. Cream cheese frosting, and any cake frosted with it, can sit out 2 hours at most and keeps up to 5 days in the fridge.