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


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.
| Ingredient | Pantry | Fridge | Freezer |
|---|---|---|---|
| All-purpose flour | 6 to 8 months opened | 1 year | 2 years |
| Whole wheat flour | 1 to 3 months | 6 to 8 months | 1 year |
| Almond flour | 1 month opened | 6 months | 1 year |
| Granulated, brown, powdered sugar | Indefinitely, sealed | Not needed | Not needed (brown sugar: optional) |
| Baking soda | 6 months opened | Not for baking | Not needed |
| Baking powder | 6 to 12 months opened | No | No |
| Cornstarch | Indefinitely, dry | Not needed | Not needed |
| Cocoa powder | 1 to 2 years opened | No | Not needed |
| Chocolate chips (semisweet) | About 1 year opened | Hot kitchens only | About 1 year |
| Pure vanilla extract | Indefinitely, capped | Not needed | Not needed |
| Dry yeast, opened | Move to fridge | 4 months | 6 months |
| Honey, corn syrup | Indefinitely, sealed | Not needed | Not needed |
| Pure maple syrup, opened | No | About 1 year | Years |
| Molasses, opened | About 6 months | Up to 1 year | Not needed |
| Shortening, opened | About 3 months | A little longer | Not needed |
| Butter | 1 to 2 days, covered | 1 to 3 months | 6 to 9 months |
| Cream cheese, opened | 2 hours max | About 2 weeks | About 2 months |
| Sweetened condensed milk, opened | 2 hours max | 5 to 7 days | About 3 months |
| Evaporated milk, opened | 2 hours max | 4 to 5 days | About 3 months |
| Pecans, walnuts (shelled) | Up to 3 months | 6 to 9 months | 1 year or more |
| Sprinkles | 2 to 3 years | No | No |
| Food coloring gel | Years, by best-by date | Not needed | Not 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.
| Baked good | Counter | Fridge | Freezer |
|---|---|---|---|
| Cookies, crisp | 1 to 2 weeks | Not needed | 3 months |
| Cookies, soft or chewy | 3 to 5 days | Not needed | 3 months |
| Cookie dough, raw | 2 hours max | 3 to 5 days | 3 months |
| Cake or cupcakes, buttercream | 2 to 3 days | 3 to 5 days | 1 to 2 months |
| Cream cheese frosted cake | 2 hours max | Up to 5 days | 1 month |
| Cheesecake | 2 hours max | Up to 5 days | 1 to 2 months |
| Brownies | 3 to 4 days | 1 week | 3 months |
| Banana bread, quick bread | 3 to 4 days | 1 week | 3 months |
| Yeast bread | 2 to 4 days | Not recommended | 3 months |
| Pumpkin pie, pecan pie | 2 hours max | 3 to 4 days | 1 to 2 months |
| Apple pie | 2 days | Up to 4 days from baking | Up to 4 months |
| Fudge | 1 to 2 weeks | 2 to 3 weeks | 2 to 3 months |
| Toffee | About 2 weeks | Not ideal | 3 months |
| Cinnamon rolls, glazed | 2 days | 1 week | 2 months |
| Cinnamon rolls, cream cheese icing | 2 hours max | 4 to 5 days | 1 month |
| Muffins | 2 to 3 days | Not ideal | 2 months |
| Scones | 1 to 2 days | Not ideal | 2 to 3 months |
| American buttercream (bowl) | Up to 2 days, cool | 1 week | 3 months |
| Royal icing (meringue powder) | 2 weeks, covered | Not needed | Not needed |
| Whipped cream | 2 hours max | 1 to 2 days | Not 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
- Pecan pie, baked Monday: cool it, then refrigerate within 2 hours. Good through Thursday (3 to 4 days).
- Pumpkin pie, baked Wednesday: same rule, fridge within 2 hours. Good through Saturday or Sunday.
- Apple pie, baked Wednesday: loosely covered on the counter until Friday, then into the fridge for leftovers.
- Cheesecake, baked two weeks early: frozen, then thawed in the fridge Wednesday night.
- 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
| What happened | What to do |
|---|---|
| Pumpkin, pecan or cream pie sat out overnight | Toss 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 party | Toss the leftovers. Next time, serve it and put it back within 2 hours. |
| Buttercream cake on the counter for 2 days | Fine in a cool room. Eat it today or move it to the fridge. |
| Fuzzy spot on bread or a muffin | Toss the whole loaf, or any muffin that touched it. Mold spreads further than you can see. |
| Brown sugar hard as a rock | Still good. Seal it with a slice of bread overnight. |
| Baking soda or powder with no date | Run the fizz test from the checker above before you bake. |
| Flour or nuts smell bitter or like crayons | Rancid. It will make the whole bake taste off, so replace it. |
| Gray or white streaks on chocolate | Bloom. Safe and fine for baking and melting. |
Storage tips that make things last longer
- Seal everything. Air, moisture and odors cause most pantry problems. Airtight containers beat clipped bags every time.
- Label the opening date on baking soda, baking powder, yeast and flour.
- Cool baked goods fully before wrapping, or trapped steam makes them soggy and moldy.
- Wrap twice for the freezer: plastic pressed on, then foil or a freezer bag. See how to freeze cake and how to freeze cookie dough.
- Bake ahead for the holidays with cookies that hold up: Christmas cookies that freeze well and how long Christmas cookies last.
Mistakes to avoid
- Leaving pumpkin or pecan pie out overnight. Egg-set pies need the fridge after 2 hours.
- Refrigerating bread. The fridge makes it stale faster than the counter. Freeze it instead.
- Baking with the fridge’s deodorizer box of baking soda. It has soaked up odors and lost strength.
- Storing whole wheat flour and nuts in a warm pantry. Their oils turn rancid in weeks.
- Thawing cheesecake or cream pies on the counter. Always thaw them in the fridge.
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.
More free baking tools



