What pantry foods last past their expiration date
Most low-acid canned foods stay safe for 2 to 5 years past the printed date, and dry staples like rice, pasta, sugar, and honey can last just as long. Here is the USDA-backed breakdown of how long common pantry foods last, how to spot real spoilage, and how to store everything so it lasts.

Most low-acid canned foods, think vegetables, beans, meat, fish, and soup, stay safe to eat for 2 to 5 years past the date on the label, according to USDA guidance, as long as the can has no rust, dents, or bulging. Dry pantry staples like rice, pasta, sugar, and honey often last just as long, or longer, if they have stayed sealed and dry.
That is a wider window than most people expect. The date on a can of beans or a box of pasta almost never means what people think it means. Here is what USDA's food safety guidance says about how long pantry food lasts, how to tell when it has gone bad, and how to store it so it lasts as long as possible.
What the date on the package means
Except for infant formula, dates on food packages are not required by federal law and are not a safety cutoff. A "best if used by" date is the manufacturer's estimate of when the product is at peak flavor and quality, not the day it becomes unsafe. Foods that show no signs of spoilage can be sold, donated, and eaten well beyond that date, according to the USDA Food Safety and Inspection Service.
For pantry staples, that distinction matters a lot, because shelf-stable food is built to outlast its date by months or years.
How long do pantry foods last past the expiration date?
The table below uses USDA FoodKeeper guidance for unopened, room-temperature pantry storage. These are quality and general safety guidelines, not hard cutoffs, and they assume the package is intact. Once you open a container, most of these times get shorter.
| Pantry food (unopened) | How long it lasts past the printed date |
|---|---|
| Canned vegetables, beans, meat, fish, or soup (low-acid) | 2 to 5 years |
| Canned tomatoes, fruit, or juice (high-acid) | 12 to 18 months |
| White or wild rice | Up to 2 years |
| Brown rice | About 1 year |
| Dry pasta | About 2 years |
| Dried beans | 1 to 2 years for best quality |
| Dried lentils | About 1 year for best quality |
| All-purpose flour | 6 to 12 months |
| Whole-wheat flour | 3 to 6 months |
| Granulated or brown sugar | 18 to 24 months for best quality |
| Honey | Does not spoil; USDA lists up to 2 years for best flavor |
| Peanut butter | 6 to 24 months |
| Cooking oil (vegetable or olive) | 6 to 12 months |
| Ready-to-eat cereal | 6 to 12 months |
| Ground spices | 2 to 3 years |
| Whole spices | 3 to 4 years |
| Baking soda | 2 to 3 years |
A few of these numbers are worth calling out. Canned low-acid foods hold up the longest because canning and heat processing lock out the oxygen and bacteria that cause spoilage. Raw chicken, for comparison, only stays safe in the fridge for a day or two after you bring it home; see how long raw chicken lasts in the fridge for that much shorter timeline.
The rice and pasta rows above are for dry, uncooked product sitting sealed in a bag or box. Once you cook a batch, the clock resets completely and the food moves to the fridge, where it behaves nothing like its dry pantry version. See how long cooked rice lasts in the fridge for that separate timeline.
For a full breakdown across fridge, freezer, and pantry categories, our guide to how long food lasts is a good starting point.
How to tell if it has gone bad
Sensory checks still matter, even on food built to last for years. Look for:
- Cans: rust, leaking, deep dents (a dent you can press a finger into), or bulging, swollen ends. Any of these means the seal may be compromised, so do not open or taste the food.
- Dry goods (flour, rice, pasta, cereal, crackers): an off or musty smell, clumping from moisture, discoloration, or small holes and webbing that signal pantry pests. Toss the whole container if you see any of these.
- Oils: a sharp, rancid smell, sometimes described as smelling like paint or crayons, means the oil has oxidized. Discard it even if the date has not passed.
- Sugar and honey: hardening or crystallizing is not spoilage. You can break up hardened sugar, and warm honey gently to return it to liquid form. Both are still safe to eat.
Some spoilage, though, is invisible. Botulism, the most serious risk in low-acid canned food, produces a toxin with no smell, taste, or visible sign in many cases. That is why the storage rule matters more than trusting your nose alone: an intact can with no rust, dents, or bulging, combined with a reasonable time frame. When a can shows those physical warning signs, skip the sniff test and throw it out.
How to store pantry food so it lasts
- Keep the pantry cool, dark, and dry, ideally between 50 and 70 degrees Fahrenheit, away from the stove, dishwasher, or direct sunlight. Heat and light speed up rancidity and nutrient loss in oils, spices, and whole grains.
- Move opened flour, rice, pasta, cereal, and sugar into airtight containers. This blocks moisture and keeps pantry moths and weevils out far better than the original bag or box.
- Keep honey, syrup, and oil jars tightly capped between uses.
- Rotate stock so older cans and boxes get used first. Write the purchase or open date on the lid with a marker, since the original best-by date often gets tossed with the packaging.
- If keeping track of open dates across a full cabinet sounds like more mental math than you want to do, an app to track food expiration dates can log it for you and flag items before they get pushed to the back of the shelf and forgotten.
Can you freeze pantry food to make it last longer?
For some items, yes. Flour, especially whole-wheat and other whole-grain flours, rice, nuts, and dried fruit all freeze well, and freezing also kills or prevents pantry moth eggs from hatching. A sealed freezer bag works fine for any of these.
Canned goods are the exception. Do not freeze food in the can on purpose. The liquid inside expands as it freezes, and that can swell the can, compromise the seal, and let bacteria in. If a can accidentally freezes and is not swollen, bulging, leaking, or rusted, USDA guidance says to thaw it slowly in the refrigerator, then check that it looks and smells normal, and cook it thoroughly right away if you decide to use it. Discard the can, unopened and untasted, if it is swollen or bulging at any point, if the seam has burst or rusted, or if it thawed at room temperature instead of in the refrigerator, or thawed and then refroze.
When in doubt, throw it out
This is USDA's own guidance for a reason: you cannot see, smell, or taste the toxin that causes botulism. If a can is leaking, bulging, cracked, or spurts liquid when you open it, or if any food smells or looks off in a way you cannot explain, do not taste it. Throw it out.
Frequently asked questions
Does canned food really stay safe for years past the date?
Yes. Low-acid canned vegetables, beans, meat, and fish are safe for 2 to 5 years past the printed date if the can is undamaged, according to USDA guidance, though texture and flavor may start to fade in the last year or so of that window.
What pantry food never goes bad?
Honey and dry granulated sugar do not support the bacteria and mold that cause spoilage, so sealed, dry containers of either stay safe indefinitely even though the label lists a best-by date. Salt behaves the same way.
Is it safe to eat rice or pasta a year past the date?
Generally yes. Dry rice and pasta kept sealed and dry are usually safe well past the printed date. Toss them only if you notice moisture damage, an odd smell, or signs of pantry pests.
Updated July 2026.
Sources: USDA FSIS, Food Product Dating, USDA FoodKeeper App, FoodSafety.gov, USDA, Before You Toss Food, Wait. Check It Out!, USDA, If canned goods freeze accidentally, are they safe?