Twin pregnancies account for 3% of live births but experience substantially more perinatal morbidity and mortality than singleton pregnancies. Optimizing the timing of birth is a key strategy in improving twin pregnancy outcomes. Current UK and US policies are based on observational studies of perinatal mortality and not on longer-term effects. The association of timing of birth with long-term childhood outcomes among twins is uncertain. To identify the optimal gestation week for birth of twin infants by calculating the week of birth associated with the lowest risk of short-term and long-term adverse outcomes (perinatal mortality and special educational need [SEN] at school). This population-based, data-linkage cohort study included 43 133 twin infants born at a gestational age of 34 weeks onward between January 1, 1980, and December 31, 2015, in Scotland. The data were analyzed from June 1, 2017, to March 1, 2019. Gestational age (in weeks) at the time of birth. The primary outcomes were extended perinatal mortality and a record of SEN (≥1 of intellectual disabilities, dyslexia, physical or motor impairment, language or speech disorder, autistic spectrum disorder, and social, emotional, or behavioral difficulties) at school (children aged 4-18 years). To infer the consequence of the gestational age at birth, clinical outcomes of twin infants born at each week of gestation from 34 weeks onward were compared with those of twin infants remaining in utero thereafter. Of the total 43 133 twin infants included in the study, 21 696 (50.3%) were females. Although maternity records were available for all infants, 9519 sex-discordant twin children were linked to their educational data, of whom 1069 (13.8%) had a record of SEN. Compared with twins remaining in utero (n = 26 172), birth at any gestational age from 34 to 37 weeks was associated with increased odds of perinatal death (ie, adjusted odds ratio [AOR], 1.99; 95% CI, 1.53-2.69 at 36 weeks [n = 8056]) and increased risk of SEN at school (AOR, 1.39; 95% CI, 1.11-1.74, for birth at 36 weeks compared with 37 weeks). In a competing risk analysis, the risks of stillbirth and neonatal death were balanced at 37 weeks (risk difference, 2.05; 95% CI, 0.8-3.3). The findings of this study suggest that, in the absence of a medical complication, twins should not be routinely delivered before 37 completed weeks of gestation. These findings may help optimize shared decision-making around the timing of twin birth.