Although breastfeeding is recommended as the optimal form of nutrition in the first six months, it is not sustained as the predominant mode of feeding infants in Scotland. This study estimated the impact of infant feeding choices on primary and secondary healthcare service costs in a 13-year birth cohort. Using linked administrative datasets, in a retrospective cohort design of 502,948 singletons born in Scotland between 1997 and 2009, we estimated the cost of GP consultations and hospital admissions by area deprivation and mode of infant feeding up to 6-8 weeks for ten common childhood conditions from birth to 27 months. Additionally, we calculated the potential healthcare savings if all infants in the cohort had been exclusively breastfed at 6-8 weeks. Discounting of 1.5% was applied following current health economic conventions and 2009/10 used as the base year. Over the study period, the estimated cost of hospital admissions in the cohort was £111 million and £2 million for the 2% subset of the cohort with primary care records. Within each quintile of deprivation, exclusively breastfed infants used fewer healthcare services and incurred lower costs compared to infants fed (any) formula milk. At least £10 million of healthcare costs may have been avoided if formula-fed infants had been exclusively breastfed within the first 6-8 weeks of birth. This study using a representative birth cohort demonstrates how breastmilk can promote equitable child health by reducing childhood illness and healthcare utilisation in the early years.