Every kitchen has a few bottles and bags that were opened “a while ago”. The date on the pack only tells you about the product while it’s sealed. Once you open it, air, moisture, warmth and dirty spoons take over.
The times below come mainly from the USDA FoodKeeper, a storage guide developed by the USDA with Cornell University and the Food Marketing Institute. Most are quality guidelines: after them, food may taste stale or flat before it becomes unsafe. Recipes vary between brands, so the instructions on your own pack come first. If a label gives a shorter time, follow the label.
| Food | Unopened | After opening |
|---|---|---|
| Ketchup | about 1 year (pantry) | about 6 months in the fridge |
| Mayonnaise (shop-bought) | 3–6 months (pantry) | about 2 months in the fridge |
| Soy sauce | about 3 years (pantry) | about 1 month in the fridge for best flavor |
| Peanut butter (regular) | 6–24 months (pantry) | 2–3 months in the pantry; 3–4 months in the fridge |
| Jam and jelly | 6–18 months (pantry) | 6–12 months in the fridge, unless the label says otherwise |
| Milk (fresh) | the date on the carton | about 7 days in the fridge (USDA) |
| Canned food | low-acid 2–5 years; high-acid 12–18 months | low-acid 3–4 days; high-acid 5–7 days, in a covered container in the fridge |
| Olive or vegetable oil | 6–12 months | 3–5 months in the pantry |
| White flour | 6–12 months | 6–8 months in the pantry; about 1 year in the fridge |
| White rice (dry) | about 2 years | about 1 year in the pantry |
Figures from the USDA FoodKeeper unless stated otherwise. They assume a fridge at 40°F (4°C) or below and a cool, dry cupboard.
Unopened ketchup keeps for about a year in the pantry. Once it’s open, FoodKeeper suggests about 6 months in the fridge. The USDA notes that shop-bought ketchup is acidic enough to be safe at room temperature after opening. The “refrigerate after opening” line on the bottle is there to protect flavor and color. If you get through a bottle slowly, the fridge is the better place.
Commercial mayonnaise keeps 3–6 months unopened. After opening, keep it in the fridge and use it within about 2 months. Use a clean knife or spoon every time, because crumbs and bits of other food bring in bacteria. These times are for shop-bought jars only; homemade mayonnaise doesn’t keep nearly as well.
Soy sauce is so salty that it rarely spoils. FoodKeeper gives it about 3 years unopened. After opening it’s still safe at room temperature, but its flavor fades. FoodKeeper and Kikkoman both suggest using it within about a month for the best taste, and refrigerating it helps. Kikkoman says its reduced-sodium soy sauces should go in the fridge once opened.
Regular peanut butter with added stabilizers keeps 6–24 months unopened. Once opened, use it within 2–3 months in the pantry or 3–4 months in the fridge. Natural peanut butter, which separates into oil and paste, has no stabilizers, so FoodKeeper recommends keeping it in the fridge, where it lasts about 3–4 months after opening. If it smells stale or bitter, the oil in it has gone rancid. That’s a quality problem rather than a safety one, but it won’t taste good.
FoodKeeper gives opened jam 6–12 months in the fridge. That’s the long end of the range. Many jars, especially reduced-sugar jams, print a much shorter “once opened” time on the label. Less sugar means less protection, so follow the jar. If you see mold, throw the whole jar away. Scraping off the top isn’t enough.
For fresh milk, FoodKeeper simply says to go by the date on the carton. USDA guidance is that milk keeps about 7 days in the fridge. Many UK and Australian cartons print their own “once opened, use within…” time, and in the UK milk may carry either a use-by or a best-before date, depending on the manufacturer. Keep milk on a shelf inside the fridge rather than in the door, which is the warmest part.
Shelf-stable (UHT) milk keeps 6–12 months unopened. Once opened, it’s just as perishable as fresh milk: FoodKeeper gives it 5–7 days in the fridge.
Unopened, commercially canned food stays safe for a long time if the can is in good condition. The USDA’s quality guideline is 2–5 years for low-acid foods such as meat, fish, soup, beans and most vegetables, and 12–18 months for high-acid foods such as tomatoes, fruit, pickles and juice.
Once opened:
The UK Food Standards Agency advises against storing food in an opened tin, because tin from the can can pass into the food more quickly once it’s exposed to air. Move leftovers into a bowl or container with a lid.
Olive and vegetable oils keep 6–12 months unopened. Once opened, FoodKeeper suggests 3–5 months in a cool, dark cupboard. Heat, light and air make oil go rancid, so keep it away from the stove. Oil that smells stale or bitter has gone rancid and will spoil the taste of whatever you cook with it.
White flour keeps 6–12 months unopened and about 6–8 months in the pantry once opened, or around a year in the fridge. Whole wheat flour contains more oil and goes rancid faster. FoodKeeper’s own entries give different times for it, but all of them are shorter in the pantry than in the fridge or freezer. Store flour in an airtight container to keep out moisture and pantry moths.
Dry white rice is one of the longest-keeping staples: about 2 years unopened and a year once opened, in a sealed container. Brown rice contains oil and keeps less well. FoodKeeper suggests about 6 months in the fridge once it’s opened.
Cooked rice is a different matter. The UK Food Standards Agency advises cooling leftover rice quickly (ideally within an hour), keeping it in the fridge and eating it within 24 hours. FoodKeeper allows 4–6 days. The concern is Bacillus cereus, a bacterium whose spores survive cooking and whose toxin isn’t destroyed by reheating. If you’re unsure, take the stricter advice.
When in doubt, throw it out.
Nobody remembers when the soy sauce was opened. Use-By: Expiry Tracker is a free iPhone app where you log an item in one line, for example Peanut butter 1 jar 1/15/2027, using the “use within” date you’ve worked out. It reminds you before the date and sends a weekly digest, and your household can share the list through iCloud. There’s no account and no ads.
More articles: Food storage and expiry guides.
General food safety information, not medical advice.
Updated: September 29, 2026