How do food producers determine expiration dates on products and ingredients?
To determine the shelf life of products, there is usually a microbial activity test conducted over a specific time frame. For instance, in baked goods with an expected shelf life of 7 days, you would send 4 or 5 of the product to a lab. They would use one to measure the initial microbial activity, then perhaps 2 days later, they would measure another one, etc. Generally companies have an acceptable threshold of microbial activity, so the shelf life is set by how many days it takes the product to reach that level.