Tofu wastewater is a pollutant when discharged into the aquatic environment because it can cause foul odors, diseases and reduce the concentration of dissolved oxygen. On the other hand, tofu wastewater can be used as an alternative energy source, namely biogas. The study aims to determine the effect of fermentation time, substrate ratio and stirring on biogas production and methane gas. Variables used in the experiment included: volume ratio of starter (10, 20, 30, and 40% ); stirring (1, 7, and 14 days), fermentation time (5, 10, 15, 20, and 25 days). The research was conducted using a digester that has a volume of 50 liters filled with starter as much as 10, 20, 30 and 40% (v/v). Then the digester is flowed with N2 gas until the digester is in anaerobic condition then stirring (1, 7, and 14 days) or without stirring. Every 5 days to 25 days a sample is taken and the amount of biogas and methane gas produced is measured. Measurement of methane gas concentrations using a gas analyzer. The experimental results show that the highest volume of biogas and methane gas produced during fermentation time of 20 days, with a stirring of 14 days, and a starter of 30% which can produce biogas and methane gas respectively of 5,000 ml and 540 ml.