Not as long as you think! The fridge must be maintained at 40°F or below, the freezer at 0 °F or below.
Here is a helpful quote from your friends at the USDA:
Safe Refrigerator Temperature
For safety, it is important to verify the temperature of the refrigerator. Refrigerators should be set to maintain a temperature of 40 °F or below. Some refrigerators have built-in thermometers to measure their internal temperature. For those refrigerators without this feature, keep an appliance thermometer in the refrigerator to monitor the temperature. This can be critical in the event of a power outage. When the power goes back on, if the refrigerator is still 40 °F, the food is safe. Foods held at temperatures above 40 °F for more than 2 hours should not be consumed. Appliance thermometers are specifically designed to provide accuracy at cold temperatures. Be sure refrigerator/freezer doors are closed tightly at all times. Don’t open refrigerator/freezer doors more often than necessary and close them as soon as possible.
So while you’re at the hardware store buying a generator, go ahead and buy a fridge thermometer also.
While it’s expensive to throw away a week’s worth of groceries (or more if you load the freezer like a hoarder/Costco shopper/same thing), it’s a serious expense to endure the effects of foodborne illnesses like Salmonella, etc. You might miss work or require hospitalization, ya see?
So, as the nutritionist saying goes, When In Doubt, Throw It Out. There is no cute rhyme that recommends looking at the back of the fridge, eyeballing it, and going ahead anyway because you’ve done it in the past and nothing bad ever happened. For every kid in my classes who has wiped the green fur off that old basket of strawberries or left yogurt in the bus overnight and lived to tell the tale, there’s a (smart!) friend who ate the leftover 5-day-old chicken burrito and developed a close relationship with the inside of their bathroom overnight.
- All about refrigeration and food safety from foodsafety.gov
- History of refrigeration and more safety stuff (it’s the source of the above quote).
- Keeping food safe during an emergency, from the USDA. A gem from this link:
Keep the refrigerator and freezer doors closed as much as possible to maintain the cold temperature. The refrigerator will keep food safely cold for about 4 hours if it is unopened. A full freezer will hold the temperature for approximately 48 hours (24 hours if it is half full) if the door remains closed. (and you can buy dry ice…click link)