Cost of goods sold shows up on every profit & loss statement, and it’s one of the most important numbers for understanding how a business is really performing.
What is cost of goods sold?
Cost of goods sold (COGS) is the direct cost of the inventory a business actually sold during a given period. For a retail or wholesale business, that generally means the purchase cost of the products sold. For a manufacturer, it also includes materials and direct production costs.
COGS does not include indirect costs like rent, salaries, marketing or utilities; those are operating expenses, accounted for separately.
The COGS formula
The standard formula is:
Opening Stock + Purchases − Closing Stock = Cost of Goods Sold
- Opening stock is the value of inventory on hand at the start of the period.
- Purchases is the value of inventory bought during the period.
- Closing stock is the value of inventory still on hand at the end of the period.
This formula isolates the cost of what was actually sold, rather than everything that was purchased, since some of what was bought may still be sitting in inventory unsold.
A simple example
Say a business starts the month with AED 20,000 of opening stock, purchases AED 15,000 of additional stock during the month, and ends the month with AED 12,000 of closing stock.
COGS = AED 20,000 + AED 15,000 − AED 12,000 = AED 23,000
That AED 23,000 is the cost of the inventory sold during the month, and it’s what gets subtracted from revenue to calculate gross profit.
COGS and gross profit
Once you have COGS, calculating gross profit is straightforward:
Revenue − Cost of Goods Sold = Gross Profit
Gross profit shows how much a business earns from its core buying-and-selling activity, before overhead costs like rent and salaries are factored in. A shrinking gross profit, even with stable revenue, is often a sign that supplier costs are rising, pricing needs review, or stock losses are creeping in.
COGS and your inventory costing method
The inventory costing method a business uses, FIFO, average cost, or last purchase cost, directly affects the COGS figure, because it determines which purchase price is applied to the stock that was sold. See our guide on inventory costing methods for a full comparison.
Keeping COGS accurate
A few habits keep COGS reliable:
- Keep purchase records accurate and up to date.
- Reconcile physical stock counts against recorded stock levels regularly.
- Apply your chosen costing method consistently.
- Investigate unexpected stock adjustments or shrinkage promptly.
How MySale App fits in
MySale App and MySaleBooks calculate cost of goods sold automatically as sales happen, using your chosen inventory costing method, with real-time inventory valuation and profit & loss reporting built in. See pricing plans or Features for more.