Cost of Goods Sold (COGS) Calculator
Enter your beginning inventory value, purchases made during the period, and ending inventory value to calculate cost of goods sold (COGS) — a key figure for gross profit and tax reporting.
Cost of goods sold
—
Enter your figures to calculate.
How the Cost of Goods Sold (COGS) formula works
The standard COGS formula:
COGS = Beginning inventory + Purchases − Ending inventory
Step-by-step calculation
- Start with the value of inventory on hand at the beginning of the period.
- Add the value of any inventory purchased or produced during the period.
- Subtract the value of inventory remaining at the end of the period.
Worked example
Beginning inventory of $50,000, purchases of $120,000, ending inventory of $35,000: COGS = 50,000 + 120,000 − 35,000 = $135,000.
Frequently asked questions
Why does ending inventory get subtracted?
Inventory still on hand at period end wasn't sold, so its cost hasn't been 'used up' yet — subtracting it isolates the cost of only the goods that were actually sold during the period.
Why does COGS matter for a business?
COGS is subtracted from revenue to calculate gross profit, and it's also a key figure for tax reporting — understating or overstating it directly affects reported profitability.