Global warming is partly caused by the increasing amount of greenhouse gas emissions accumulating in the Earth's atmosphere, leading to a rise in surface temperatures over time. Carbon dioxide (CO2) emissions are the main component of greenhouse gases. The largest CO2 emissions from the energy sector come from the use of electricity generated by building activities. This study aims to analyze the CO2 emissions produced from electricity use at MTs Bahrul Ulum. Data collection on electricity usage was conducted by measuring the power consumption of air conditioners, lights, PCs, and laptops used during operational hours, particularly in the MTs Bahrul Ulum school building. CO2 emissions from the electricity consumption of electronic equipment were calculated using emission factors according to the regulations of the Directorate General of Electricity, Ministry of Energy and Mineral Resources (ESDM). The method used is a carbon footprint study. The results show that electricity usage at the location is 6,954.792 kWh/year, and the emissions generated from this electricity usage amount to 8,507.243784 kgCO2/year. This study also developed an application using the R program to facilitate the calculation and analysis of CO2 emissions based on secondary carbon footprints. The application is designed to help users identify and reduce CO2 emissions resulting from daily activities in the school environment.