The Danish National School Test Program is a set of nationwide tests performed annually since 2010 in all public schools in Denmark. To assess the utility of this data resource for health research purposes, we examined the association of school test performance with demographic and socioeconomic characteristics as well as correlations with ninth-grade exams and higher educational attainment. This nationwide descriptive register-based study includes children born between 1994 and 2010 who lived in Denmark at the age of six years. Norm-based test scores (range 1-100, higher scores indicate better performance) in reading (Danish) and mathematics from the Danish National School Test Program were obtained for children aged 6-16 attending public schools in Denmark from 2010 to 2019. Population registers were used to identify relevant demographic and socioeconomic variables. Mean test scores by demographic and socioeconomic variables were estimated using linear regression models. Among the full Danish population of 1,137,290 children (51.3% male), 960,450 (84.5%) children attended public schools. There were 885,360 children who completed one or more tests in reading or mathematics (test participation was 77.8% for the entire population, and 92.1% for children in public schools). Mean test scores varied by demographic and socioeconomic characteristics, most notably with education and labour market affiliation of parents. For every 1-point decrease in the test scores, there was a 0.95% (95% CI: 0.93%; 0.97%) lower probability of scoring B or higher in the ninth-grade exam and a 1.03% (95% CI: 1.00%; 1.05%) lower probability of completing high school within five years after graduating from lower secondary school. In this study of schoolchildren in Denmark, demographic and socioeconomic characteristics were associated with test scores from the Danish National School Test Program. Performance in school tests correlated closely with later educational attainment, suggesting that these early measures of school performance are good markers of subsequent academic potential.