Introduction

It is a widespread practice across educational systems to organize students into school cohorts according to their date of birth. Generally, a single school-entry cutoff date is employed to create school cohorts, so students born before that date start the educational system in a certain year, and students born after the cutoff wait for the next one. As a result, students born in the days following the cutoff are almost 1 year older at school entry than students in the same cohort but born in the days before the cutoff. This means an extra year of maturation and skill accumulation before starting school, which may entail a consequential advantage.

Numerous works have documented that students born in the months after the cutoff (i.e. older at school entry) outperform their peers born in the months before the cutoff during the initial stages of the educational career (Arrhenius et al., 2021; Barua & Lang, 2016; Bedard & Dhuey, 2006; Black et al., 2011; Crawford et al., 2010; González-Betancor & López-Puig, 2016; Oosterbeek et al., 2021; Peña, 2017), which is usually referred to as the relative age effect (RAE). It is also a well-established finding that this RAE decreases as students grow (Bedard & Dhuey, 2006; Cáceres-Delpiano & Giolito, 2018; Datar & Gottfried, 2015; Elder & Lubotsky, 2009; Oosterbeek et al., 2021; Pehkonen et al., 2015), so it might finally not affect educational attainment. Although some studies have reported the RAE on total years of schooling and the probability of completing higher education (Fredriksson & Öckert, 2013; Kawaguchi, 2011; Peña, 2017; Skirbekk et al., 2004; Zhang & Xie, 2018), others have not (Black et al., 2011; Oosterbeek et al., 2021; Pehkonen et al., 2015).

Our study joins these endeavours and examines the effect of the age at school entry on educational attainment and field of study in Spain, where the school-entry cutoff is set on January 1. We take advantage of the fact that individuals born in a narrow window around that date would be very similar in all respects but their age at school entry: those born in the days following the cutoff enjoyed the advantage of being the oldest in their school cohort, while those born in the days before the cutoff were penalized by being the youngest. By means of a regression discontinuity design (RDD), we assess whether individuals born after the school-entry cutoff attained higher levels of education and chose specific fields of study. Our findings indicate that males born in the days following January 1 accumulate more years of education than males born at the end of the year, but are less likely to complete their education in a STEM (Science, Technology, Engineering, and Mathematics) field of study. Interestingly, the effect is only apparent for the youngest and the oldest students in each cohort, decreases at higher levels of education and is not observed among females.

The contribution of our work is, therefore, two-fold. First, although different works have documented the advantage of older students up to the first course of university education in Spain (Bedard & Dhuey, 2006; Beneito & Soria-Espín, 2020; Felgueroso et al., 2013; González-Betancor & López-Puig, 2015; Gutiérrez-Domènech & Adserà, 2012; Jerrim et al., 2021), no previous study in the Spanish context has analysed the effect of the age at school entry on final educational attainment. Second, although several works have studied the RAE on educational attainment in other countries (Black et al., 2011; Fredriksson & Öckert, 2013; Kawaguchi, 2011; Oosterbeek et al., 2021; Pehkonen et al., 2015; Peña, 2017; Skirbekk et al., 2004; Zhang & Xie, 2018), this is to the best of our knowledge the first work that explores the RAE on the decision to enrol in a STEM field of study, a relevant academic outcome since, at least in Spain, STEM students are better performers during high school,Footnote 1 come from higher social backgroundsFootnote 2 and enjoy higher occupational returns, particularly those completing engineering and architecture careers.Footnote 3

The rest of the paper is organized as follows. In the next section, we lay out the background of our study and the characteristics of the Spanish case. Then, we describe the data, the outcomes analysed and the regression discontinuity design. Results follow, together with several robustness checks and a placebo test. The last section is devoted to the conclusions of our work.

Background

The early academic advantage of students born right after the school-entry cutoff

Most educational systems organize students in school cohorts based on a single school-entry cutoff date. Although the aim of this practice is to homogenize groups in terms of school readiness, the age of students in the same school cohort can still differ by one year. For instance, in the Spanish educational system, where all students are to begin primary education in the calendar year they turn six (i.e. the school-entry cutoff is set on January 1), students born at the beginning of January start primary education being 6.67 years old, while students born at the end of December do so at age 5.67, a 1-year difference that represents 17.6% of the time lived by the latter.

For the sake of clarity, Fig. 1 displays a graphical representation of the organization of students into school cohorts in Spain. Let us imagine three students: student A is born in the last days of December in year t, student B is born in the first days of January in year t + 1, and student C is born in the last days of December in year t + 1. Although students A and B were born only a few days apart, they were born on different sides of the school-entry cutoff. As a result, they belong to different school cohorts and will start primary education in a different year: student A starts in year t + 6 being 5.67 years old, and student B starts in year t + 7 being 6.67 years old. In turn, students B and C belong to the same school cohort despite being born almost one year apart.

Fig. 1
figure 1

Depiction of the organization of the student body into school cohorts in Spain

This 1-year age gap means one extra year of maturation and skill accumulation before entering school, a critical advantage in the early stages of the educational career. As a result, students born right after the school-entry cutoff perform better during primary education, are less likely to repeat a grade or be diagnosed with a learning disorder, obtain higher test scores in external assessments and are located more often in higher educational tracks (Arrhenius et al., 2021; Barua & Lang, 2016; Bedard & Dhuey, 2006; Black et al., 2011; Crawford et al., 2010; González-Betancor & López-Puig, 2016; Oosterbeek et al., 2021; Peña, 2017). Besides those academic advantages, students born after the cutoff also develop a higher academic self-concept after controlling for school performance (Crawford et al., 2014), exhibit a higher development of non-cognitive skills (Datar & Gottfried, 2015; Peña & Duckworth, 2018), are more popular at high school (van Aalst & van Tubergen, 2021), have stronger social connections (Fumarco & Baert, 2019), accumulate more leadership experience during high school (Dhuey & Lipscomb, 2008), present higher levels of self-esteem (Thompson et al., 2004), are less frequently victims of bullying (Mühlenweg, 2010), declare higher levels of well-being and health (Fumarco et al., 2020) and even show lower rates of mortality by suicide (Matsubayashi & Ueda, 2015).

The long-lasting consequences of the age at school entry

It remains an open question, however, whether and, if so, to what extent this initial (dis)advantage associated with being born on one or the other side of the school-entry cutoff finally conditions the educational attainment of individuals. It is well-established that the RAE peaks in the initial years of schooling and wanes as students grow (Bedard & Dhuey, 2006; Cáceres-Delpiano & Giolito, 2018; Datar & Gottfried, 2015; Elder & Lubotsky, 2009; Oosterbeek et al., 2021; Pehkonen et al., 2015). Nonetheless, several studies have reported the RAE on later educational outcomes such as academic grades at 10th grade, track placement in upper secondary education, university enrolment and performance at university (Bedard & Dhuey, 2006; Beneito & Soria-Espín, 2020; Black et al., 2011; Cáceres-Delpiano & Giolito, 2018; Crawford et al., 2010; Mühlenweg & Puhani, 2010; Oosterbeek et al., 2021). If so, being born (before) after the cutoff constitutes a long-lasting educational (dis)advantage that may affect final attainment and other related long-term outcomes.

Indeed, several works have observed that individuals born after the school-entry cutoff accumulate more years of schooling. Fredriksson and Öckert (2013) reported a difference of 0.16 total years of schooling between Swedish students born right before and after the school-entry cutoff. Kawaguchi (2011) and Zhang and Xie (2018) reported similar effects in Japan and China, respectively. However, Zhang and Xie (2018) reasoned that the result was not due to the accumulation of advantages over time but to the positive selection of students at school entry given the possibility to anticipate the beginning of school in China (exploited mainly by high-SES families). Studying the probability of completing higher education, Peña (2017) reported that Mexican students born after the cutoff are more likely to finish university education, and Skirbekk et al. (2004) found parallel results in Sweden. Contrastingly, Black et al. (2011) and Pehkonen et al. (2015) have not observed any effect of the age at school entry on the total years of schooling in Norway and Finland, respectively. Oosterbeek et al. (2021) have not observed either any effect on the highest level of education completed in the Netherlands.

A RAE on educational attainment would be relevant because it will later condition the development of the occupational career and the dynamics of family formation. Indeed, it has been observed that individuals born in the months before the school-entry cutoff are less likely to occupy positions of power in society, such as sits in Congress (Muller & Page, 2016) or CEO positions in big companies (Du et al., 2012). In turn, individuals born after the cutoff are less likely to be unemployed (Crawford et al., 2013), are more often employed in the formal sector (Peña, 2017) and earn higher starting salaries (Røed Larsen & Solli, 2017).Footnote 4 As for the dynamics of family formation, it has been observed that the age at school entry affects the probability of having a university-educated spouse (as a result of the educational homogamy dynamics) and having a lower number of children (as a result of the negative educational gradient in fertility) in Mexico (Peña, 2017); influences the probability of early pregnancy among Norwegian women (Black et al., 2011); and impacts the age at first and second birth and the age at marriage in Sweden (Skirbekk et al., 2004).

The Spanish case

In this work, we assess the effect of being born right after the school-entry cutoff instead of right before on final educational attainment and the choice of field of study in Spain, where education is compulsory from ages 6 to 16. Up to age 3, around four out of ten Spanish children are in nurseries or with childminders. At age 3, when the second stage of preschool education begins, schooling is already close to the universe of children of those ages, with a 96% net schooling rate (Requena, 2022). Importantly, Spanish parents are not allowed to anticipate or delay school entry, meaning that all individuals born at the beginning of the year enjoy the advantage of being among the oldest students in their school cohort, while all individuals born at the end of the year face the penalization of being among the youngest. During compulsory education, students course a unified curriculum that postpones selection into tracks up to age 16, when upper secondary education begins. Repetition rates are comparatively high both during primary and lower secondary education.

As for the effect of the age at school entry, prior studies about Spain have observed that primary education students born in the months after the school-entry cutoff notably outperform their counterparts born in the months before (Bedard & Dhuey, 2006; González-Betancor & López-Puig, 2015; Gutiérrez-Domènech & Adserà, 2012; Mühlenweg, 2010). Gutiérrez Domènech and Adserà (2012) reported that the effect size does not decrease throughout primary education, and González-Betancor and López-Puig (2016) documented that younger students are more likely to retake a course during primary education, particularly in 2nd grade. In fact, different studies in the Spanish context exploiting PISA have concluded that, at later ages, the age within the cohort has not a direct effect on test scores but only an indirect effect via repetition in primary education (García-Pérez et al., 2014; Jerrim et al., 2021; Sprietsma, 2010). Nonetheless, the RAE seems particularly enduring in the Spanish context. The month of birth has been reported to affect the probability of early dropout (Calero, 2008), the probability of completing post-compulsory education (Felgueroso et al., 2013) and the performance in the admittance examinations and the first year of university education (Beneito & Soria-Espín, 2020). However, no previous work in Spain has studied the RAE on final educational attainment or field of study.

Data and method

Data

Our work is based on the 2011 Spanish Population and Housing Census microdata. These data are freely accessible to the public on the website of the Spanish office for national statistics, the Instituto Nacional de Estadística (INE, www.ine.es). Data provided by INE consist of a broad random sample (≈ 10% of the universe) of the census data, made up of 4,107,465 observations. The microdata distributed for public use contains all the socio-demographic information usually collected by censuses, including month and year of birth as well as educational attainment and field of study. To develop our analysis, an ad hoc request was made for data including the exact birthday.

For the study at hand, the sample resulting from our request to INE was subject to several exclusion criteria. First, only individuals aged 25 to 35 (i.e. those born between 1976 and 1986) were included in the analysis. On the one hand, it is assumed that after the age of 25, people have finished their educational careers and do not substantially change their educational attainment. On the other hand, excluding those individuals over 35 controls for the many (and sometimes dramatic) changes that the Spanish educational system underwent over the last century (Requena & Bernardi, 2008). Second, after observing an unlikely accumulation of individuals born on January 1 and verifying a very high concentration of immigrant population on that date of birth,Footnote 5 we chose to drop from the analysis all individuals born on January 1. Also, as immigrants might have grown up in an educational system with a different school-entry cutoff rule (and, therefore, did not enjoy the advantage of being old in a school cohort despite being born in January), we only retain individuals that were born in Spain. With these exclusions, our analytical sample includes 433,736 observations (of which 214,475 are women), representing a total of 5,589,247 individuals in the entire country (of which 2,710,005 are women).

Variables

The 2011 Spanish census collected the higher level of education completed by each individual and the field of study of the higher level of education (codified following the ISCED-F classification from 1997), so we create the following six dependent variables:

  • Schooling years. We convert the highest level of education into schooling years using the expected years of schooling for a given level of educational attainment (Fredriksson & Öckert, 2013).

  • Post-compulsory education. A binary indicator that takes value one if the individual completed education beyond compulsory education (upper secondary or tertiary education) and zero otherwise.

  • STEM post-compulsory education. The variable is only defined for those who completed post-compulsory education. We codified as STEM careers those in ISCED-F-97 categories 4 (life sciences, physical sciences, mathematics and statistics and computing) and 5 (engineering; manufacturing and processing; and architecture and building). We also used a broader definition of STEM including category 6 (agriculture, forestry, fishery and veterinary), and the results are virtually the same (omitted for brevity but available upon request).

  • University education. A binary indicator that takes value one if the highest level of education was a bachelor’s degree, a master’s degree or a doctorate, and zero otherwise.

  • STEM university education. Codified in the same way as the previous STEM post-compulsory education variable, but only defined for those who completed university education.

  • Post-graduate education. A binary indicator that takes value one if the highest level of education was a master’s degree or a doctorate, and zero otherwise.

Table 1 shows the distribution of those variables. Females accumulate 1.14 years of schooling more than males and are more likely to complete post-compulsory education and finish university studies. The probability of attaining post-graduate education is also larger among females. In contrast, males are much more likely to complete their education in a STEM field of study.

Table 1 Descriptive information for outcome variables

The regression discontinuity design

Following prior research, we employ a regression discontinuity design (RDD) to estimate the RAE on educational attainment and field of study (Beneito & Soria-Espín, 2020; Bernardi & Grätz, 2015; Cáceres-Delpiano & Giolito, 2018; Fredriksson & Öckert, 2013; Peña, 2017). RDD is a popular quasi-experimental research strategy based on the idea that when treatment status (being among the oldest students in a school cohort vs being among the youngest) depends on crossing a specific threshold (the school-entry cutoff) in a running variable (the date of birth), units around the threshold present similar observed and unobserved characteristics so that their comparison mimics a local randomized experiment (Cattaneo et al., 2020). Arguably, students with very different birthdates will also be different in other observed and unobserved characteristics related to educational attainment, which confounds the effect of the age at school entry. However, as we approach the cutoff, students become progressively more similar in all those characteristics, and the only remaining difference is whether they were born before or after the school-entry cutoff.

RDD is based on the following two assumptions. First, we assume that individuals do not self-select into the treatment or, put differently, that parents do not adjust births around the school-entry cutoff so that they happen just before (saving 1 year’s worth of childcare costs) or just after (enjoying the advantage of being among the oldest students in a school cohort) the cutoff. Ruling out this possibility is important because this behaviour has been documented in different Asian countries (Huang et al., 2020; Kim, 2021; Shigeoka, 2015). Fortunately, Valdés and Requena (in press) have analysed the universe of births in Spain between 2000 and 2020 and documented that Spanish parents do not deliberately move births around the school-entry cutoff (not only in the entire population but also after stratifying the sample by parents’ educational attainment). Furthermore, we perform a manipulation test on our data (Fig. 2) and see no accumulation of births on any side of the cutoff. We also run a specific statistical test to examine whether there is a discontinuity at the cutoff in the running variable. The null hypothesis of no manipulation is not rejected (p-value = 0.358), reinforcing the idea of no self-selection into the treatment.

Fig. 2
figure 2

Distribution of births around the school-entry cutoff

Second, we assume that individual characteristics that might affect the outcome of interest do not jump abruptly at the cutoff. If they did, comparing units on both sides of the school-entry cutoff will not mimic a local randomized experiment. Usually, researchers test this assumption for observed characteristics and then extrapolate the conclusions to unobserved characteristics. Our census data does not offer information on characteristics relevant to educational attainment other than sex and country of birth. As shown in Fig. 3, the probability of being male or being born in Spain does not change at the cutoff.

Fig. 3
figure 3

Covariates around the school-entry cutoff

As for the research design, we employ a sharp RDD, meaning that all individuals that cross the threshold are considered treated (all individuals born after January 1 are assumed to have started school as the oldest students in their school cohort), and all individuals that do not cross the threshold are considered untreated (all individuals born before January 1 are assumed to have started school as the youngest students in their school cohort).Footnote 6 In a sharp RDD, comparing individuals at both sides of the cutoff yields the average treatment effect, τ(c). As this parameter is only defined for a narrow observation window around the cutoff, it is referred to as a local average treatment effect (LATE), underscoring the external validity problems of the RDD estimate.

Traditionally, the window or bandwidth around the cutoff was discretionally selected by the researcher based on intuition or prior knowledge. However, different data-driven criteria have been developed in recent years so that the arbitrary selection of the bandwidth does not compromise the reliability of the estimation. Two popular approaches are the mean squared error (MSE) criterion and the coverage error probability reduction (CER) criterion (Calonico et al., 2021). However, the former method is only optimal for point estimation, not for conducting inference (Calonico et al., 2021). Thus, we calculate CER-optimal bandwidths for each dependent variable (results using MSE-optimal bandwidths are offered as a robustness check).Footnote 7

Regarding the estimation of τ(c), the most common approach is to employ local polynomial regression and fit a polynomial of order p at each side of the cutoff. Formally, the LATE is estimated as:

$$\widehat{\tau }\left(c\right)= {\widehat{\alpha }}_{+}-{\widehat{\alpha }}_{-}$$

where \({\widehat{\alpha }}_{+}\) and \({\widehat{\alpha }}_{-}\) are the intercepts of the local polynomial regressions of order p fit at both sides of the cutoff:

$$\left\{\begin{array}{c}{Y}_{i}={\alpha }_{+}+{\beta }_{1+}\left({X}_{i}-c\right)+\dots +{\beta }_{p+}{\left({X}_{i}-c\right)}^{p}+{u}_{i}\\ {Y}_{i}={\alpha }_{-}+{\beta }_{1-}\left({X}_{i}-c\right)+\dots +{\beta }_{p-}{\left({X}_{i}-c\right)}^{p}+{u}_{i}\end{array}\right.$$

For clarification, Xi stands for the exact date of birth of the student and c is the school-entry cutoff (January 1), so Xic corresponds with the count of days since the cutoff, with negative values for birthdates before the cutoff and positive values for birthdates after that date.

We perform the main analysis using order one polynomials, but we also run order two polynomials as a robustness check. Furthermore, it is common to employ a weighting scheme based on a kernel function so that observations closer to the cutoff carry a higher weight in the estimation of the result. We employ a triangular kernel.

All RDD models are run separately for males and females, and estimated with the user-written command rdrobust in Stata 16 (Calonico et al., 2017). We also run a placebo test to demonstrate that, if we compare students born on both sides of, for instance, July 1, we do not observe any effect.

Results

Educational attainment

Figures 4 and 5 report the RAE for each outcome variable. Full results can be consulted in Table 2 in the Appendix, where we also provide the estimates for the whole sample (without differentiating between males and females).

Fig. 4
figure 4

Local average treatment effect of the age at school-entry birthdate relative to the school-entry cutoff on educational attainment and field of study

Fig. 5
figure 5

Regression discontinuity plots

Overall, we do not observe that females’ educational attainment is affected by their month of birth. In turn, males’ attainment is significantly higher if they were born at the beginning of January instead of at the end of December. For males, the probability of completing education beyond the compulsory level increases by 4.0 percentage points if they were born after the cutoff (p-value ≤ 0.05). Although smaller, the effect is still noticeable for the probability of completing university education (2.5 percentage points; p-value ≤ 0.10). However, there is no effect on the probability of completing post-graduate education. As discussed further below, this decreasing pattern suggests that the (dis)advantage of being among the oldest (youngest) in a cohort is particularly consequential for struggling students. Since students are more strongly selected at higher levels of education, the advantage of being among the oldest is progressively less consequential.

The effects on the probability of completing post-compulsory and university education translate into a non-trivial effect on schooling years. On average, males born after the school-entry cutoff accumulate 0.2 more schooling years than males born before the cutoff (p-value ≤ 0.10).

Interestingly, if we look carefully at Fig. 5, these results rely heavily on observations close to the school-entry cutoff date. In turn, there seems to be no effect for individuals born away from the cutoff. We reaffirm these conclusions by adjusting donut regressions that exclude individuals born 2 weeks before and after the cutoff (see Table 3 in the Appendix). We interpret this result as indicative that, when assessing educational attainment, the critical aspect is not whether an individual is younger or older than other peers in the school cohort (April-born students are older than August-born students) but whether the individual enjoyed the advantage of being among the oldest students in a cohort or faced the disadvantaged of being among the youngest students, and that only occurs around the school-entry cutoff.

Field of study

As for the field of study, while we observe a zero effect among females, the probability that males complete their education in a STEM field is lower among individuals born right after the cutoff. For those who completed any level of post-compulsory education, that probability decreases by 3.3 percentage points if the individual was born after the cutoff (p-value ≤ 0.05); and for those who completed university education, it decreases by 6.0 percentage points (p-value ≤ 0.05).

These results might seem surprising since one might think that the advantage of being old within a cohort should also help to complete education in academically demanding fields such as STEM. In turn, we observe that students born early in the year are less likely to finish their education in a STEM field. Below, we discuss this result further, but again, it would seem that the effect of being among the oldest or the youngest students in a school cohort is particularly consequential for struggling students, who only advance to higher levels of education if they enjoy the advantage of being old within the cohort but are not capacitated enough to complete further education in highly demanding fields of study.

Furthermore, it is important to note that, as our information on the field of study is conditional on attainment, there are two possible reasons for older individuals to be less likely to attain education in a STEM field: (1) January-born individuals might be less likely to choose STEM fields than their December-born peers or (2) all individuals are equally likely to enrol in STEM, but the former are more likely to drop out from STEM than the latter. Since we do not have information on enrolment, we cannot settle on one or the other explanation.

As an ancillary analysis, we examine whether there is heterogeneity within STEM and rerun the analysis comparing first the engineering and architecture category with all non-STEM fields and then the science category with all non-STEM fields. Results are reported in Table 4 in the Appendix and show no relevant differences in the RAE computed for each of those STEM categories separately.

Robustness checks and placebo test

To test the robustness of our conclusions, we reassess the results fitting order two polynomials and employing MSE-optimal bandwidths instead of CER-optimal bandwidths. Results are presented in Table 5 in the Appendix. On the one hand, order two polynomials offer slightly larger effects, although less precisely estimated. On the other, MSE-optimal bandwidths are between two and three times as large as CER-optimal bandwidths. As a result of considering units further away from the cutoff, the estimated effects are slightly smaller. Nonetheless, the overall picture is virtually the same as the one displayed in the main analysis.

Furthermore, as we pool together individuals born in different years, we also test whether our conclusions relied too heavily on the consideration of one particular year. To do so, we perform a leave-out test. We rerun the models ten times excluding one different year at a time. The results are presented in Tables 6 and 7 in the Appendix. As can be observed, the results are quite consistent, so we are confident that our conclusions are not a statistical artefact driven by individuals born in a very abnormal year.

Finally, we conduct a placebo test assessing the educational attainment and field of study of individuals born around July 1 (Table 8 in the Appendix). As the treatment status on both sides of July 1 does not change, we expect no treatment effects. That is precisely what we observe: the statistically significant effects previously identified around January 1 among males disappear around July 1.

Conclusions

The relative age effect (RAE) on educational achievement at early ages is widely accepted by the pertinent literature (Arrhenius et al., 2021; Barua & Lang, 2016; Bedard & Dhuey, 2006; Black et al., 2011; Crawford et al., 2010; González-Betancor & López-Puig, 2016; McEwan & Shapiro, 2008; Oosterbeek et al., 2021; Peña, 2017). In these initial stages of the educational career, the extra maturation time implied by starting school 1 year older translates into better academic performance, lower retention rates, lower incidence of learning disorders and more presence in higher educational tracks. More ambiguous, however, are the conclusions as to whether the age at school entry conditions final educational attainment (Black et al., 2011; Fredriksson & Öckert, 2013; Kawaguchi, 2011; Oosterbeek et al., 2021; Pehkonen et al., 2015; Peña, 2017; Skirbekk et al., 2004; Zhang & Xie, 2018). To try to reduce this ambiguity, we assess the extent to which being among the oldest or the youngest individuals in a school cohort influences the total number of schooling years; the completion of post-compulsory, university and post-graduate education; and the propensity to obtain degrees in a STEM field of study.

The Spanish case is appropriate for this analysis because there is a strict school-entry cutoff (January 1) with virtually universal compliance. As a result, individuals born at the beginning of January necessarily start primary education being 1 year older than their peers born at the end of December. Moreover, high-quality census data are available that provide samples of considerable size and contain information both on the exact date of birth and final educational attainment. Given the available data and our research objectives, we applied an RDD to estimate the effect of the date of birth relative to the school-entry cutoff on educational attainment and field of study. These data met the basic requirements for a solid RDD, and none of the robustness tests applied could falsify our main findings. On these premises, our contribution to the existing literature on the RAE is twofold: we present hitherto unavailable results on how final educational attainment in Spain depends on the age at school entry and show, to the best of our knowledge for the first time, that the age at school entry influences the finalization of education in a STEM field of study.

First, the age at school entry has an appreciable impact among males on the probability of obtaining post-compulsory levels of education and university degrees but not on post-graduate studies (Master’s and PhD). This translates into males born after the cutoff attaining 0.2 more years of education than their peers born before the cutoff, an effect highly consistent with prior research (Fredriksson & Öckert, 2013; Kawaguchi, 2011; Zhang & Xie, 2018). Interestingly, the RAE is less intense as we analyse higher levels of educational attainment. Our interpretation of this decreasing pattern is that the (dis)advantage of being among the oldest (youngest) students in a school cohort is particularly relevant among struggling students. Low performers born early in the year might find there the necessary push to complete a certain level of education. In turn, low performers born at the end of the year (who lack that push) would fail to complete that educational level or not pursue further education. The group of young students in the cohort would be, so to speak, purged of its less academically able members, while the composition of the group of older students would be more heterogeneous in terms of academic competence. As a result, being among the oldest students in a school cohort instead of among the youngest will constitute less of an advantage at higher levels of education, where students are more strongly selected in terms of academic preparation.

Among females, however, no such effects are observed. This heterogeneity must be framed in the context of the dramatic changes that in recent decades have led women to get higher grades than men in all advanced societies (DiPrete & Buchmann, 2013). The predominant explanations for the gender education gap rule out overall differences in cognitive ability and attribute the male disadvantage to girls’ higher levels of effort, commitment, enjoyment of school life and importance attached to education (Barone & Assirelli, 2020; Lörz & Mühleck, 2019; Lundberg, 2020). Such explanations are of little help in understanding the disappearance of the age differentials at school entry in final educational attainment. However, several studies have already shown that girls experience a lower RAE at the initial stages of the educational career (Datar, 2006; McEwan & Shapiro, 2008; Mühlenweg, 2010; Page et al., 2017). It might be that, in Spain, the forces that fuel the initially larger effect among males are ineffective among females and, for the latter, the effect fully disappears before affecting final educational attainment. For instance, we know that repeating a grade during primary education is one of the main mechanisms that push the RAE into later educational stages (Elder & Lubotsky, 2009; Jerrim et al., 2021; Sprietsma, 2010), and although it is comparatively more likely to repeat a grade during primary education in Spain (Ikeda & García, 2014), it is far less likely among females (Cordero Ferrera et al., 2014). Also, the RAE is more likely to be found in final educational attainment if students make decisions early in their lives that highly condition their final level of education, such as leaving the educational system before completing compulsory education. As early dropout is far more frequent among males in Spain (OECD, 2021), this might be another reason why we do not observe any RAE on females’ final educational attainment. In sum, the RAE might wear off among Spanish females because they repeat less often during primary education (contributing to the dilution of the effect) and make less frequently early irreversible decisions about their educational career (giving the effect enough time to disappear entirely).

The effect of the age at school entry on the pursuit of a degree in a STEM field, which is a disproportionately male-dominated option (Legewie & DiPrete, 2014a, b), is equally interesting. As with overall educational attainment, females do not seem to be affected by the RAE. However, the age at school entry of males is associated with a lower probability of studying science and engineering disciplines. Given that STEM studies are more demanding in terms of academic preparation, it is surprising that the RAE among men is negative. We lack adequate data to analyse this finding with due precision. However, the RAE on STEM studies among males is compatible with a selective process whereby young, low-achieving students leave the education system when they struggle, while old, low-achieving students use their age advantage to continue studying but avoid the highly demanding STEM studies.

Nonetheless, as we work with information about the field of study conditional on attainment, we cannot rule out the possibility that all students enrol the same in STEM, but older individuals drop out more often. Overall, we would say that individuals born right after the cutoff are less likely to finish post-compulsory/university education in a STEM field of study either (1) because they enrol less often in STEM fields of study or (2) because they enrol in STEM as often as December-born students but are more likely to fail. Either way, the reason why they would choose STEM less often or fail more often in STEM would be that they struggled at the previous educational level, and the only reason why they got to finish was the advantage of being older in their school cohort. The fact that the identified effect among males decreases throughout the different stages of the educational career supports this conjecture. In any case, confirming or ruling out these possibilities requires better (longitudinal) data, as well as more and deeper research.