In the last decade, we have experienced a changing geopolitical context that has caused changes in the energy context. In addition, human activity contributes to global warming or sea level rising, i.e., climate change. A set of action policies have been implemented to continue fighting against this environmental situation (such as the Paris Agreement, the COP27, or the European Green Deal for 2030); therefore, it is necessary to determine whether we are on the right track. It is compulsory to develop predictive models that accurately analyze the current status and the already path undertaken. To this end, this article analyzes the environmental efficiency of the 27 countries of the European Union (excluding the UK) using the so-called data envelopment analysis (DEA). In particular, economic (GDP and GDP per capita), environmental (CO2 and CH4 emissions), electricity production data, the volume of vehicles, and the industrial production rate of the different countries were collected to calculate environmental efficiency. Once these data were collected, the environmental efficiency was calculated using two methods based on the DEA. The results show that out of the 27 countries, only 12 have a relatively high environmental efficiency, although it could be improved, implementing a set of corrections. However, other countries have a low eco-efficiency performance and they must improve in the coming years. We can highlight that rich countries are closer to achieving high environmental efficiency than less developed countries.Graphical AbstractPolitical map of the European Union indicating the average eco-efficiency
with colors of the 27 countries of the DEA method.Supplementary InformationThe online version contains supplementary material available at 10.1007/s10098-023-02553-9.