Nitrogen balance in agroecosystems provides a quantitative framework of N inputs and outputs and retention in the soil that examines the sustainability of agricultural productivity and soil and environmental quality. Nitrogen inputs include N additions from manures and fertilizers, atmospheric depositions including wet and dry depositions, irrigation water, and biological N fixation. Nitrogen outputs include N removal in crop grain and biomass and N losses through leaching, denitrification, volatilization, surface runoff, erosion, gas emissions, and plant senescence. Nitrogen balance, which is the difference between N inputs and outputs, can be reflected in changes in soil total (organic + inorganic) N during the course of the experiment duration due to N immobilization and mineralization. While increased soil N retention and mineralization can enhance crop yields and decrease N fertilization rate, reduced N losses through N leaching and gas emissions (primarily NH4 and NOx emissions, out of which N2O is a potent greenhouse gas) can improve water and air quality.This paper discusses measurements and estimations (for non-measurable parameters due to complexity) of all inputs and outputs of N as well as changes in soil N storage during the course of the experiment to calculate N balance.The method shows N flows, retention in the soil, and losses to the environment from agroecosystems.The method can be used to measure agroecosystem performance and soil and environmental quality from agricultural practices.