Calculate your COGS for any period using the standard accounting formula. Add revenue to also see your gross profit and gross margin instantly — no spreadsheet required.
Enter your inventory values for the period. Add revenue to also see gross profit and margin.
Stock on hand at the start of the period
Inventory bought during the period (incl. freight-in)
Stock on hand at the end of the period
Total sales for the period — adds gross profit & margin
Inventory available
$35,000
Beginning + Purchases
Ending inventory
$8,000
Deducted
COGS
$27,000
Cost of goods sold
Revenue
$50,000
For the period
Gross profit
$23,000
Revenue − COGS
Gross margin
46.0%
Profit / Revenue
Interpretation: Your cost of goods sold is $27,000. On revenue of $50,000, that's a gross profit of $23,000 (46.0% margin) — what's left to cover operating expenses, taxes, and profit.
COGS = Beginning Inventory + Purchases − Ending Inventory
Dollar value of all stock on hand at the first day of the period. Pull this from your last balance sheet or your accounting software.
All inventory bought during the period, including freight-in and any direct production costs. Use the net amount after returns and supplier discounts.
Dollar value of stock left on the last day of the period. Best obtained from a physical count or a perpetual inventory system.
A small retailer's Q1 results — using the same numbers shown in the calculator above.
| Beginning inventory (Jan 1) | $10,000 |
| + Purchases during Q1 | $25,000 |
| − Ending inventory (Mar 31) | $8,000 |
| COGS | $10,000 + $25,000 − $8,000 = $27,000 |
With $50,000 in revenue, this retailer's gross profit is $50,000 − $27,000 = $23,000, for a gross margin of 46.0%.
| Revenue | $50,000 |
| − COGS | $27,000 |
| Gross profit (46.0% margin) | $23,000 |
COGS is strictly the direct cost of inventory you sold. Anything else — even if it feels related — is an operating expense and lives below the gross profit line.
Read our complete guide on cost of goods sold, including how it shows up on financial statements, common inventory valuation methods (FIFO, LIFO, weighted-average), and tax implications.
Stop pulling beginning and ending inventory off spreadsheets. StockZip values your stock in real time and gives you the numbers for COGS in one click.
Common questions about scanning, offline mode, pricing, and migration.
COGS includes the direct costs of producing or acquiring the inventory you sold during the period: raw materials, direct labor on the product, freight-in, manufacturing supplies, and inventory storage. It does NOT include marketing, sales salaries, office rent, R&D, shipping to the customer, or general admin — those are operating expenses.