What is ending inventory formula ?

The ending inventory formula is calculated as Beginning Inventory + Purchases - Cost of Goods Sold (COGS), helping businesses determine the value of inventory left at the end of an accounting period.