This thesis focus is the production of the renewable energy carrier biogas. Specifically, the production of biogas from farm manure. Agriculture in Norway is the fourth largest contributor to Norway’s emissions of greenhouse gasses, and production of biogas from manure and other wastes has a significant potential to reduce these emissions. The thesis is developed around a case-study considering Vestfold county and the farms with livestock production within the county, and how they can participate in the production of biogas. The thesis considers 50 farms and the main deciding factors when choosing to produce biogas or not: their potential costs/income and the potential reduces GHG-emissions. To find the optimal solutions between those two factors, an optimisation model was developed. The results from the model was an overall summarised economy and reduction of emissions for every farm, as well as for each farm. The model was solved for two scenarios where the farms either use electricity or burning of woodchips to provide the demand for heat at the farm. The model’s initial results showed a great potential of reduction of 474-528 tons CO2-equivalents should all farms choose to follow the model’s recommendations. The initial solution also show that production of biogas can be a source of income. The initial solution resulted in a total income of about 150 000-419 000 NOK summarised for all farms. These results show that production of biogas is both profitable for farms, and a valuable measure to reduce GHG emissions. A sensitivity analysis of the initial results derived from the model showed that an optimisation model can be a valuable decision-making tool when looking at a given number of farms in a given area, and give insight to the potential gains should the choices be implemented. However, there is still uncertainties surrounding the data in the model, and some of the calculations. These factors must be processed and quality assured before the model can be taken seriously. Se oppgaven under "relevante dokumenter". Les også artikkelen publisert i Sustainability basert på masteroppgaven.