Cost of Goods Sold (COGS): worked example
| Beginning inventory | $80,000 |
|---|---|
| Purchases during the period | $420,000 |
| Ending inventory | $95,000 |
| Cost of goods sold | $405,000 |
| Goods available for sale | $500,000 |
Cost of Goods Sold (COGS): formula
Common error: Using purchases alone as the cost of sales. Anything still unsold at year end is an asset, and counting it as a cost understates profit.
Beginning inventory is opening stock value. Purchases cover the period and include freight-in. Ending inventory is the closing stock value.
A physical count or perpetual records supply that figure. The method you use to value inventory, such as first-in first-out or average cost, affects the result, so use the method you use for your books and tax return consistently.
Cost of Goods Sold (COGS): changing Beginning inventory
| Beginning inventory | Cost of goods sold | Goods available for sale |
|---|---|---|
| $64,000 | $389,000 | $484,000 |
| $72,000 | $397,000 | $492,000 |
| $80,000 (example) | $405,000 | $500,000 |
| $88,000 | $413,000 | $508,000 |
| $96,000 | $421,000 | $516,000 |
Cost of Goods Sold (COGS): compare input ranges
| Input | Tested from | To | Cost of goods sold: low input | Cost of goods sold: high input | Swing |
|---|---|---|---|---|---|
| Purchases during the period | $378,000 | $462,000 | $363,000 | $447,000 | $84,000 (21%) |
| Ending inventory | $85,500 | $104,500 | $414,500 | $395,500 | $19,000 (4.7%) |
| Beginning inventory | $72,000 | $88,000 | $397,000 | $413,000 | $16,000 (4.0%) |
Cost of Goods Sold (COGS): individual input comparisons
| Input | Value | Cost of goods sold | Goods available for sale |
|---|---|---|---|
| Beginning inventory | $64,000 | $389,000 | $484,000 |
| $72,000 | $397,000 | $492,000 | |
| $80,000 | $405,000 | $500,000 | |
| $88,000 | $413,000 | $508,000 | |
| $96,000 | $421,000 | $516,000 | |
| Purchases during the period | $336,000 | $321,000 | $416,000 |
| $378,000 | $363,000 | $458,000 | |
| $420,000 | $405,000 | $500,000 | |
| $462,000 | $447,000 | $542,000 | |
| $504,000 | $489,000 | $584,000 | |
| Ending inventory | $76,000 | $424,000 | $500,000 |
| $85,500 | $414,500 | $500,000 | |
| $95,000 | $405,000 | $500,000 | |
| $104,500 | $395,500 | $500,000 | |
| $114,000 | $386,000 | $500,000 |
Cost of Goods Sold (COGS): combined input changes
| Beginning inventory / Purchases during the period | $336,000 | $420,000 | $504,000 |
|---|---|---|---|
| $64,000 | $305,000 | $389,000 | $473,000 |
| $72,000 | $313,000 | $397,000 | $481,000 |
| $80,000 | $321,000 | $405,000 | $489,000 |
| $88,000 | $329,000 | $413,000 | $497,000 |
| $96,000 | $337,000 | $421,000 | $505,000 |
Cost of Goods Sold (COGS): which assumptions move the result?
Cost of Goods Sold (COGS): values and definitions
| Quantity and definition | Value used |
|---|---|
| Beginning inventory | $80,000 |
| Purchases during the period | $420,000 |
| Ending inventory | $95,000 |
| Cost of goods sold | $405,000 |
| Goods available for sale | $500,000 |
Cost of Goods Sold (COGS): half and double Purchases during the period
| Purchases during the period | Cost of goods sold |
|---|---|
| $210,000 | $195,000 |
| $420,000 | $405,000 |
| $840,000 | $825,000 |
The formula assumes the ending count is accurate, and errors, shrinkage and theft show up as higher cost of goods sold. Inventory valuation methods differ when prices change, with first-in first-out showing higher profit in inflation and last-in first-out lower. Service businesses do not have inventory, and their direct labor is used instead.
Business Finance calculators: DuPont Analysis Calculator, Employee Turnover Rate Calculator, Net Promoter Score Calculator, Marketing Metrics Calculator, Sum-of-the-Years'-Digits Depreciation Calculator, Units of Production Depreciation Calculator.
Cost of goods sold is the cost of what you sold, not of what you bought. Start with the inventory you had, add what you purchased, and subtract what is still on the shelf. The goods-available-for-sale subtotal is $500,000 in the worked example.
Count the ending inventory at the same valuation method as the beginning. Switching between methods mid-year shifts COGS without any real change in cost.
Use the result in the gross profit and gross margin calculators, and the inventory turnover page to see how fast stock moves. The inventory carrying cost and reorder point calculators help manage stock levels. Do a physical count at least once a year to keep the numbers honest.
What is included in cost of goods sold?
Beginning inventory plus purchases and direct costs, minus ending inventory. It covers materials, direct labor and freight-in, but not selling or administrative expenses.
Why does the ending inventory count matter so much?
Because it is subtracted from goods available for sale, an overcount lowers COGS and raises profit, while an undercount does the opposite.
Which inventory method should I use?
The one you can apply consistently and that your tax rules allow. First-in first-out is common, and switching methods requires IRS approval.