ObjectiveTo investigate the prevalence of seizures/febrile seizures in children up to 3 years of age and examine the effects of gestational age at birth on the risk for febrile seizures.DesignRetrospective longitudinal population-based cohort study.SettingKobe City public health center, Kobe, Japan, from 2010 to 2018.ParticipantsChildren who underwent a medical check-up at 3 years of age.MethodsInformation regarding seizures was collected from the parents of 96 014 children. We identified the occurrence of seizure/febrile seizure in 74 017 children, whose gestational ages at birth were noted. We conducted a multivariate analysis with the parameter, gestational age at birth, to analyse the risk of seizure. We also stratified the samples by sex and birth weight (<2500 g or not) and compared the prevalence of seizure between those with the term and late preterm births.ResultsThe prevalence of seizure was 12.1% (11.8%–12.3%), 13.2% (12.2%–14.4%), 14.6% (12.4%–17.7%) and 15.7% (10.5%–22.8%) in children born at 37–41, 34–36, 28–33 and 22–27 gestational weeks, respectively. The prevalence of febrile seizures was 9.0% (8.8%–9.2%), 10.5% (9.5%–11.5%), 11.8% (9.7%–14.5%) and 11.2% (6.9%–17.7%) in children born at 37–41, 34–36, 28–33 and 22–27 gestational weeks, respectively. Male was an independent risk factor for seizures (OR: 1.15, 95% CI 1.09 to 1.20; absolute risk increase 0.014, 95% CI 0.010 to 0.019) and febrile seizures (OR: 1.21, 95% CI 1.15 to 1.28; absolute risk increase 0.016, 95% CI 0.012 to 0.020), respectively. Late preterm birth was not associated with an increased risk of seizure/febrile seizure.ConclusionsAlthough very preterm birth may increase the risk of seizure/febrile seizure, the risk associated with late preterm birth is considerably small and less than that associated with male.