Americans dump 33 million tons of food into landfills each year. One reason so much food goes to waste: Many people mistakenly believe that they should adhere closely to expiration dates on food packaging. As a result, a typical family in the U.S. throws out 14 to 25 percent of the food they buy.

In fact, although use-by dates, sell-by dates and best-by dates seem to refer to when a food is likely to go bad, they actually have nothing to do with safety. Most dates are generated by food manufacturers, largely to indicate how long a food is likely to still taste its best or be at peak quality.

In some cases you can use expiration dates to decide whether to buy a particular item (or  toss it out if it’s been sitting around in your kitchen).

Here’s what you need to know about each type of expiration date and how each relates to food safety.

Related: Food Safety Fails

Use-by date

A use-by date indicates the last day a product is likely to be at peak quality — not when it’s expected to go bad. Even so, it can be useful to consider a use-by date when you’re food shopping or cleaning out the fridge. Since foods can grow bacteria even while refrigerated, it’s a good idea to pass them by in the store or toss them once the use-by date has passed.

If you frequently find yourself dumping untouched food because you’ve allowed the use-by date to fly by, consider buying less at a time. Alternatively, freeze anything that you doubt will make it to the table by its use-by date.

Note that according to the Department of Agriculture (USDA), “federal regulations require a "use-by" date on the product label of infant formula under FDA inspection.” Do not purchase or use baby formula after the use-by date.

Sell-by date

Sell-by dates are meant to inform stores, not consumers. A sell-by date indicates when the manufacturer of an item recommends clearing off the shelf, not the last day that it’s safe to use.

It’s legal for stores to sell items past the sell by date, but here’s what you should know: In general, fresh food is safe up to and past the sell-by date, but for how long depends on the item. Fresh chicken should be used within a day or two of purchase, regardless of the sell-by date, for example. Eggs, on the other hand, are fine for three to five weeks past the sell-by date.

Related: How to Tell if an Egg is Bad

Best-by date

Best-by dates typically are reserved for jarred or canned foods. They indicate how long the manufacturer expects an item to retain peak quality.

Although the USDA considers most canned food to be safe indefinitely, it does recommend consuming high-acid foods like canned tomatoes within 12 to 18 months of purchase and low-acid foods (meat, beans) within two to five years.

The exception: cans that are badly dented or any canned or jarred food that’s exposed to temperatures over 90 degrees F. Toss such items (and keep canned and jarred goods in cool dark cupboards or a pantry).

Bargain or bust?

Supermarkets often mark down certain items that are at or near their sell-by date. You can get some great deals that way as long as you shop smart.

It’s fine to buy any fresh food that’s at or even past the sell-by date provided you’ll use it quickly and the package hasn’t been torn or opened.

Canned foods that have lapsed best by dates are fine to toss into your shopping cart. Pass on any that are dented, but don’t worry if only the label is torn or damaged.

Foods that have reached their use-by dates are fine if you plan to use or freeze them the same day.

Related: How to Thaw Meat

Beyond expiration dates

Don’t rely only on use-by, sell-by or best-by dates when food shopping. Trust your gut too. If a food smells bad or looks bad, it’s not worth the risk to buy or eat it.

Keep in mind, though, that virtually all food has some surface bacteria that will produce a bit of an off-odor as they die. If you’re sizing up fresh chicken that reached its sell by date two days ago and doesn’t smell totally fresh — which is different from stinking — remember that cooking it all the way through to an internal temperature of 165 degrees F takes care of any pathogens. On the other hand, if you find an open package of smelly, discolored ham in the back of the fridge, it belongs in the garbage and not on a sandwich.

Paul Hope, a trained chef and DIY enthusiast, has restored two houses and writes about food and homes.