Better understanding of the variation in macronutrient content of human donor milk (HDM) potentiates targeted nutrition for preterm babies. The present study describes the relationship of maternal age, parity, monthly lactation stage estimate (LSEm), daily volume of milk expressed (Vd), sex, gestation and birth weight z scores with macronutrient content of HDM. Multilevel mother–infant pair ID random intercept models were performed using the predictor variables above on the outcome HDM macronutrient content determined using mid-IR spectroscopy. Mean macronutrient content was also compared by gestational age and small for gestational age (SGA) (z score < –1·28) or appropriate for gestational age (AGA) (z score ≥ –1·28) categories. A total of 2966 samples of donations from 1175 mother–infant pairs to the UK Northwest Human Milk Bank between 2011 and 2017 were analysed. Mean protein, fat, carbohydrate and calculated energy were 0·89 (SD 0·24) g/dl, 2·99 (SD 0·96) g/dl, 7·09 (SD 0·44) g/dl, and 60·37 (SD 8·41) kcal/dl (252·59 (SD 35·19) kJ/dl), respectively. Preterm SGA HDM was significantly higher in protein, fat and energy content than term AGA HDM and significantly lower in carbohydrate content than term AGA HDM after controlling for LSEm, Vd and between-subject effects. Degree of prematurity did not influence macronutrient content. Between-subject effects accounted for more of the variance in macronutrient content than the fixed effects in the model. Despite this, SGA status, as well as prematurity, may be an important determinant of macronutrient content in human milk. As bioavailability of macronutrients from HDM is uncertain, studies evaluating growth and body composition in preterm and SGA babies fed HDM are warranted.