This study aims to develop an inexact two-stage optimization model to gather manure distributed over the southwest Taiwan and convert it into bioenergy. In the method, local optimization of each hauling zone is performed first using a gray mixed-integer programming model. Then, the hauling zones are prioritized by its performance on four gray scenarios. Although the biogas yield and the manure generation rate are ambiguous, one can easily evaluate his opportunity and risk by gray interval, which is a group of values within the lower and upper bounds. The analyses reveal that the biogas yield dominates the profit in this project, and it leads to the failure of the project when the biogas yield is below the level of 0.2 m 3 kg
À1. With the goal of reducing 45% of methane emissions from pig farms, seven hauling zones are required to be developed. The farmers living in these zones from the project get carbon credits ranging from 478 to 3269 ton CO 2eq per year, and the investors own the carbon credits in the range of 3264-11820 ton CO 2eq per year. Through the carbon trading, both the investors and pig farmers are able to make profits by trading their carbon credits.Implications: Biogas recovered from hoggery can be used as a bioenergy source and mitigate the atmospheric greenhouse effect and global warming. This research develops an inexact two-stage optimization model to evaluate the potential of gathering manure for biogas and converting it into bioenergy. The analyses reveal that the biogas yield dominates the profit in this project, and it leads to the failure of the project when the biogas yield is below the level of 0.2 m 3 kg À1 . This study has provided a useful reference for the management of biogas production and carbon trading from hoggery for bioenergy.