Differences in academic achievement by gestational age of children born at term, especially at 39 to 41 weeks, are not well understood. To examine differences in academic achievement among children born between 37 and 41 weeks' gestational age. This retrospective cohort study linked birth certificates of children born in Iowa from 1989 to 2009 with school test scores for grades 2 to 11 from 2017 to 2018. Statistical analysis was performed from January to March 2023. Gestational age at 37, 38, 39, and 41 weeks vs 40 weeks from clinical or obstetric and calendar measures. Outcomes were scores in national percentile rankings (NPRs) on standardized school tests in math and reading. Covariates included demographic and prenatal risk factors. The sample included 536 996 children (50.7% male children and 49.3% female children) with math scores (3 576 045 child-grade observations; 6.6%, 15.7%, 28.6%, 35.5%, and 13.7% born at 37, 38, 39, 40, and 41 weeks, respectively) and 537 078 children with reading scores (3 590 408 child-grade observations). Score differences for those born at 39 vs 40 weeks were -0.028 NPRs (95% CI, -0.18 to 0.12 NPRs) for math and 0.085 NPRs (95% CI, -0.067 to 0.24 NPRs) for reading using the clinical or obstetric measure and 0.03 NPRs (95% CI, -0.14 to 0.20 NPRs) for math and 0.13 NPRs (95% CI, -0.042 to 0.31 NPRs) for reading using the calendar measure. With the clinical or obstetric measure, score differences between those born at 41 and 40 weeks were 0.19 NPRs (95% CI, -0.0052 to 0.38 NPRs) for math and 0.098 NPRs (95% CI, -0.096 to 0.29 NPRs) for reading. With the calendar measure, score differences for those born at 41 weeks were -0.22 NPRs (95% CI, -0.43 to -0.013 NPRs) for math and -0.28 NPRs (95% CI, -0.49 to -0.074 NPRs) for reading. With the clinical or obstetric measure, score differences between those born at 37 and 38 weeks vs 40 weeks were -0.59 NPRs (95% CI, -0.84 to -0.33 NPRs) and -0.44 NPRs (95% CI, -0.62 to -0.26 NPRs), respectively, for math, and -0.066 NPRs (95% CI, -0.32 to 0.19 NPRs) and -0.19 NPRs (95% CI, -0.37 to 0.0038 NPRs), respectively, for reading. This study suggests that there is no evidence of a difference in math and reading scores over grades 2 to 11 among children born between 39 and 40 weeks' gestation, and overall no evidence of better scores among those born at 41 weeks' gestation compared with 40 weeks' gestation. The results can further inform decisions on delivery timing at term birth by offering insights into long-term associations of delivery timing with cognitive development and school achievement.