Whether in a juicy burger, spicy chili con carne, or hearty shepherd’s pie, we all love our ground beef. But do we really know how—and for how long—to store it?

How long does ground beef last?

If you abide by the U.S. Department of Agriculture’s food safety rules for ground beef, which all of us should, the answer will surprise you.

Stored on the lowest shelf of the refrigerator towards the back, where the temperature is the most stable, an unopened package of store-bought ground beef will stay good for 1 to 2 days.

Once you’ve broken the seal on the original package, portion out any chunks of ground beef that you don’t plan to use in freezer bags, then refrigerate (for storage of up to 24 hours) or freeze (for no longer than 4 months).

What about cooked ground beef, then? Are the ground rules—pun unashamedly intended—any different?

Left to cool and transferred to an airtight food storage container, cooked ground beef will stay good for 3-4 days in your fridge and 2-3 months in your freezer.

For the reasons that I’m about to share with you in a section or two, the important thing is not to let that package of ground beef or a cooked meal containing ground beef sit out on the counter for longer than 2 hours.

As a matter of fact, the quicker you refrigerate or freeze it, the better.

How Long Will Frozen Ground Beef Last?

So you bought a few pounds of ground beef on sale?

Here’s how to freeze it so that you don’t have to eat beef enchiladas for breakfast, lunch, and dinner a couple of days in a row.

Portion the ground beef out into meal-sized chunks sealed in freezer bags (so that you can easily thaw each), stick a label on them, write down today’s date, and store for up to 4 months in your freezer.

Unopened in its original packaging or sealed in a zip bag, frozen ground beef will remain safe to eat indefinitely. But the meat’s texture, aroma, and taste will start to degrade after a few months. So it’s best to use it up within 3 to 4 months of freezing.

Notice the word “sealed.”

To keep ground beef from catching funky flavors and odors from the other foods in your fridge or freezer, make sure that no air can get in or out of the bag or container you’ve stored it in.

Resealable freezer bags and airtight storage containers work; tin foil and freezer paper don’t.

There’s a continuous flow of air inside your fridge and freezer. And, just like it keeps the food items that you’ve stored in it chilled, it can also carry odor (and odor imparts flavor) from one food item to another.

In case you’ve wondered, that’s the reason why some foods, like a halved onion or an unsealed package of salmon, can stink up the entire appliance.

Thawing Ground Beef

The best way to thaw ground beef is to move it to the fridge the night before you plan to cook it. This allows the meat to defrost at a safe temperature of under 40°F, which inhibits bacterial growth.

To thaw ground beef quickly, use the defrost setting on your microwave in 2-3 minute intervals—with a preference for shorter intervals as the meat gets closer to being fully thawed—cooking it immediately after.

Many home cooks make the mistake of taking a package of beef out of the freezer and leaving it to sit on the counter for hours on end. The food-safety rule of thumb is not to let the meat stay out of your fridge or freezer for more than 2 hours.

How Long Can Ground Beef Sit Out?

When you’re unpacking your groceries at home, make sure to reach for that package or two of ground beef first and, depending on how long you want to store it, refrigerate or freeze it.

Ground beef shouldn’t be left out at room temperature for longer than 2 hours, according to the USDA. That time is reduced to 1 hour in summer when the temperature outside is 90°F and above.

If we’re in the hot, sultry days of summer and you’re running errands with your car, save the trip to the grocery store or butcher for last. Otherwise, the prolonged exposure to heat can shorten the storage time for the ground beef (and for all other raw meats in your grocery bags).

You’re doing this because bacteria thrive at temperatures of 40°F to 140°F, so leaving a package of ground beef out on the counter for too long will allow the pathogens inside it to grow to levels so high, they could make you sick.

That growth slows down at temperatures of 40°F and lower, which is why we refrigerate perishable foods. On the other hand, temperatures higher than 140°F kill bacteria (hence why we cook food for safe consumption).

How to Tell If Ground Beef Is Bad

Raw ground beef is fresh if the meat is red to pinkish-red on the outside, and the interior is brown to grayish-brown on the inside (Healthline).

That redness comes from a pigment called myoglobin, which forms when the protein on the surface of the meat reacts to the oxygen in the air. The inside of the meat is shielded from contact with the air—and myoglobin can’t form—which is why its color is brown to grayish-brown instead.

When the ground beef turns brown, grayish-brown, or grey on the outside, that’s a tell-tale sign that it has gone bad and that you should throw it away. Mold, in the form of fuzzy blue or green spots, is another sign of spoilage.

You can also tell if ground beef is bad by using your senses. If, when you touch the meat, it’s firm and feels clean to the touch, then it’s good. If it’s sloppy and slimy, in which case it will also have an off smell, then it’s bad.

Better safe than sorry when it comes to food safety. Cooking spoiled meat won’t necessarily make it safe. Yes, it can kill most of the bacteria, but it won’t get rid of all the toxins that they left in it.