The objective of this study was to reduce the environmental impacts of used frying oil waste through the production of biodiesel. A 22 factorial planning has been used to evaluate the influences of alcohol/oil and reaction time on the biodiesel production yield. The optimal condition to produce the biodiesel has been found by use of the response surface methodology and analysis of variance to obtain the fitting model. This study was conducted in Campinas city, Brazil, where were collected the waste oil. An analysis of ecological cost also has been developed. Cooking oils collected from Campinas homes were mixed with ethanol in planned proportions (1:9, 1:7 and 1:5) and were transesterified at 60 °C and planned reaction times (30, 60 or 90 min), in order to obtain biodiesel, using 0.1% NaOH as a catalyst. The results of the physical-chemical analyses demonstrated that the biodiesels obtained possessed characteristics close to those required by Brazilian standards. This fuel could be used in fleets of buses, trucks and machines, or even sold to fuel distributors, which results in a solving between US0.8andUS4.5 millions. Thus, Campinas would gain environmental credits and become a sustainable city8621625CONSELHO NACIONAL DE DESENVOLVIMENTO CIENTÍFICO E TECNOLÓGICO - CNPQsem informaçãoThe authors thank to Nine July University (UNINOVE) and National Research Council CNPq for the financial support