If you toss out food because the date on its package has long passed, you’re not doing yourself any food-safety favors. Expiration dates have little, if anything, to do with whether or not food is safe to eat, some experts say.

“If the food looks or smells bad, certainly throw it away, but just because it reaches a certain date on the package is not a guarantee that the food is unsafe,” says Ted Labuza, a professor of food science and engineering at the University of Minnesota. For more than 50 years, he has studied how food rots, and he’s written 17 books about food.

In fact, many “use-by,” “sell-by” and “best-before” dates don’t have a thing to do with food safety. Instead, they’re indicators for shelving and inventory purposes used by retailers. They’re also—if you can believe it—best guesses by food manufacturers for when the product is at its peak quality, says Dana Gunder, the resident scientist on food waste at the nonprofit Natural Resources Defense Council. The NRDC and the Harvard School Food Law and Policy Clinic released a report Wednesday calling for a labeling standardization that will reduce food waste and lead to better recycling efforts.

Monkey Business Images / Shutterstock.com

Moreover, because there is no federal law regulating them, these expiration dates and labeling laws can vary widely from state to state. In many cases, they’re voluntary and the manufacturers decide what they will be.

“To most people, [the dates] seem like a rational objective system, but it’s really more like the Wild West,” Gunder says. “[Consumers] may in fact be eating food because they trust those dates more than they should.”

The laws vary so much between states that if you buy honey in New Jersey, it could have a “best by July 2, 2016” stamp, but it might not have any information if you bought it in New York, which doesn’t require food manufacturers to carry use-by dates. Indeed, on a recent trip to a popular national food retailer, Gunder says he found a half gallon of milk with a “sell-by” date sitting on a shelf next to quarts of milk with no dates, which were next to a different brand of milk with a “best-by” date.

More than 90% of consumers say they’ve impulsively tossed out what could be perfectly good eats because they believed the date labels were a measure of food safety, according to food-industry pollsters. That’s true even though none of the labels actually note that the food could be in a precarious state.

As a result, the NRDC estimates, some $900 million is wasted on food each year. That’s based on 2001 figures, the organization says, adding that today’s numbers would likely be even higher. The NRDC also says that such a shoddy labeling system is directly linked to an estimated 160 billion pounds of food trashed in the U.S. every year, “making food waste the single largest contributor of solid waste in the nation’s landfills.”

Also see: Why 40% of food in the U.S. is thrown away

That doesn’t even touch on the wasted recycling efforts, Gunder notes. “You won’t find consumers emptying their yogurt containers and putting the yogurt in a compost and the container in recycling,” she says.

What you need to know about food safety and expiration dates:

Sell-by” dates are used for stocking purposes, so a retailer knows when to replace products with those that will have longer shelf lives in your home.

“Use-by” and “best-by” dates are when manufacturers think the product has peaked in quality. Many manufacturers don’t even use lab testing to make the determination, but instead rely on consumer taste tests and what their competitors are using, Labuza says.

The foods most likely to rot are high-moisture foods, such as milk, cheese, meats, poultry, vegetables, fruits and nuts, Labuza says. Canned foods are the “safest” and can last for as many as seven years—some even longer.

If a can is dented, however, there could be bacteria inside. As a general rule, stay away from a can that is dented at the top or bottom because they are a can’s weakest points, where air could seep in. If a can is bulging or looks bloated, that could mean bacteria has made its way in and is producing gases that are pushing the can out. Rust on the outside of a dent is almost always an indication that air has wiggled its way in and is probably rusting the inside of the can as well.

In general, the temperature at which food is stored is more important than a date on a package, says Labuza, who claims he can keep steak in his refrigerator for 14 days and an unopened container of milk for six weeks. Place a thermometer in your refrigerator and keep the space below 40 degrees Fahrenheit. He keeps his at 34 degrees. And always defrost food in the refrigerator to ensure it doesn’t go bad. “One hour on the kitchen table can equal one day in the refrigerator,” he says.