Resumen: The building stock decarbonization by 2050 requires the implementation of an energy transition strategy. Building energy codes must be considered to minimize the energy consumption of the residential sector. This paper aims to evaluate the evolution of the building energy codes of Spain based on energy simulation. A quantitative assessment of the residential thermal demand according to the new energy efficiency requirements introduced in national regulations over the years was performed. Heating, cooling, and domestic hot water demands were assessed for 60 cases modeled in DesignBuilder, combining different building geometric typologies, energy codes, and climate zones. Heating presented the largest contribution to the total energy demand reaching up to 75%. The codes’ evolution led to a significant reduction in heating and a slighter decrease in cooling. The results showed an average energy demand improvement of 50% from the first regulatory release to the latest one. Idioma: Inglés DOI: 10.1007/s40430-022-03898-w Año: 2022 Publicado en: Journal of the Brazilian Society of Mechanical Sciences and Engineering 44, 12 (2022), 1-16 ISSN: 1678-5878 Factor impacto JCR: 2.2 (2022) Categ. JCR: ENGINEERING, MECHANICAL rank: 79 / 136 = 0.581 (2022) - Q3 - T2 Factor impacto CITESCORE: 4.0 - Mathematics (Q1) - Engineering (Q2)