NOVELTY - A esterified material is provided, methanol and catalyst MW are added, stirred, and separated into an upper layer (a1) and lower layer (b1). The lower layer (b1) is subjected to transesterification, obtained crude glycerin is treated, fatty acid is added, stirred, the mixture is separated into upper layer (a3) and lower layer (b3). The upper layer (a3) is provided to a stirring and heating container, additive solution is added, mixture is separated into an upper layer (a4) and a lower layer (b4) having water, additive, glycerin, sulfates and sulfonate compounds, to obtain biodiesel.    USE - Production of biodiesel (claimed).    ADVANTAGE - The method enables economical and flexible production of high-quality biodiesel with high yield.    DETAILED DESCRIPTION - A esterified material with an acidity index of 30 mg potassium hydroxide/g is provided, methanol at ratio of 20-40 %mass/mass, and a catalyst MW at a ratio of 0.1-0.5 %mass/mass, are added to the esterified material at 45-65 degrees C, the mixture is stirred until the acidity index reaches a value of less than 2 mg potassium hydroxide/g for 60-240 minutes, the stirring is stopped for 30 minutes, and separated into an upper layer (a1) which is dark and predominantly contains methanol, water and coloring agents, and a lower layer (b1) which is light brown and primarily esterified fatty material and solubilized methanol. The lower layer (b1) is subjected to transesterification in which methanol is added to correct the esterified methanol ratio to 15 %mass/mass, the mixture is heated to 50-60 degrees C, sodium methylate is added, and the mixture is provided to a stirring and heating container until the mixed glycerin reaches a value lower than 0.25 %mass/mass. The stirring is stopped for 30 minutes, separated into an upper layer (a2) containing biodiesel with 98% conversion, and a lower layer (b2) of crude glycerin from 50-65% glycerol and containing free methanol, fatty material chosen from soaps, esters, glycerides and moisture, and the lower layer (b2) is distilled to remove the free methanol. The obtained crude glycerin is treated, fatty acid with an acidity index of 80-210 mg potassium hydroxide/g is added to the obtained mixture at 60-95 degrees C, stirred, the crude glycerin is added, stirred, and the same reaction conditions are maintained for 30 minutes. The stirring is stopped for 30 minutes, the mixture is separated into an upper layer (a3) with fatty material containing soap, ester, glycerides and residual glycerol, and a lower layer (b3) with glycerin containing 95% glycerol based on water content and residue free methanol in crude glycerin, residue soap and moisture. The upper layer (a3) undergoes split of soap so that all fatty acid is recovered, by using an additive solution to reduce effect of sulfuric acid on formation of sulfonates and other agents that confers color to the recovered fatty layer. The upper layer (a3) is provided to a stirring and heating container at 50-80 degrees C, an additive solution containing a nonionic surfactant at 1% and at room temperature is added, sulfuric acid 98% is slowly added, and the soap is hydrolyzed. The stirring is stopped for 30 minutes at 80 degrees C, the mixture is separated into an upper layer (a4) having fatty acid and ester with a moisture of 1 %mass/mass, and a lower layer (b4) having water, additive, glycerin, sulfates and sulfonate compounds which are sent to effluent treatment, to obtain biodiesel containing glycerin 90% free of salts. An INDEPENDENT CLAIM is included for biodiesel, which contains glycerin 90% free of inorganic salts, and esterified material containing soybean oil, palm oil and tallow and having an acidity index of 30 mg potassium hydroxide/g.