Definition
Cost of goods sold (COGS) is the cost of the inventory a business sold during a period, including purchase or production cost and the costs of bringing goods to a saleable condition, such as freight in. It is calculated as opening inventory plus purchases minus closing inventory and is deducted from revenue to give gross profit.
How it works
COGS includes the purchase price net of discounts, import duties, inbound freight and, for manufacturers, direct materials, direct labour and production overhead. It excludes selling costs, administrative salaries and outbound shipping, which are operating expenses.
The cost formula changes COGS when prices move. Under FIFO the oldest costs are expensed first; under the weighted average cost method every unit sold carries the average. In a perpetual system such as Ledgeriano's inventory module, COGS is posted automatically with each delivery, so the inventory guide and the ledger always agree.
Formula
COGS = Opening inventory + Purchases - Closing inventory
Gross profit = Revenue - COGS
Example: COGS for a quarter
A retailer starts the quarter with inventory of 20,000, buys goods for 65,000 including inbound freight, and counts 15,000 of stock at quarter end. COGS is 20,000 + 65,000 - 15,000 = 70,000. With sales of 110,000, gross profit is 40,000.
| Line | Amount |
|---|---|
| Opening inventory | 20,000 |
| Plus purchases | 65,000 |
| Goods available for sale | 85,000 |
| Less closing inventory | 15,000 |
| Cost of goods sold | 70,000 |