Mammals synthesise lactose as a ready source of energy. Fat and lactose are the principal sources of energy in milk (in cows’ milk, ~50%, ~30%, ~20% of energy comes from fat, lactose and protein, respectively). Lactose is synthesized in mammary epithelial cells within the udder by a two-component enzyme, lactose synthase. Component A is a non-specific galactosyl transferase which transfers galactose from UDP-galactose to a number of acceptors. Component B is the whey protein a-lactalbumin which acts as an enzyme-modifier and makes the transferase highly specific for glucose. The reason for this modification appears to be to enable the precise control of the production of lactose and thus the osmotic strength of milk. There is an approximate inverse relationship between protein and lactose contents of milks from different species.

Milk is isotonic with blood and ~50% of the osmotic pressure of milk is due to lactose. The osmotic pressure of blood is fixed, hence the osmotic pressure of milk is also fixed. On an equal weight basis, monosaccharides have twice the osmotic pressure of disaccharides, hence there is an advantage in having a disaccharide as the principal sugar in milk.

Lactose is the principal carbohydrate in milk. There are numerous other sugars in milk present in very low concentrations, particularly in colostrums. Human milk contains more non-lactose carbohydrates than bovine milk, usually as oligosaccharides. Carbohydrates are present in milk also as parts of glycoproteins and glycolipids.