It all depends on the product and the amount of synthetics and preservatives used in it. The less synthetics and preservatives used the shorter the shelf life. Some products can have shelf lives as short as 6 months. Most products that use organic or mostly natural ingredients and have a short shelf life will normally mention that on the packaging.
The good news is that if you are treating your hair as you should (and you aren’t a product junkie) you will be needing to replenish your stock every couple of months.