In the Kagera region (NW Tanzania) population has rapidly increased like in many other regions in Sub-Sahara Africa. Thus, to feed the growing population, more food of high quality is needed. The situation gets worse, because next to food production biomass is also used for energy generation (i.e. via firewood, charcoal). To increase food and energy supply in a sustainable way nutrient and energy cycles need to be closed by integrating more organic waste into the biomass production. Because such organic materials (including wastewaters) contain considerable amounts of nutrients, it can be potentially used both as organic fertilizer and soil conditioner. Besides, organic wastes contain energy (heat value) and can serve as feedstock for energy generation. To know more about the potential of organic waste being used as fertilizer and feedstock for energy generation, we developed a concept to investigate mass balances of biomass and organic wastes in smallholder farming systems in selected districts in Tanzania. For this purpose, we apply a material flow analysis (MFA) based on mixed data and literature. To the mixed data belongs qualitative and quantitative data from a farm household survey of 150 households, five focus group discussions, and twenty-one in-depth interviews. The resulting flows, stocks and mass balances of nutrients and energy values are modelled with STAN 2.5. The results show specific differences in biomass and organic waste mass balances depending on farming system and farm household typology. Based on these results, farm-specific shortages and surpluses of nutrients and energy contents can be identified and optimized flows modelled. Finally, scenarios of different farm management practices that can help to optimize the productivity of the farming systems are discussed in a policy paper.