Find cost of goods sold (COGS) — the direct cost of the inventory a business actually sold during a period.
How it works
The formula is COGS = beginning inventory + purchases − ending inventory. Starting with $50,000 in inventory, buying $200,000 more, and ending with $40,000 left means $210,000 worth of goods were sold.
What this does not include
This calculates COGS from inventory values directly — it doesn’t break down COGS into its underlying components (raw materials, labor, overhead), which a manufacturing business’s internal accounting would track separately.
How to use this calculator
- Enter beginning inventory value.
- Enter purchases made during the period.
- Enter ending inventory value.
A worked example
Beginning inventory $50,000, purchases $200,000, ending inventory $40,000: COGS = 50,000 + 200,000 − 40,000 = $210,000.
Beginning inventory $10,000, purchases $80,000, ending inventory $15,000: COGS = $75,000.
What the variables mean
| Variable | Meaning |
|---|---|
| Beginning inventory | Inventory value at the start of the period |
| Purchases | New inventory purchased during the period |
| Ending inventory | Inventory value remaining at the end of the period |
Edge cases worth knowing
COGS reflects what was actually sold, not what was bought. Inventory that stayed on the shelf all period isn’t part of cost of goods sold — it’s still counted as ending inventory, and only the difference gets expensed.
A missing beginning inventory makes the calculation impossible, so the calculator declines to show a result without one.
Why does COGS increase when ending inventory decreases?
A lower ending inventory (relative to what you started with plus what you bought) means more inventory left the business as sold goods — the formula is simply accounting for where the inventory went.
Is COGS the same as total operating expenses?
No — COGS covers only the direct cost of the goods sold; other operating expenses like rent, marketing, and administrative salaries are tracked separately and aren’t part of COGS.
Why does COGS matter for gross profit?
Gross profit is revenue minus COGS, making COGS the first and often largest deduction in determining how profitable a company’s core sales actually are before other expenses are considered.