Shelf life

How long is milk good after the date on the carton?

It depends less on the date than on two things: what kind of milk it is, and whether you've opened it.

Reviewed

SHORT ANSWER

The date on a milk carton is set by the dairy and is usually a sell-by or best-by date, not a safety cutoff. Regular pasteurized milk that has stayed at 40°F (4°C) or below is often still fine for a few days past it. Once opened, plan to finish it within about a week; Ask USDA puts refrigerated milk at seven days.

Ultra-pasteurized milk keeps 1–3 months unopened and 7–10 days after opening. Shelf-stable boxed milk keeps 6–12 months in the pantry until you open it. If milk smells sour or has turned lumpy, pour it out.

Storage Facts

Milk, stored at 40°F (4°C) or below

Pasteurized milk, in the fridge
Package use-by date
Freezer, counted from purchase
3 months
Ultra-pasteurized, unopened
1–3 months
Ultra-pasteurized, after opening
7–10 days
Shelf-stable (UHT), pantry from purchase
6–12 months
Shelf-stable, fridge after opening
5–7 days
Lactose-free, fridge after opening
1 week
Buttermilk, fridge from purchase
1–2 weeks
“From purchase” counts from the day you bought it; “after opening” from the day you opened it. Source: USDA FoodKeeper data. FoodKeeper gives no separate opened time for regular milk; Ask USDA says milk keeps about 7 days refrigerated.

What the date on the carton means

No federal rule requires a date on milk. Except for infant formula, USDA says, product dating isn't required by federal regulation, so the dairy picks both the date and the wording. Some states do set rules for milk dating, and they vary a lot; a 2013 Harvard Law School and NRDC survey of state laws documented the patchwork. In practice you'll see stamps like these:

SELL BY OCT 04BEST BY 10/04/26USE BY OCT 04 202610/04 P24-17

A sell-by date tells the store how long to keep the carton on display. USDA calls it “not a safety date.” A best-by or use-by date on milk is the dairy's estimate of peak quality. Extra characters printed beside the date, like P24-17 above, are typically a production code such as a plant or batch number, not a second date. More on the difference: what “sell by” means.

What the date can't know is how the milk was treated after it left the dairy. A carton that rode home in a hot car or sat on the counter through breakfast every day will turn before its date. One that went straight into a cold fridge can outlast it.

Why three kinds of milk keep so differently

Heat treatment definitions from 21 CFR 131.3. Storage times from USDA FoodKeeper data.
TypeHow it's madeUnopenedAfter opening
Pasteurized (most jugs and cartons)Heated enough to kill harmful bacteria, then kept coldFollow the package dateAbout 1 week (Ask USDA)
Ultra-pasteurizedHeated to at least 280°F (138°C) for at least 2 seconds; still sold refrigerated1–3 months in the fridge7–10 days
Shelf-stable (UHT, aseptic)Sterilized and sealed in a sterile carton, so it keeps without refrigeration6–12 months in the pantry5–7 days in the fridge

The pattern to remember: the heat treatment buys time only while the package is sealed. Once you open any of them, air and your pour spout let bacteria in, and the clock drops to roughly a week. If a carton's date looks weeks away, look for the words “ultra-pasteurized” or “UHT” on the label; that's usually why.

How to tell milk has gone bad

  • Smell. A sour or off smell is usually the first sign.
  • Texture. Lumps, a thick or slimy pour, or curds when you stir it into hot coffee mean it has turned.
  • Color. A yellowish tint or separation that doesn't mix back in.
  • Time out of the fridge. Milk left out more than 2 hours (1 hour above 90°F) should be discarded whatever it smells like. FDA advises keeping the fridge at 40°F or below.

Don't taste milk to check it. If you're unsure, throw it out.

Two gallons in the fridge? Scan the date on each when you put them away. FreshScan reads the sell-by or best-by date, skips the plant code, and reminds you two days before so the older carton gets used first.

Free on theApp Store

Freezing milk

FoodKeeper gives regular milk 3 months in the freezer for best quality, counted from purchase. NDSU Extension notes that pasteurized homogenized milk, including low-fat and nonfat, can be frozen, but the quality may drop after thawing; shaking or stirring helps it smooth out again.

  • Freeze it before the date, not after it has started to turn. Freezing doesn't improve milk that's already off.
  • Pour a little out first. Milk expands as it freezes and can split a full jug.
  • Thaw it in the fridge, shake it well, and use it within a few days. Thawed milk works best in cooking, baking and smoothies.
  • FoodKeeper lists lactose-free milk as not recommended for freezing.

For the rest of the dairy case, see how long yogurt keeps and the full shelf life chart, or count out a date with the food expiration calculator.

Questions people ask

Can I drink milk 5 days after the sell-by date?

Often, yes, if it has been kept at 40°F or below the whole time and it still smells and pours normally. The sell-by date is for the store, and USDA does not publish a fixed number of days past it. Once a carton is open, plan to finish it within about a week. If it smells sour or has lumps, pour it out, and don't taste it to decide.

Why does ultra-pasteurized milk last so much longer?

Federal rules define it as milk heated to at least 280°F for at least 2 seconds, much hotter than regular pasteurization, which gives it an extended shelf life under refrigeration. FoodKeeper gives it 1 to 3 months in the fridge unopened. Once you open it, bacteria from the air get in and it keeps 7 to 10 days, not much longer than regular milk.

Does shelf-stable milk need to be refrigerated?

Not until you open it. Aseptically packaged (UHT) milk is commercially sterile and sealed, so FoodKeeper gives 6 to 12 months in the pantry from purchase. After opening, refrigerate it and use it within 5 to 7 days.

Is it safe to drink milk that was left out overnight?

No. USDA's rule for perishable food is no more than 2 hours at room temperature, or 1 hour above 90°F. Milk left out overnight should be thrown away even if it smells fine.

Sources

  1. FSIS FoodKeeper Data — USDA Food Safety and Inspection Service (data.gov, public domain)
  2. How long can you keep dairy products like yogurt, milk, and cheese in the refrigerator? — Ask USDA (USDA Food Safety and Inspection Service)
  3. Food Product Dating — USDA Food Safety and Inspection Service
  4. 21 CFR 131.3: Milk and cream definitions (pasteurized, ultra-pasteurized, aseptic processing) — Legal Information Institute, Cornell Law School
  5. Tips to Reduce Food Waste — U.S. Food and Drug Administration
  6. The Dating Game: How Confusing Food Date Labels Lead to Food Waste in America — Harvard Food Law and Policy Clinic and NRDC (2013)
  7. Food Freezing Basics: Freezing Dairy Products, Eggs and Other Foods — NDSU Extension
FRESHSCAN FOR IPHONE

Know which carton to open first.

Scan the date on each carton when you unpack groceries. FreshScan puts the one that's closest to its date under Use today or Next 3 days, and reminds you at 9:00 AM two days before.

  • Reads best by, use by, sell by and EXP dates, and skips packed-on dates
  • Reminders at 9:00 AM, 2 days before and on the day
  • Free for up to 10 items at a time
Download on theApp Store