The utilization of various feedstocks of unique characteristics in producing biogas could potentially enhance the application of clean fuel from biomass wastes. Two modelling tools were used to explore biogas production from plant and animal wastes. In this study, corn chaff was inoculated with cow dung digestate using different mixing ratios of substrate/inoculum (S/I) of 1:1, 1:1.55, and 1:3.5 for hydraulic retention time (HRT) of 25, 31, and 37 days as modelled using Central Composite Design (Face Centered Design) to optimize the process and predict the optimal response. The result shows that the mixture ratio of 1:1.55 for 37 days gave a cumulative highest biogas yield of 6.19 L under mesophilic conditions. The model p-value is <0.0001, an indication that the model term is significant. The python coding of the input factors gave the optimal value of 4.71 L, which is similar to the result obtained via CCD. Thus, both CCD (Face Centered Design) and python coding are reliable in the optimization of biogas production as they both predicted the same optimal values and approximately the same highest cumulative biogas yield. The GC-MS characterization of produced biogas revealed that it contains 68% methane and 22.76% CO2. Other constituents present are confirmed by FTIR analysis results. The methane in produced biogas has a flashpoint of -182 °C, which is extremely flammable. This data shows that both CCD and python coding can model biogas production with high accuracy and biogas produced can be used for heating purposes.