Gestational age (GA) is associated with brain growth and development. When the duration of gestation is not optimal, a range of adverse health outcomes in the offspring including neuropsychiatric morbidities may occur. Associations between GA and these disorders have been found in epidemiological studies that measured outcomes based on 2 or 3 levels of classification. This study aims to examine the associations between more finely defined GA groups and multiple neuropsychiatric disorders.This was a population-based study based on data collected from Danish birth, psychiatric, and other national registries. Included were live, singleton births in Denmark between 1978 and 2016. Excluded were births of <20 weeks' or >45 weeks' gestation or whose GA was missing. GA was classified into 6 subgroups: very preterm (20-31 weeks' gestation), moderately preterm (32-33 weeks), late preterm (34-36 weeks), early term (37-38 weeks), term (39-40 weeks), and late term (41-45 weeks). The International Statistical Classification of Diseases and Related Health Problems, 10th Revision codes were used to identify 9 major types of neuropsychiatric diagnoses and 8 subtypes for the analysis. The 9 major diagnoses were mental and behavioral disorders from substance abuse; schizophrenia and related disorders; mood disorders; neurotic, stress-related, and somatoform disorders; specific personality disorders; intellectual disability; pervasive developmental disorders; and childhood-or and adolescent-onset behavioral and emotional disorders. The 8 subtypes were mental and behavioral disorders due to alcohol use, mental and behavioral disorders due to cannabis use, schizophrenia, schizoaffective disorders, bipolar disorder, anorexia nervosa, childhood autism, and hyperkinetic disorder. Incident rate ratios (IRRs) and 95% confidence intervals (CIs) were estimated with term pregnancies serving as the reference.A total of 2,327,639 live, singleton births were included in the analysis. Of these, 22,647 (1.0%) were very preterm births; 19,801 (0.9%) moderately preterm births; 99,488 (4.3%) late-preterm births; 388,416 (16.7%) early-term births; 1,198,605 (51.5%) term births; and 598,682 (25.7%) late-term birth. Compared with term births, there was a gradient of decreasing rates of any of the 9 major diagnoses as GA increased from very preterm (