Objective To examine the association between gestational age at the time of birth and long-term use and cost of hospital inpatient services. Design Multi-level modelling of the hospital service utilisation and cost profile of each child born in hospital during 1978–1988 in two areas covered by the Oxford Record Linkage Study. Setting Oxfordshire and West Berkshire. Population 117,212 children divided into four subgroups by gestational age at birth: <28 weeks, 28–31 weeks, 32–36 weeks, 37 weeks or greater. Main outcome measures Number and duration of hospital admissions during the first 10 years of life. Costs, expressed in £ sterling and valued at 1998–1999 prices, of hospital inpatient services. Results The cumulative cost of hospital inpatient admissions incurred during the first 10 years of life, including the initial birth admission, averaged £17,819.94 [£22,322.87] for children born at <28 weeks gestation, £17,751.00 [£19,055.53] for children born at 28–31 weeks gestation, £5,376.39 [£7,393.78] for children born at 32–36 weeks gestation, and £1,658.63 [£3,409.14] for children born at 37 weeks gestation or greater. The adjusted number of hospital inpatient admissions, inpatient days and costs, respectively, over the first 10 years of life was 130%, 77% and 443% higher for children born at <28 weeks gestation than for children born at term. Conclusion The adverse sequelae of preterm birth are likely to have considerable long-term economic consequences for the health services and for society as a whole.