The cost of raw materials and the production process remain major challenges hindering the expansion of biodiesel production on a large scale. Several technologies have been developed to reduce production costs. This research aims to investigate the energy recovery and economic aspects of biodiesel production from used cooking oil (WCO) using conventional and microwave (batch and continuous) transesterification technology. Used cooking oils are an alternative source of energy, given their high potential for use in biofuels production, especially biodiesel. The production of biodiesel in this study relies on a basic esterification reaction using calcium oxide prepared from willow leaves as a catalyst. The results showed that the optimal operating conditions include a catalyst concentration of 3% wt.%, a methanol content of up to 70wt%, and an operating temperature of 65 °C. The reaction time varied depending on the heating technique; the conventional method required 90 minutes, while the time decreased to 20 minutes with batch microwave heating, and to only 5 minutes with continuous microwave heating. These conditions resulted in the highest biodiesel yields of 93.852%, 96.313%, and 93.43%, respectively, for the three methods. From an economic perspective, the cost of producing one liter of biodiesel for conventional and microwave heating (batch and continuous) was approximately 1074.190, 483.588, and 510.162 Iraqi dinars/liter, respectively. The analysis also showed that the total energy consumption of the three methods was 0.945, 0.026666 and 0.03433 kWh respectively, demonstrating that microwave technologies offer a significant reduction in reaction time and higher energy efficiency, thus potentially leading to greater economic returns and operational benefits compared to traditional methods. Finally, the findings result calculated the energy payback period for producing 1 liter of biodiesel using microwave technology. The results showed that the system is sustainable, making it a suitable means of reducing the cost of biodiesel production and supporting its future commercialization.