Total Cost of Goods Sold (COGS) Formula is a calculation used to analyze the overall cost of goods sold by a business during an accounting period. It is an important part of any profitability analysis, as it allows you to track expenses and develop insights into how your business functions. The formula is simple: COGS = beginning inventory + purchases – ending inventory. Put simply, this formula measures how much money was spent producing the products sold by a business during a specific period of time. This number can help you understand your margins and make better decisions about pricing products and managing costs.