COGS Calculator (Cost of Goods Sold)
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter the inventory at the start and end of the period and what you bought in between to find the cost of goods sold, then add sales to see gross profit.
Result
Cost of goods sold
Gross profit ($)
- Gross margin
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Beginning inventory, in dollars: enter 0 or more.
- Purchases during the period, in dollars: enter 0 or more.
- Ending inventory, in dollars: enter 0 or more.
- Net sales for the period, in dollars: enter 0 or more.
- Read the result: Cost of goods sold; the panel also shows Gross profit ($) and Gross margin.
How this calculator works
Cost of goods sold = beginning inventory + purchases − ending inventory (the periodic inventory method). Purchases include freight-in and other costs of getting goods ready for sale.
Gross profit = net sales − COGS, and gross margin = gross profit ÷ net sales × 100.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Beginning inventory | $ | |
| Purchases during the period | $ | |
| Ending inventory | $ | |
| Cost of goods sold | $ |
Worked example
| Beginning inventory | $50,000 |
|---|---|
| Purchases during the period | $120,000 |
| Ending inventory | $40,000 |
| Net sales for the period | $250,000 |
| Gross profit ($) | $120,000 |
|---|---|
| Gross margin | 48% |
Cost of goods sold $130,000
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is COGS with $50,000 opening stock, $120,000 of purchases and $40,000 closing stock?
$130,000. On $250,000 of sales that leaves $120,000 of gross profit, a 48% gross margin.
Are wages part of COGS?
Only direct labor that goes into making the product. Sales, office and administrative wages are operating expenses.