Primary and secondary education are of critical importance to the future life of children, determining their future in the labour market. Thus, pupils should be provided with an optimal learning environment to work at their highest cognitive capacity, including the indoor quality of classrooms. However, school buildings are often old, poorly ventilated, and in urgent need of renovation. Past studies have shown that being in a poorly ventilated classroom can have negative effects on the learning outcomes of pupils. The question remains, however, if children with an unhealthy lifestyle are more susceptible to a poor indoor environment. This study aims to investigate the role of the pupil’s health status when being exposed to high levels of indoor carbon dioxide (CO2) in classrooms. It is hypothesised that among the students with healthy dietary behaviour and high physical activity level, despite being exposed to a high concentration of CO2 during the time they study for a test and during the time of conducting the test, they are more resilient towards the negative effects of indoor CO2 on learning outcomes, compared to students with a less healthy lifestyle. For this purpose, data from a quasi-experimental study was used, including indoor air sensor data for each classroom, data of the health behaviour of students, and the exam grades of an annual nationwide test. The sensors measure the concentration of CO2, fine particular matter, temperature and humidity levels, and noise levels in classrooms. Preliminary results from linear mixed model analysis have shown that an unhealthy diet and a higher BMI negatively affects test scores. Additionally, the effect of dietary behaviour on test scores interacts with the level of CO2 in the classroom. The next steps will be to examine this effect further by including confounders such as socioeconomic status, sick leave, and minutes spend in the classroom.