That date on the carton of milk could mean very different things depending on what US state you are in. Some states require a sell by date, which indicates the last day a store can legally sell the milk. It is calculated to give the consumer a reasonable amount of time to enjoy. Other states have a use by date that indicates the date milk is believed to be at peak flavor. For instance, milk cartons in Montana are labeled with a sell by date 12 days after pasteurization, Washington requires a use by date that is 21 days after pasteurization.
While the pasteurization of milk kills most of the harmful
bacteria, precautions always need to be made by the consumer to
keep the milk from going bad. One way to keep milk as fresh as
possible is to keep it on a shelf, never in the door of your
fridge, where temperature fluctuates the most.
Depending on whom you ask, the refrigerator temperature should be
34-38 °F or 38-40 °F. Warmer temperatures give bacteria more of a
chance to develop.
One rule of thumb is that if you are properly refrigerating it,
whole milk's expiration date is five days after the "sell-by"
date. If it is non-fat, skim, or reduced fat, you will have a bit
less time. Ultra pasteurized milk has a longer shelf life than
other types of milk and can be left in the pantry until opened,
and then it must be chilled.