Cost of goods sold is the direct cost of the products a business sold in a period – materials, merchandise and direct labour, but not overheads such as rent or marketing. It is deducted from revenue to give gross profit.
How to use the COGS Calculator
- Beginning inventory
- Purchases during the period
- Ending inventory
- Revenue for the period
Results update as you type, and every field accepts the units shown in its menu.
How it works
Enter inventory at the start of the period, purchases (including freight-in) during it, inventory at the end and, optionally, revenue.
Tips
- Use figures for the same period (a month, a quarter or a year) for every input so ratios compare like with like.
- Track the metric over time – the trend usually tells you more than a single value.
- Compare your result with industry benchmarks, which vary a lot between sectors.
- Treat the result as a starting point for a decision, then check the assumptions behind each input.
Common mistakes to avoid
- Mixing monthly and yearly numbers in the same calculation.
- Using revenue where the formula needs profit (or the other way round).
- Forgetting hidden costs such as taxes, fees, overheads or your own time.
Inputs explained
| Field | What to enter |
|---|---|
| Beginning inventory | Amount in your currency |
| Purchases during the period | Amount in your currency |
| Ending inventory | Amount in your currency |
| Revenue for the period | Amount in your currency |
What each result means
- Cost of goods sold = [Beginning inventory] + [Purchases during the period] – [Ending inventory]
- Gross profit = [Revenue for the period] – [Cost of goods sold]
- Gross margin = [Gross profit]÷[Revenue for the period]×100
- Inventory turnover = [Cost of goods sold]÷(([Beginning inventory] + [Ending inventory])÷2)
Example values
How the main result changes when Beginning inventory changes and everything else stays at the example values above:
| Beginning inventory | Cost of goods sold |
|---|---|
| 20,000 | 105,000 |
| 30,000 | 115,000 |
| 40,000 | 125,000 |
| 50,000 | 135,000 |
| 60,000 | 145,000 |
| 80,000 | 165,000 |
Formula
COGS = beginning inventory + purchases − ending inventoryGross profit = revenue − COGS; gross margin = gross profit ÷ revenueWorked example
Inputs — Beginning inventory: $40,000; Purchases during the period: $120,000; Ending inventory: $35,000; Revenue for the period: $210,000.
Results — Cost of goods sold = $125,000.00; Gross profit = $85,000.00; Gross margin = 40.48 %; Inventory turnover = 3.33 ×.
Frequently asked questions
What is included in COGS?
Direct materials, merchandise bought for resale, direct labour and freight-in.
Are operating expenses part of COGS?
No – rent, salaries of office staff and marketing are operating expenses.
Why does ending inventory reduce COGS?
Goods still on the shelf haven't been sold, so their cost isn't an expense yet.
What formula does the COGS Calculator use?
COGS = beginning inventory + purchases − ending inventory.