Cost of goods sold (COGS) equals beginning inventory plus purchases minus ending inventory. It is the cost of the goods you actually sold during the period — not the cost of everything you bought, and not the cost of what is still on the shelf. On the income statement, COGS is deducted from sales revenue to arrive at gross profit.
The formula works backward from what is left. Beginning inventory plus purchases gives the cost of goods available for sale — every dollar of inventory the company could have sold this period. Whatever is not on hand at the end must have gone out the door, so subtracting ending inventory leaves the cost of what was sold.
COGS = Beginning inventory + Purchases − Ending inventory
COGS — Cost of goods sold — the cost of the inventory actually sold during the period, reported as the first expense on the income statement
Beginning inventory — Cost of inventory on hand at the start of the period; always identical to the prior period's ending inventory
Purchases — Net cost of inventory bought during the period: invoice cost plus freight-in, minus purchase returns, allowances, and discounts
Ending inventory — Cost of inventory still on hand at period end, usually set by a physical count; reported as a current asset on the balance sheet
COGS holds only the direct costs of the products that were sold. Everything spent to run the business around those products — selling, marketing, administration — stays out and lands in operating expenses instead. This classification line is what exam questions test most often.
Costs that belong in COGS:
Costs that never belong in COGS:
The freight pair deserves a second look, since it trips up more students than any other line. Freight-in attaches to the inventory and flows through the formula into COGS. Freight-out is a period cost, expensed under operating expenses in the period it happens, no matter when the goods sell.
One last distinction. The formula gives the structure of the computation; a costing method such as FIFO, LIFO, or weighted average decides which dollar amounts get assigned to ending inventory and to the units sold.
| Line | Amount |
|---|---|
| Beginning inventory (January 1) | $18,750 |
| Add: Purchases | $42,300 |
| Add: Freight-in | $1,140 |
| Cost of goods available for sale | $62,190 |
| Less: Ending inventory (December 31 count) | ($16,425) |
| Cost of goods sold | $45,765 |
Read the schedule from the top. Harbor Trail started the year with $18,750 of gear at cost, bought $42,300 more, and paid $1,140 to have it shipped in, so it had $62,190 of goods available for sale. The December 31 count found $16,425 still on the shelves. The other $45,765 must have been sold, and that is the cost of goods sold.
Gross profit follows directly. Harbor Trail's sales revenue for the year was $78,900.
| Line | Amount |
|---|---|
| Sales revenue | $78,900 |
| Less: Cost of goods sold | ($45,765) |
| Gross profit | $33,135 |
Inventory is a balance-sheet asset. Cost of goods sold is an income-statement expense. The ending-inventory count connects them: the same $16,425 that sits on Harbor Trail's balance sheet as a current asset is the number subtracted in the COGS formula. Inventory is one of the few places where a single figure sets values on both statements at once, which is why the accounting equation stays balanced only if the count is right.
That link is a favorite exam trap. Suppose Harbor Trail miscounts and records ending inventory at $18,425 instead of $16,425 — overstated by $2,000. Goods available for sale is still $62,190, so COGS comes out at $43,765 instead of $45,765. COGS is understated by $2,000, gross profit climbs from $33,135 to $35,135, and net income is overstated by exactly the amount of the error. The logic is mechanical: the more you claim is still on the shelf, the less you appear to have sold.
The error does not stay in one period either. This year's ending inventory becomes next year's beginning inventory, so next year starts $2,000 too high, its COGS is overstated by $2,000, and its income is understated by $2,000. Over the two years the error counterbalances — but each year's statements, taken alone, are wrong.
Treating purchases as the expense. Buying inventory is not an expense; it is swapping one asset (cash) for another (inventory). The expense happens when the goods sell. Harbor Trail added $43,440 of gear and freight during the year but expensed $45,765, because it also sold down $2,325 of the inventory it started the year with ($43,440 + $2,325 = $45,765). Purchases and COGS only match when inventory levels happen to end where they began.
Reversing the direction of inventory errors. Under time pressure, students flip the effect and answer that overstated ending inventory overstates COGS. Do not memorize it — work the subtraction. A bigger number subtracted from the same goods available for sale gives a smaller COGS, and a smaller expense gives a bigger income. Overstated ending inventory always means understated COGS and overstated net income in that period, with the reverse effect the following year.
Computing COGS for a service company. A tutoring firm or a law office sells no goods, holds no merchandise inventory, and reports no cost of goods sold. Its salaries, rent, and software are operating expenses. Some service companies report a similar line called cost of services or cost of revenue, but there is no inventory formula behind it — if a problem gives you a consulting firm and asks for COGS, the answer is that there is none.
COGS = beginning inventory + purchases − ending inventory: everything you could have sold, minus what is left, is what was sold. Because the ending-inventory count sets both the balance-sheet asset and the income-statement expense, an overstated count understates COGS and overstates net income by the same amount.
Add beginning inventory to net purchases (including freight-in), then subtract ending inventory. In the example above: $18,750 beginning inventory + $43,440 of purchases and freight-in − $16,425 ending inventory = $45,765 cost of goods sold.
Yes. COGS is usually the largest single expense on a merchandiser's income statement, and it appears first, directly below sales revenue. It follows the matching principle: the cost of the goods is expensed in the same period as the revenue those goods produced.
The direct costs of the products sold: the purchase cost of merchandise (or raw materials, direct labor, and manufacturing overhead for a manufacturer) plus freight-in, net of purchase returns and discounts. Selling and administrative costs — advertising, sales commissions, office rent, freight-out — are excluded.
COGS covers the direct cost of the goods sold and is deducted from revenue to compute gross profit. Operating expenses cover running the business — selling, general, and administrative costs — and are deducted after gross profit. A store's cost of the shirts it sold is COGS; the cashier's wages and the ad budget are operating expenses.
Only on the income statement, immediately below sales revenue. It never appears on the balance sheet, but it is computed from two balance-sheet figures: beginning and ending inventory. That is the link that makes inventory errors flow through to net income.
No. Service companies hold no merchandise inventory, so the formula does not apply and their income statements show no COGS line. Costs of delivering the service are operating expenses, though some firms present a comparable line labeled cost of services or cost of revenue.