BackgroundPreterm birth remains a significant burden to families, health systems and societies. The aim was to quantify the incremental prematurity-related public health expenditure in Hungary and to estimate the potential impact of a decrease in the prevalence of prematurity on the public payer’s spending.MethodsOver a 6-year time horizon, public financing data of inpatient, outpatient and pharmaceutical care for children born at ≥ 25 weeks of gestation in 2009/2010 were retrieved from the Hungarian National Health Insurance Fund database. In descriptive analysis, the public payer’s spending was given as cost/capita. The impact of a decrease in prematurity prevalence was specified as the total budget impact. An exchange rate of 294 Hungarian forint/Euro was applied.ResultsA total of 93,124 children (including 8.6% who were premature babies) were included in the analysis. A strong negative relationship was shown between gestational age and per capita cost. The 6-year cost of care for the cohort born at 26 weeks of gestation (28,470 Euro per capita) was 24 times higher than that for the cohort born at 40 weeks. First-year inpatient spending accounted for the largest proportion of total health care spending across all gestational ages. All investigated prematurity complications (retinopathy of prematurity, necrotizing enterocolitis, bronchopulmonary dysplasia, intraventricular cerebral bleeding and leukomalacia) resulted in additional significant incremental spending. If 70% of pregnancies ending with preterm birth could be prolonged by 1 week, the savings would be almost 7.0 million Euros in the first 6 years of life.ConclusionThis comprehensive analysis of prematurity-related health care spending confirmed that premature infants have much higher costs for care than those born at term in Hungary. These quantitative outcomes can provide essential inputs for the cost-effectiveness analysis of medical technologies and public health interventions that can decrease the prevalence of premature birth.Trial registrationNot applicable.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12913-023-09697-w.