Cost of Goods Sold (COGS)
From inventory to expense.
Why This Matters
For any business that sells physical goods, Cost of Goods Sold (COGS) is usually the single largest expense on the income statement. It represents the cost of the products that were actually sold during the period — not just produced.
Understanding COGS is crucial for:
- Interpreting gross margin correctly
- Connecting production activity to income statement results
- Reconciling inventory changes with profitability
- Detecting issues like stock build-up, shrinkage, or write-downs
Every dollar of COGS once sat on the balance sheet as inventory. COGS is what happens when manufacturing cost leaves the balance sheet and becomes expense.
The COGS Formula
For a manufacturing company, COGS is derived from the Cost of Goods Manufactured and Finished Goods inventory changes:
MANUFACTURING COGS
Beginning Finished Goods Inventory
+ Cost of Goods Manufactured
− Ending Finished Goods Inventory
= Cost of Goods Sold
For a merchandising (retail/wholesale) company that buys goods rather than makes them, COGS is simpler:
MERCHANDISING COGS
Beginning Merchandise Inventory
+ Purchases
− Ending Merchandise Inventory
= Cost of Goods Sold
In both cases, the logic is the same: starting inventory plus new goods available, minus what remains, equals what was sold.
Example: ABC Coffee Shop
Assume the following for ABC Coffee Shop (annual):
Beginning Finished Goods Inventory: $7,800
Cost of Goods Manufactured (COGM): $99,305
Ending Finished Goods Inventory: ($9,200)
COGS = $7,800 + $99,305 − $9,200 = $97,905
Income Statement (Partial)
Revenue: $170,000
Cost of Goods Sold: ($97,905)
Gross Profit: $72,095
The $97,905 represents the manufacturing cost of cups actually sold. The remaining $9,200 of finished goods stays on the balance sheet as an asset until sold in the next period.
Inventory Roll-Forward and COGS
COGS links directly to the three inventory accounts:
THREE INVENTORY ROLL-FORWARDS
1. RAW MATERIALS INVENTORY
Beg. RM + Purchases − End. RM = Materials Used
2. WIP INVENTORY
Beg. WIP + Total Manufacturing Costs − End. WIP = COGM
3. FINISHED GOODS INVENTORY
Beg. FG + COGM − End. FG = COGS
Raw Materials → (DM Used)
↓
Work in Process → (COGM)
↓
Finished Goods → (COGS)
↓
Income Statement
Three Inventory Roll-Forwards
Raw Materials
Beg + Purch − End = Used
Work in Process
Beg + Mfg Costs − End = COGM
Finished Goods
Beg + COGM − End = COGS
Income Statement
COGS Expense
This flow ensures every dollar spent on production is either sitting in inventory (asset) or has been expensed as COGS.
COGS and Gross Margin
GROSS MARGIN
Gross Margin = Revenue − COGS
Gross Margin % = (Revenue − COGS) ÷ Revenue
ABC: ($170,000 − $97,905) ÷ $170,000 = 42.4% gross margin
If COGS is understated:
- → Gross margin appears too high
- → Profit appears better than reality
If COGS is overstated:
- → Gross margin appears too low
- → Profit looks worse than reality
Common drivers of COGS changes:
- Material price changes
- Labor rate or efficiency changes
- Overhead spending or volume changes
- Inventory write-downs or shrinkage
Inventory Shrinkage and Write-Downs
Not all inventory makes it from production to sale:
- Shrinkage: Theft, spoilage, breakage
- Obsolescence: Products that expire or become unsellable
- Write-downs: Reducing inventory value due to market or condition changes
These losses are often recorded as adjustments to COGS or separate loss lines.
SHRINKAGE EXAMPLE
Inventory count shows $500 less finished goods than records.
Entry:
DR Cost of Goods Sold $500
CR Finished Goods Inventory $500
This increases COGS — gross margin drops accordingly.
COGS vs. Operating Expenses
COGS includes only costs of producing or purchasing the goods sold. It does not include:
- Selling expenses (advertising, sales salaries, commissions)
- General and administrative (office rent, executive salaries)
- Interest expense
- Income taxes
These are operating or non-operating expenses shown below gross profit.
ABC COFFEE SHOP — SIMPLIFIED INCOME STATEMENT
Revenue: $170,000
COGS: ($97,905)
Gross Profit: $72,095
Operating Expenses (SG&A): ($46,000)
Operating Income: $26,095
Interest & Tax: ($4,095)
Net Income: $22,000
COGS and SG&A must be separated correctly for ratios (gross margin %, operating margin %) to be meaningful.
COGS in Merchandising vs. Manufacturing
Key differences:
- Merchandisers have no COGM schedule; they simply buy goods and sell them.
- Manufacturers must build COGS from DM, DL, and MOH via COGM.
RETAIL COFFEE BEAN SHOP (MERCHANDISER)
Beg. inventory: $10,000
+ Purchases: 60,000
− End. inventory: (12,000)
COGS: $58,000
ROASTER/PRODUCER (MANUFACTURER)
Uses COGM schedule first, then:
Beg. FG: $8,000
+ COGM: 70,000
− End. FG: (11,000)
COGS: $67,000
Interactive Tool
Calculate COGS from inventory roll-forwards in manufacturing or merchandising mode, then see gross profit and gross margin update instantly.
COGS Calculator
Toggle between manufacturing and merchandising modes. Pre-filled with ABC Coffee Shop data. Enter inventory roll-forward values and revenue to calculate COGS and gross profit.
Goods Available
$107,105
Beg + COGM
Cost of Goods Sold
$97,905
Available − Ending Inventory
Gross Profit
$72,095
42.4% gross margin
Manufacturing COGS Roll-Forward
Partial Income Statement
Gross Margin % = ($72,095 ÷ $170,000) × 100 = 42.4%
MANUFACTURING COGS
$7,800 + $99,305 − $9,200 = COGS $97,905
Revenue $170,000 − COGS $97,905 = Gross Profit $72,095.00
Every dollar of COGS once sat on the balance sheet as inventory. COGS is manufacturing cost leaving the balance sheet and becoming expense.
Manufacturing Cost Flow Complete
You've now traced manufacturing costs from indirect overhead through to the income statement:
Together these modules explain how indirect costs are accumulated and applied, how total manufacturing cost is summarized, and how those costs ultimately flow into COGS and gross profit.
| Module | Core Concept | # |
|---|---|---|
| Manufacturing Overhead | Definition and components of indirect production costs | #84 |
| Overhead Application | POHR, applied vs. actual overhead, and variances | #85 |
| Cost of Goods Manufactured | Manufacturing cost schedule and WIP reconciliation | #86 |
| Cost of Goods Sold (COGS) | Inventory roll-forward into the income statement | #87 |
Foundation modules: Manufacturing Costs (DM + DL + MOH) and Job Order Costing (tracking costs through WIP by job).
Common Mistakes
Mistake 1: Treating All Purchases as COGS
❌ Wrong
Recording all inventory purchases directly to COGS — overstates COGS when inventory is increasing; understates COGS when inventory is decreasing. Ignores the balance sheet entirely.
✅ Right
Use the inventory roll-forward. COGS reflects only the cost of units actually sold — not all units purchased or produced.
Mistake 2: Ignoring Inventory Changes When Comparing Periods
❌ Wrong
"COGS increased 15% — our cost structure is getting worse." If inventory decreased, some of that COGS is from prior-period production now flowing through the income statement.
✅ Right
Compare COGM and per-unit costs across periods; adjust for inventory changes when analyzing profitability trends.
Key Takeaway
Cost of Goods Sold (COGS) is the cost of the products actually sold during a period. For manufacturers, it is built from the Cost of Goods Manufactured and Finished Goods inventory changes; for merchandisers, from beginning inventory, purchases, and ending inventory. COGS is the bridge between the balance sheet (inventory) and the income statement (expense), and it directly determines gross margin. Accurate COGS requires correctly tracking and valuing inventory, separating production costs from operating expenses, and properly accounting for shrinkage and write-downs.
Test Your Understanding
COGS formula, gross margin, merchandising vs. manufacturing, and operating expenses — check your answers below.
Question 1: Beginning FG = $12,000. COGM = $80,000. Ending FG = $10,000. What is COGS?
Question 2: True or False: Selling and administrative expenses are included in COGS for manufacturers.
Question 3: Revenue = $170,000. COGS = $97,905. What is gross margin percentage?
Question 4: A merchandiser has Beg. inventory $10,000, Purchases $60,000, End. inventory $12,000. What is COGS?
Ready to Practice?
Calculate COGS from inventory roll-forwards, compare manufacturing vs. merchandising modes, and analyze gross margin in the Practice Lab.
Try the Practice LabWhat's Next?
Next up: Budgeting — turn cost knowledge into a forward-looking plan. Start with Budgeting Basics, then the Master Budget, Sales Budget, Cash Budget, and Flexible vs. Static Budgets.
Budgeting Basics
Why and how companies budget
Cost of Goods Manufactured
The manufacturing cost schedule