You’ve probably heard the joke (or seen the Seinfeld episode) about sour cream: It’s already sour, so how do you know when it goes bad?

You might ask the same about yogurt, which has bacteria in it from the get-go. (Many yogurts are made with beneficial “active cultures,” which produce acids that turn fresh milk sour during the fermentation process and give yogurt its tang.)

So what harm could a few more bacteria cause?

Related: 5 Tasty Ways to Eat More Yogurt

The problem is that beneficial bacteria may not be the only microscopic organisms in your yogurt. Plenty of other germs can flourish in milk and prove harmful if they slip into the fermentation process and then replicate in the carton in the back of your fridge.

Yogurt, like other foods, needs to be kept at 40 degrees F or below to prevent bacterial growth, according to a Food and Drug Administration (FDA) guide to food safety. It explains that “every hour that a food remains above 40 degrees F increases the risk of food-borne illness.” Bacteria can divide two to three times per hour at room temperature, so it’s important not to leave it out too long. The guide recommends yogurt not be kept outside the fridge more than an hour.

So how long will it last inside the fridge?

Related: Spoiler Alert: The Best Way to Organize Your Refrigerator

The short answer is that refrigerated yogurt is safe to eat up to 14 days after the expiration date, according to the FDA and the food processing giant General Mills. (Expiration dates indicate the point at which a food may start to lose quality — they have nothing to do with when the food will “go bad.”)

But it’s important to eyeball your expired yogurt and do a sniff test before digging in. Sometimes yeasts and molds present in yogurt with fruit may cause the yogurt to go bad, according to a book on the microbiology of fermented foods.

In the fall of 2013, the yogurt manufacturer Chobani announced a national recall after finding a fungus in some of its Greek yogurt that gave the yogurt a moldy smell and taste and sickened more than 200 people. The fungus was first thought to be harmless to everyone but people with compromised immune systems, but further investigation showed it was capable of making healthy people sick, according to the American Society of Microbiology.

Even perfectly good yogurt may taste increasingly sour because the live cultures continue to produce lactic acid.

To toss or not to toss?

Containers of expired yogurt are among the billions of pounds of food unnecessarily thrown out because home cooks are not sure of the quality or safety of the item, according to Chris Bernstein, deputy director of food safety education at the Food Safety Inspection Service of the United States Department of Agriculture (USDA).

If it smells and tastes fine, and it’s only a week or two past the expiration date, feel free to dig in and enjoy. If it looks or smells suspicious, throw it out.

Related: Use-By, Sell-By, Best-By: Deciphering Food Expiration Dates

Ana Manley-Black, J.D., is a former immigration attorney and a freelance health and medical writer whose stories have appeared in Healthday, Consumer Health Interactive, and other media.