A study led by Dundee University Professor Mary Renfrew, an expert on the health of mothers and babies, estimated that a relatively small increase in breastfed babies would save the UK health service around £40 million a year.
Health boards that shell out on extra breastfeeding support for mothers quickly see a return on their investment, the figures show.
Charity Unicef UK, which commissioned the research, is now calling for women to be given more help to breastfeed, describing it as a "major public health issue".
In Scotland, the latest figures show just 26.5% of babies are exclusively breastfed at six to eight weeks, despite a Scottish Government target of 32.7%.
The impact of five different health problems, which breastfeeding appears to help prevent, were examined for the research – the first project of its kind in the UK. These were stomach bugs, chest infections and middle ear infections in babies, an infection suffered by premature infants and breast cancer in mothers.
The researchers estimated that if 45% of all babies were exclusively breastfed for four months, and if 75% of babies in neonatal units were breastfed at discharge, there would be 3285 fewer babies hospitalised with gastroenteritis every year.
There would also be 21,045 fewer GP visits for ear infections and 5916 fewer babies hospitalised with respiratory illness. Add in around one-third of all women breastfeeding for 18 months across their lifetime and the NHS UK-wide would save £40m a year, say the authors.