You’ve seen the best-before date. To determine if ground beef is still safe to eat, here’s what else you need to know.

When it comes to ground beef, many home cooks want to know: How long is it good for?

Ground beef is a highly perishable product and, as such, it should be kept in the fridge. Refrigerated, raw ground beef will last for 1-2 days, and cooked ground beef for 3-4 days.

For longer storage, ground beef can be transferred to freezer bags and frozen. Freezing halts bacterial activity, so, according to the USDA, frozen ground beef stays safe to eat forever. However, the meat tastes best when used within 4 months, after which it starts to dry out and lose its appeal.

Ground beef, whether raw or cooked, should never be left to sit out at room temperature for more than 1-2 hours. Otherwise, harmful bacteria can grow to dangerous levels that can cause food poisoning.

On sultry summer’s days, when the outside temperature is 90°F (32°C) and above, that time is reduced to maximum 1 hour.

If you left ground beef on the countertop for more than a couple of hours, or kept it in the fridge a little too long, err on the side of caution and throw it away. Cooking or reheating it won’t make it any more safe to eat.

What Makes Ground Beef Highly Perishable

When we say that ground beef is a highly perishable food product, we’re referring to the fact that it spoils fast and gets contaminated by bacteria quickly.

Bacteria are responsible for much of the hazards of eating outdated or mishandled ground beef. Two types of bacteria thrive on meat: spoilage bacteria, which give it a mushy feel, an off odor, and a disgusting taste, and pathogenic bacteria, which can cause food poisoning.

Our senses can’t detect pathogenic bacteria. In other words, contaminated food can smell and taste perfectly fine, without obvious signs of spoilage.

Give bacteria protein, warmth, and moisture—conditions well present in ground beef—and they won’t take long to grow to dangerous levels in your food.

At room temperature, one bacterial cell divides in two roughly every 20 minutes. Within a few hours, a small population of bacteria on the ground beef can grow so big, it is virtually guaranteed to cause food-borne illness.

As a rule of thumb, there are two ways to contract food-borne illness: through infection and through intoxication.

If you eat ground beef that hasn’t been cooked thoroughly, to the minimum internal temperature for safe consumption, you can get infected from the living bacteria inside it. If you eat ground beef that’s sat out or has been refrigerated for too long, you can get intoxicated from the toxins that they left behind.

Although cooking or reheating ground beef will kill the majority of pathogenic bacteria inside it, it won’t get rid of the toxins left over from them. Simply put, if you suspect that a package of ground beef is no longer safe to eat, throw it away.

Buying, Storing, Handling, and Cooking Ground Beef Safely

At the grocery store, buy ground beef with the farthest best-before date on the package. If you like to take your time when shopping, don’t put raw meat products, refrigerated or frozen, in the cart until just before checkout. Keeping groceries in the trunk of your car for too long can also be counterproductive.

At home, unpack ground beef—and any other meats—first and refrigerate them promptly. The bottom shelf of the refrigerator is the best place to store meat for two reasons: First, cold air has a tendency to sink to the bottom, so it is coldest there. Second, storing meat products on the lowest shelf prevents them from accidentally dripping onto the rest of the food in the refrigerator.

Don’t leave ground beef out at room temperature for more than 1-2 hours. Whether you’re thawing meat, bringing it to room temperature, or keeping leftovers on the table, leaving it out for more than a couple of hours is asking for trouble. Thaw raw foods in the fridge and reheat cooked foods in the oven or microwave. Cool leftovers down promptly and refrigerate or freeze them.

Wash your hands, spatula, and cutting board after handling raw meat. Bacteria can easily get transferred from ground beef to your hands, utensils, and working surfaces. Kitchen hygiene, therefore, is key to preventing cross-contamination. So wash up and clean up with warm, soapy water after handling raw meat.

Cook ground beef thoroughly. Ground beef should be heated to an internal temperature of at least 160°F (71.1°C) for safe consumption. A single piece of meat can contaminate an entire batch of ground beef at the meat plant—cook your burgers, sausages and ground beef for chili, burritos, or tacos thoroughly.