At the back of every fridge sits a container in quantum superposition: simultaneously tonight’s dinner and a biohazard, unresolved until observed. Food safety science can collapse that wavefunction — the guidelines are clearer than most people think, and stricter in places than intuition suggests.
The core facts: most cooked leftovers hold 3–4 days refrigerated (the USDA/FDA window); rice and pasta carry special risk from Bacillus cereus, whose toxins survive reheating; cooling history matters as much as age (food that idled hours at room temperature entered the fridge pre-loaded); and the smell test is unreliable because the dangerous organisms are mostly odorless — smell detects spoilage bacteria, not pathogens.
Enter the container’s biography. You get a Risk Index, the dominant risk factor, and a plain verdict: eat, reheat-thoroughly-then-eat, or release it to the bin with honor. When the verdict is uncertain, the calculator sides with the bin — a rule that has never once been regretted.
The formula
t / t_limit- Days stored vs. the food class’s safe window (3–4 days for most cooked food)
C_cooling- Cooling history — hours at room temperature before refrigeration
B_cereus- Rice/pasta factor — B. cereus toxins are not destroyed by reheating
D_doubledip- Contamination events — eaten from directly, double-dipped, left open
T_fridge- Fridge discipline — actual temperature ≤ 4°C
How it works, step by step
- Identify the food class — the safe windows differ sharply (seafood ≠ hard cheese).
- Count the days honestly, including the day it was cooked.
- Reconstruct the cooling history: how long did it sit out before refrigeration?
- Declare contamination events — eating straight from the container counts.
- Read the verdict. When in doubt, the bin is the correct organ of digestion.
Worked examples
The day-5 fried rice
Rice dish, 5 days stored, sat out 2–4 hours on cooking night, several forks, smells normal, will reheat. Risk: 99 — Biohazard emeritus. Rice is the calculator’s strictest category: B. cereus toxins survive reheating, and the cooling history pre-loaded the container. Bin.
The day-2 chicken curry
Meat dish, 2 days, refrigerated within an hour, served out properly, smells normal, thorough reheat planned. Risk: 8 — Still dinner, at 50% of its 4-day window. The model’s only note: eat by day 4, and it gets better with age until then anyway.
How to read your score
Frequently asked questions
How long do leftovers really last in the fridge?
The USDA/FDA guideline is 3–4 days for most cooked foods at ≤4°C — shorter than most people assume. Seafood and cut produce run shorter (1–3 days); hard cheeses and cured meats run much longer. Freezing stops the clock entirely.
Why is rice treated so strictly?
Bacillus cereus spores survive cooking, germinate in rice left warm, and produce toxins that are NOT destroyed by reheating. That is why cooling history matters more than reheat vigor for rice and pasta — and why “fried rice syndrome” has its own name.
Can I trust the smell test?
Only in one direction. Bad smell = reliable no. Normal smell ≠ safe: the pathogens that cause food poisoning (salmonella, listeria, B. cereus toxins) are largely odorless. Smell detects spoilage organisms, which are a different population than the ones that hurt you.
Does thorough reheating make old leftovers safe?
Partially: proper reheating (74°C/165°F throughout) kills most live bacteria but not heat-stable toxins already produced. That is why reheating rescues day-4 stew but not day-6 rice — the verdict engine distinguishes exactly this.
What is the 2-hour rule?
Perishable food should not sit between 4°C and 60°C (the danger zone) for more than 2 hours cumulative — 1 hour if the room is hot. Food that cooled on the counter overnight entered the fridge with hours of bacterial growth already banked; the calculator weighs this heavily.
Is this medical advice?
It is an educational model of published food-safety guidelines. Higher-risk groups — pregnant, immunocompromised, very young or elderly — should apply stricter standards, and anyone with symptoms after eating should consult a professional, not a calculator.
Reference: refrigerator storage windows (USDA/FDA-based)
| Food | Fridge window | Freezer | Key risk |
|---|---|---|---|
| Cooked meat & poultry dishes | 3–4 days | 2–6 months | Salmonella, listeria growth |
| Cooked rice & pasta | 3–4 days* | 1–2 months | B. cereus — toxins survive reheating |
| Soups & stews | 3–4 days | 2–3 months | Slow cooling in deep containers |
| Cooked seafood | 2–3 days | 2–3 months | Fastest spoilage of cooked proteins |
| Cooked vegetables | 3–5 days | 8–12 months | Generally lowest risk |
| Cream sauces & dairy dishes | 3–4 days | Not recommended | Separation + bacterial growth |
| Cut fruit / dressed salads | 1–3 days | Not recommended | Surface bacterial growth |
| Hard cheeses (opened) | 3–4 weeks | 6 months | Mold (can be trimmed on hard cheese) |
| Deli / cured meats (opened) | 3–5 days | 1–2 months | Listeria |
*Rice must be refrigerated within 1 hour of cooking for this window to apply. Count the cooking day as day zero.
| Zone | Temperature | Max cumulative time | What happens |
|---|---|---|---|
| Safe (cold) | ≤ 4°C / 40°F | Days (see windows) | Bacterial growth dramatically slowed |
| Danger zone | 4–60°C / 40–140°F | 2 hours (1h if >32°C) | Bacteria double every ~20 minutes |
| Safe (hot) | ≥ 60°C / 140°F | Hours (holding) | Growth stopped; toxins already made persist |
| Reheat target | ≥ 74°C / 165°F | — | Kills live bacteria; NOT heat-stable toxins |
Based on USDA Food Safety and Inspection Service guidance. When in doubt, throw it out.