White flour lasts 6 to 8 months once opened, as does whole wheat flour. The shelf life of flour is determined by its storage conditions, and it can last longer when kept in a sealed container in a cool, dry place.
Flour can be kept in the freezer in a sealed container to extend its shelf life to 1 year. Flour that is frozen will still be safe to eat after a year, but its quality and flavor may deteriorate after that time. Whole wheat flour contains oils that can go rancid, so it is best kept refrigerated or frozen.