How long does it take for milk to spoil?

In this brief guide, we will answer ‘how long does it take for milk to spoil?’ Also, we will see what changes occur in milk, the factors responsible for the changes and how to get a better shelf life.

How long does it take for milk to spoil?

Heat treatment is the most widely used processing technology in the dairy industry. Its main purpose is to destroy microorganisms, both pathogenic and spoilage, to ensure the milk is safe and has a reasonable shelf-life (1). The common heat treatments used in the dairy industry are pasteurization and sterilization under Ultra high temperature (UHT). UHT milk is heated to 138 to 150 °C for 1 or 2 s, after which it is packed in sterile containers. This results in an ambient stable product that, unless opened, has a shelf life from 6 months to 1 year. This is in contrast to pasteurized milk, which is heated to 72 °C for 15 s. Pasteurized milk is not sterile and therefore needs to be stored at <4.4°C at all times and has a shelf life of approximately 2 weeks (2).

Milk has higher moisture content and all foods that have a higher moisture level are highly perishable. Therefore, pasteurized milk can not stay out of the refrigerator or cooler for more than two hours. In the case of summer or when the temperature has reached 90 degrees F or 32 degrees C, milk will only last for an hour. After this time bacteria may start to grow. UHT milk can stay unopened at room temperature up to a year (2).

How long does milk last in the fridge?

Most dairy products have a shelf life of 1 – 4 weeks if it is properly refrigerated. If left out at room temperature for two hours or longer, it is recommended to discard it, Although pasteurization kills much of the bacteria in milk, any remaining bacteria can grow quickly in milk at room temperature or warmer (3). Once opened all types of milk will last up to 4 – 7 days till significant changes in quality while unopened milk may last longer depending on the type of milk. Lactose-free milk undergoes pasteurization and the addition of an enzyme lactase, which breaks down the milk sugar lactose, so it generally lasts longer than regular milk, about 7 days after the sell-by date once it is opened (3).


What are the possible reasons for changes in quality?

As mentioned before, milk is a highly perishable commodity and if not properly stored it may lead to spoiled milk quickly. Milk has carbohydrates, fats, casein, lactalbumin, and free amino acids that provide a good nutrient source for microorganisms (4). The possible reasons for changes in quality after opening can be;


Milk like any other commodity needs proper and consistent storage temperature, if not provided the milk may deteriorate more rapidly. That’s why it is suggested to store your milk in the fridge once it is opened. It needs to be stored below 40 degrees F or 4 degrees C.


If milk is left out for a longer duration without properly sealing the containers, the fats in milk are exposed to oxygen which makes it susceptible to oxidation making the milk fats to go rancid. Oxidation is a sequence of complex reactions that cleave fat molecules of the milk, but they could occur also with proteins (5). Therefore, it is advised to properly seal your containers.


If milk is left exposed to light, particularly sunlight, it may not only change the temperature but also the milk fats are exposed to photo-oxidation. The cleavage of fatty acids from the triglyceride molecule of fat milk leads to the development of rancid off-flavors. This can be accelerated through enzymes found in the milk or my light induction. Photo-oxidation of milk occurs under the presence of light

 (5). This will not only change the taste but the bacterial count may also go up.

Exposure to air

When the milk containers are exposed to air and quite continuously, air facilitates the growth of lactobacillus bacteria. These bacteria break down the lactose (milk sugar) into lactic acid resulting in sour-tasting milk.

How to properly store milk?

Microorganisms cause different undesirable organoleptic and physical changes in milk. Refrigeration of raw milk prevents growth of most mesophilic microorganisms (able to grow above 20 °C), while psychrotrophic microorganisms (grow better from 0 °C to 15 °C) are able to grow, although present in low numbers. Extended storage time will allow their growth and cause sensorial changes in the milk (4). 

Tips to keep your milk fresh for longer;

  • Pick your milk last at the grocery store and refrigerate immediately after you get home. This will minimize temp difference quite drastically. Choose a carton with the latest sell-by or use-by date (indicating it is the freshest) (3).
  • Milk should be stored in the fridge at 40 degrees F or 4 degrees C or below. Storing milk at this temperature extends over all shelf-life and maximizes flavor.
  • Store milk in the coldest part of your fridge in the main body, not in the door, as this zone experiences the most rapid temperature differences and is exposed to outside air every time you open the door.
  • Milk is pasteurized to kill the bacteria that may lead to extensive quality loss. Therefore, even pasteurized milk needs to be stored in the fridge for extended shelf-life.
  • Always store the milk in airtight containers or tightly seal your containers to keep the milk from oxygen exposure and prevent the absorption of other food items like garlic or onions.
  • It is recommended to add a teaspoon of baking soda or a pinch of salt to your milk once opened. This neutralizes the lactic acid content and keeps the milk fresh for a week more even after its expiration date. However, this may alter the flavor profile of your milk.
  • Never mix leftover milk with the milk already in the container; it compromises the quality of the whole carton.
  • You may freeze your milk for prolonging its shelf-life for more than four months. However, once thawed you will end up with fatty chunks and watery parts. This may be unpleasant to drink but you can use it for cooking or making smoothies.

What are the signs of spoiled milk?

During milk pasteurization, not all bacteria are killed. Sources of the initial microflora in raw milk include the interior of the udder, udder surfaces, milking equipment, transport lines, storage tank, environment (such as air and water), and workers. Raw milk may also be contaminated from the animal manure and flies (4). Following are a few signs that indicate spoilage, remember appearance, smell and taste are the first givers of spoilage;

  • Discolouration – off-white or yellowish tinge. Blueish, brown and red colors can also occur.
  • Thick, lumpy texture, ropiness (sliminess), increase in viscosity 
  • Sour smell or other off-flavors, such as sour or acid flavor, bitter, burn or caramel flavor, barny, soapiness, fruity, fishiness, putrefaction, alcoholic and coconut-like flavor.
  • Gas formation in the bottle, which can be identified with an increase in pressure or volume inside the milk bottle (3).

Other FAQs about Milk that you may be interested in.

Does sweetened condensed milk go bad? 


In this brief guide, we answered ‘how long does it take for milk to spoil?’ Also, we saw the changes that occur in milk, factors responsible for the changes and how to get a better shelf life.

Hopefully, you found this guide helpful. In case of any other queries or comments, please do let us know.


  1. Bezie, Assefa. The effect of different heat treatment on the nutritional value of milk and milk products and shelf-life of milk products. A Review. J. Dairy Vet. Sci, 2019, 11, 555822.
  2. Liem, D. G., et al. Influence of labeling on Australian and Chinese consumers’ liking of milk with short (pasteurized) and long (UHT) shelf life. J dairy sci, 2016, 99, 1747-1754.
  3. Milk. The Nutrition Source. School of Public Health, Harvard. 2022.
  4. Erkmen, Osman, and T. Faruk Bozoglu. Spoilage of Milk and Milk Products. Food Microbiology, Principles into Practice. John Wiley & Sons, 2016, 307-336  
  5. Johnson, D. S., et al. Packaging modifications for protecting flavor of extended-shelf-life milk from light. J Dairy Sci, 2015, 98, 2205-2214.

Hi, I am Charlotte, I love cooking and in my previous life, I was a chef. I bring some of my experience to the recipes on this hub and answer your food questions.