Exergy flow analysis is applied to account wastes, determine the exergetic efficiency, compare substitutes and other types of energy sources and also define economic and environmental policies for resource use. The present study focuses on the exergy flow analysis of biodiesel production by esterification and transesterification of waste cooking canola oil to achieve benefits such as reducing material and energy consumptions and improving energy and exergy efficiencies. The input amounts of esterification for all the runs were kept constant, while the runs of transesterification were carried out in a variety of mass and energy input values as the experimental variables. The thermodynamics analysis was applied to determine exergy input and output of the system for the experimental runs. Impacts of experiment variables, including methanol:oil molar ratio, potassium hydroxide concentration and the reaction temperature of transesterification were evaluated on exergy efficiency and exergy loss in the transesterification. The maximum exergy efficiency (91.7%) and the minimum exergy loss (4320 kJ/kg biodiesel) were achieved at methanol:oil molar ratio of 8:1, potassium hydroxide concentration of 1 wt% and the reaction temperature of 55 °C. Excessive use of methanol and catalyst reduced the yield and the exergy efficiency through increasing exergy loss by waste materials.