To examine the association between gestational age at birth and hospital admissions to age 10 years and how admission rates change throughout childhood.Population based, record linkage, cohort study in England.NHS hospitals in England, United Kingdom.1 018 136 live, singleton births in NHS hospitals in England between January 2005 and December 2006.Primary outcome was all inpatient hospital admissions from birth to age 10, death, or study end (March 2015); secondary outcome was the main cause of admission, which was defined as the World Health Organization's first international classification of diseases, version 10 (ICD-10) code within each hospital admission record.1 315 338 admissions occurred between 1 January 2005 and 31 March 2015, and 831 729 (63%) were emergency admissions. 525 039 (52%) of 1 018 136 children were admitted to hospital at least once during the study period. Hospital admissions during childhood were strongly associated with gestational age at birth (<28, 28-29, 30-31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, and 42 weeks). In comparison with children born at full term (40 weeks' gestation), those born extremely preterm (<28 weeks) had the highest rate of hospital admission throughout childhood (adjusted rate ratio 4.92, 95% confidence interval 4.58 to 5.30). Even children born at 38 weeks had a higher rate of hospital admission throughout childhood (1.19, 1.16 to 1.22). The association between gestational age and hospital admission decreased with increasing age (interaction P<0.001). Children born earlier than 28 weeks had an adjusted rate ratio of 6.34 (95% confidence interval 5.80 to 6.85) at age less than 1 year, declining to 3.28 (2.82 to 3.82) at ages 7-10, in comparison with those born full term; whereas in children born at 38 weeks, the adjusted rate ratios were 1.29 (1.27 to 1.31) and 1.16 (1.13 to 1.19), during infancy and ages 7-10, respectively. Infection was the main cause of excess hospital admissions at all ages, but particularly during infancy. Respiratory and gastrointestinal conditions also accounted for a large proportion of admissions during the first two years of life.The association between gestational age and hospital admission rates decreased with age, but an excess risk remained throughout childhood, even among children born at 38 and 39 weeks of gestation. Strategies aimed at the prevention and management of childhood infections should target children born preterm and those born a few weeks early.