The official business definition of computing the number of units in ending inventory is the process of determining the total number of items or assets that remain unsold at the close of a given period. This is usually done by subtracting the beginning inventory from the purchases during the period, plus any adjustments for losses or gains due to price changes, returns and allowances, and other factors. By performing this calculation, businesses can get an accurate measure of their existing stock levels to inform future purchasing decisions.