Cost of Goods Sold Calculator
Tracking What Inventory Actually Cost to Sell
Cost of Goods Sold isn't simply what a business spent on inventory during a period — it's what left the shelves and turned into revenue. The distinction matters: a company can buy a large batch of stock in December that mostly sits unsold at year-end, and that unsold portion shouldn't count as an expense yet. COGS isolates the piece that actually matches this period's sales.
The Formula
COGS = Beginning Inventory + Purchases − Ending Inventory
A Worked Example
| Item | Amount |
|---|---|
| Beginning Inventory | $80,000 |
| + Purchases | $350,000 |
| − Ending Inventory | $95,000 |
| Cost of Goods Sold | $335,000 |
Where This Calculation Matters
- Gross profit and margin — COGS is the direct input for gross profit and gross margin, making it the first cost figure to get right on the income statement.
- Tax reporting — COGS is deductible from revenue for tax purposes, so an inaccurate figure directly distorts taxable income.
- Inventory management — tracking COGS alongside purchase volume over time helps flag shrinkage, spoilage, or theft when the numbers don't reconcile as expected.
- Period-over-period comparison — watching COGS as a share of revenue over successive periods is one of the fastest ways to catch rising supplier costs before they erode margins further downstream.
Note: This formula assumes a periodic inventory system with a single valuation method applied consistently. Businesses using FIFO, LIFO, or weighted-average costing should keep the same method across periods for the beginning and ending inventory figures to remain comparable.
How to Use This Calculator
- Enter Beginning Inventory for the period.
- Enter Purchases made during the period.
- Enter Ending Inventory at the close of the period.
- Select Calculate to see Cost of Goods Sold.
Related Calculations
Feed this result into the Break-Even Point Calculator, or check how long it takes to pay suppliers with the Accounts Payable Days Calculator.