Known baselines, then a hold test, then print with a margin. No lab needed.
Baselines (airtight, cool dry storage): cookies 8-10 days, brownies 5-7, dry and travel cakes 7-14, cupcakes and muffins 1-2, Indian sweets 2-4. Those assume fully baked, fully cooled, packed dry.
The hold test - bake a normal batch, pack exactly as you sell, keep samples on your own shelf and taste one daily. Note the day quality drops. Not spoils, drops... texture, aroma, freshness. That's your real shelf life in YOUR climate with YOUR recipe, which matters because Kochi August and Delhi December are different planets.
Then print roughly 70-80% of what you observed. The margin covers the customer who leaves the box in a hot car.
One hard rule that needs no test: anything with fresh cream, custard, cheesecake or cream cheese is a refrigerated 2-3 day product, full stop, label says keep refrigerated. That's safety, not quality, and it's not negotiable in Indian temperatures.
Redo the hold test when a recipe changes meaningfully. Honey and invert sugar stretch life, fresh fruit slashes it.