Talk:Food/@comment-24832600-20160509190547

I did a bit of number crunching regarding the shelf life of cookable foods and came up with the following formula to determine how long a food item will last before it spoils, relative to when it has been cooked (s yntax in MS Excel) :

MIN(X;Y)+Z*IF(X/Y>=1;0;1-X/Y/2)

where X = time elapsed between a food item is spawned and cooked; Y = time for the food item to spoil when raw; Z =  time for the food item to spoil when cooked

Using the above formula, I found out that  to ensure the longest shelf life, Monster Meat should be cooked as soon as possible, everything else should be cooked as late as possible, and for fish it does not matter when it is cooked (as long as it is cooked before it spoils). I tested only for cookable food items available in the base game.

The general conclusion is that if a food item takes less than twice as long to spoil when cooked than when it is raw, it should be cooked as late as possible, and vice versa. If it takes exactly twice as long, then it does not matter when it is cooked.