This Is How Long You Can Safely Store These Foods On Your Counter

We've all done it before. You're cooking in the kitchen and leave out a condiment, ingredient, or any item you might normally refrigerate and only realize it hours later. Or, maybe, you cooked up a favorite recipe, enjoyed the fruits of your labor, and then forgot to actually put away your leftovers until the next morning. Maybe you just like leaving certain items or often-used ingredients out on the counter so they're always in easy reach, but you're starting to wonder about food safety. Whatever the case might be, the question remains the same: Is this food I've left out on my counter safe to eat?

While many food items are perfectly fine on your countertop or table, or in the pantry, there are some items that you'll just want to refrigerate. Some items, on the other hand, can sit out on your counter for a few hours or days without worry, but have a certain point after which they become a health hazard. To help you navigate the safety and best practices of eating and storing some of your favorite foods, here's how long to store 13 food items on your counter, both for safety and quality.

Cooked food

Firstly, let's talk cooked food, as it can sometimes be the worst offender. After all, if you're cooking in the evening and you've hosted a dinner party or a date night, you're just sometimes too tired or even too distracted or busy to put up those leftovers right away. And will it really hurt anything if that roast chicken sits out all night? 

Yes, yes it will. While you may have eaten your fair share of leftover pizza that's sat out overnight in a cardboard box in your college days, the U.S. Department of Agriculture's Food Safety and Inspection Service notes that this kind of behavior is risky. Since food bacteria grows substantially on cooked food items once they reach "the danger zone," or between 40 and 140 degrees Fahrenheit, it's important to refrigerate them before they reach that danger zone. The USDA says, for most food, you have about two hours, but if the outside temperature is particularly hot, 90 degrees Fahrenheit or above, you only have about an hour.

So, go ahead and eat your dinner before you put away your leftovers — but don't leave your cooked food sitting out on the counter much longer than that.

Baked food

But baked food is different than cooked food. After all, just about every home baker has a cake plate or other receptacle in which they store cookies, muffins, cakes, and the like, and they're totally fine. You can even go into cafes and bakeries and find baked goods sitting out at room temperature, all day long. So what gives? How long can baked food sit out on the counter?

With baked food, bacteria isn't a worry the way it is with cooked items like meat dishes or casseroles. Instead, your main concern is freshness (because who likes a stale cookie?). As Martha Stewart explains, most baked items will remain fresh on the counter for multiple days. Brownies and cookies are good in an airtight container for up to five, while moister items like muffins, breads, and pastries are good for two to three. Cakes are likewise fine on the counter for three days. After that, you risk some staleness and, with particularly moist baked items, mold growth.

Pies

Fruit pies get their own little mention apart from the rest of the baked goods, as they stand apart from their bread and brownie brethren due to that fruit content. You can keep most apple, cherry, or other fruit pies on the counter, covered, for up to two days, says The Kitchn; however, don't feel like you need to toss them after those two days are up. After that time has passed, you can toss those pies in the refrigerator for two more days or even freeze them for up to four months.

Other pies are a little more finicky. If your pie has egg in the filling (think pecan or pumpkin), or is made with a custard or cream base, then you should treat it similarly to a cooked food and refrigerate it within one to two hours. Otherwise, the egg and dairy content can grow bacteria or spoil, leaving you feeling less than your best.

Butter

Speaking of dairy content, butter is one of those things that some people refrigerate and some people don't. You might find that your grandmother always keeps a crock of butter in the middle of her dining room table, while you always keep yours in the side of the fridge door. So how safe is it to keep your butter on the counter? As Tasting Table covered, pasteurized butter can sit out at room temperature anywhere from a few days to a week, depending on your personal comfort level. Pasteurized butter features a high fat content and low water content, which means bacteria doesn't care for it too much and, if you purchased your butter in the United States from a grocery store, your butter is guaranteed to be pasteurized.

Still, in order to keep your room-temperature butter from going rancid, you'll want to keep it in an airtight container.

Eggs

Eggs are another ingredient that some people refrigerate and some people don't. In fact, in Europe, it's standard to not refrigerate your eggs at all and some grocery stores sell their eggs off the shelf versus from a cooler. However, while some may not worry about refrigerating their eggs, it's actually pretty important if you live in the United States. The sanitization process in the United States slightly thins egg shells' protective outer layer, which means the eggs are more susceptible to new bacteria. Leaving eggs out on the counter can cause new bacteria to form on the outside of the shells and that bacteria can then contaminate the interior of the egg, through the thinned shell.

So, as Taste of Home further explains, keep your eggs off the counter completely and leave them in your refrigerator, at a temperature of 40 degrees Fahrenheit or less, preferably on the fridge shelf, not in the door. There, they'll last up to five weeks.

Cheese

How many times have you been to a party and saw trays of cheese sitting out on a buffet for hours? How many times have you made a charcuterie board and snacked on it all through the day? While cheese may seem safe to leave out at room temperature, that's not always the case. It all depends on the type of cheese.

Dairy Farmers of Wisconsin told Bon Appetit that cheese is only good outside of the fridge for four hours, tops — but that's only to keep your cheese in best condition. The publication later clarified in its interview that, for example, after eight hours on the counter, cheddar might not "have a lot of bacterial growth," but it'll just look unappealing. Likewise, some sources said that hard cheeses — think parmesan — can stay out for about 24 hours, while other cheeses can stay out for up to six hours if you keep them under 70 degrees Fahrenheit. Again, it all depends on the cheese and the circumstances. In general, though, harder cheeses last longer on the counter than soft cheeses, but any cheese that looks shiny or wet needs to be tossed.

Jams, jellies, preserves, and marmalades

Moving on to condiments and your counter, when it comes to jams, jellies, preserves, and marmalades, it's important to identify which you have on your hands before you decide how long it's safe to sit on the counter, as well as what it's made from. As Fine Cooking defines, a jelly is made from fruit juice and gel; a jam is made from actual fruit pieces; preserves contain whole or large pieces of fruit; and marmalades are made from pieces of citrus fruit only. None of these need to be refrigerated when they're unopened and if they're store-bought.

For any of these, if the sugar content is high, the sugar will act as a natural preservative and you can keep the opened jar in a dry, cool cabinet for up to a month (so maybe skip the countertop and put it back in the pantry). The same thing goes for marmalades, preserves, and jams with large pieces of fruit that add preserving acidity to the mix. If the sugar and fruit content is low, though, like in a low-sugar or sugar-free jelly, you'll want to refrigerate the opened jar as soon as possible, to prevent mold and other signs of spoilage.

Salad dressing

Salad dressing is another condiment that you either can or can't leave out depending on the type of dressing. If you're the type to simply dress your salad with oil and vinegar, you can leave the two out on their own, indefinitely, no problem. You'll even find that some vinegar and oil-based, store-bought dressings specify on the label to store them at room temperature, even after opened. However, it's a good idea to keep any dressings containing eggs or dairy in the fridge.

So what about homemade dressings? Again, follow the general rules for dairy and eggs (keep it in the fridge!) for those dressings containing either. For homemade vinaigrettes, though, the waters are a bit murky. The Kitchn recommends refrigerating any vinaigrettes that contain ingredients beyond vinegar and oil, though, ideally, you'd not store any homemade vinaigrette at all, anywhere, and just make your dressings fresh, each time they're needed.

Mayonnaise

Mayonnaise gets a bit of a bad rap when it comes to food safety and spoilage. Anytime there's a mass breakout of food poisoning at a picnic or potluck, people seem to point the finger toward the mayonnaise-laden potato salad or chicken salad sandwiches. However, the assumption that mayonnaise is quick to spoil to a dangerous degree is a bit oversold. In fact, one study found that store-bought mayonnaise contains enough acid to actually kill and prevent food-borne pathogens.

So how long can mayonnaise sit on the counter? According to the U.S. Department of Health & Human Services, mayonnaise only needs to be discarded if it sits at above 50 degrees Fahrenheit for more than eight hours. All those problems with mayonnaise-containing potluck dishes, Epicurious explains, likely stem from other ingredients growing bacteria, such as the meats, poultry, or eggs that are often found in the same dishes.

Other Condiments

But what about other condiments? You've likely been to many a restaurant where opened bottles of barbecue sauce, hot sauce, ketchup, mustard, and the like all sit out on the table for days at a time, until they're completely used up. Is it safe?

For the most part, yes. Many store-bought condiments contain enough preservatives, vinegar, and other bacteria-preventing ingredients to keep them from spoiling at room temp. These include mustard, ketchup, fish sauce, soy sauce, and hot sauce. For gauging whether or not you can leave other condiments out on your counter indefinitely, look at the ingredients list. A high amount of acid or vinegar, or fermented ingredients, is a sign you should be safe, so long as there are no fruit or vegetables included. For best results, keep the condiments out of direct sunlight and in a cool spot, and don't be worried if the condiment changes color slightly over time. That's normal.

Apples

When you get home from the grocery store and start putting away your food, you likely throw a lot of produce right into the fridge. After all, isn't that what the produce drawer is for? Sure, you know to keep the potatoes, onions, and bananas out at room temperature, but there are a few fruits and veggies that can go either way.

When it comes to apples, many people leave their apples out in a fruit bowl on the counter, which is fine, but it does shorten the life of your apples considerably. As The Los Angeles Times reports, apples left at room temperature on the counter will last about a week. However, refrigerated apples will last up to two months under the right conditions. So, while you can leave your apples out on the counter and enjoy perfectly healthy, tasty apples for up to a week, pop them in the fridge next time, for no more leftover apples rotting away and attracting fruit flies in your kitchen.

Peppers

Peppers are similar. You could leave them out on the counter and be just fine for up to five days, Imperfect Foods told Martha Stewart, but for more days to use your bell peppers, store them in the fridge, where they'll last up to two weeks. Ideally, you should store your refrigerated bell peppers in a resealable bag at the front of your produce drawer, for the best texture and appearance. If you choose to store them elsewhere, outside of the fridge, opt for a dry spot away from heat or cold.

Furthermore, if you're trying to get your peppers to last as long as possible in the fridge, Pepper Scale recommends not washing your peppers and keeping them whole until right before you're ready to eat them, as well as tossing that plastic bag from the grocery store. You also want to keep peppers stored away from ethylene-producing fruits and veggies, such as apples and peaches, which can make your peppers age faster.

Chocolate

You've likely heard of tasty "hacks" like putting your chocolate bar in the freezer before chowing down on a cool treat, or storing opened bags of chocolate chips in the fridge, but you don't want to store all chocolate in the fridge. In fact, some types of chocolate can last longer if you keep it at room temperature, on the counter or in the pantry. According to Street Smart Kitchen, dark chocolate can last up to five years at room temperature, due to its low dairy content and high cocoa content. Bittersweet, semi-sweet, and baking chocolate can all last for two years. Milk chocolate lasts for one year.

Belgian chocolate and chocolate truffles (or similar candy) are the only chocolates that do better in the fridge. Belgian chocolate can last as long as four weeks past the best-by date on the label when stored in the fridge (versus two weeks at room temperature) and chocolate truffles can last up to three months in the fridge (versus three weeks at room temperature).