As soon as this year’s Thanksgiving Day spread hits the dinner table, an invisible clock begins to count down how long the food can remain safe to eat. Most experts give leftover turkey, stuffing, mashed potatoes and pie just a few days in the refrigerator before you’d risk discomfort and illness by consuming them.

In the freezer, some Thanksgiving dishes can be kept for one to two months, according to federal food safety agencies, such as the U.S. Food and Drug Administration and the Department of Agriculture. But there are specific guidelines for when to start storing food and in what kinds of containers.

Turkey, stuffing, gravy and other heated side dishes should be refrigerated within two hours of serving, according to Still Tasty, the online shelf-life guide. As long as the food items are not scalding hot, it's OK to place food that is still warm into the refrigerator.

Turkey, in particular, should be carved off the bones and cut into small pieces before storage. It should also be kept in a container separate from the stuffing and other side dishes, according to the guide.

William Stallings, a clinical dietitian at Temple University Hospital in Philadelphia, has advised the public to use his "2-2-4" formula. That is, refrigerate or freeze the food two hours after service, store the food in 2-inch deep-airtight containers, and eat the leftovers within four days, according to WebMD.

If Thanksgiving dishes have been sitting out for longer than two hours, they should be tossed out, Stallings said. Again, food never has to come to room temperature before it is stored.

When reheating leftovers, make sure the food reaches a temperature of 165 degrees Fahrenheit, according to the Food Network. Use a food thermometer to ensure optimal temperature.

Sauces, soups and gravies should be reheated to a full boil on the stovetop. But if using a microwave oven, cover the food and rotate it frequently to ensure it heats all the way through, the Food Network advises.