Cost of Goods Sold (COGS) Calculator

Compute COGS for any accounting period — month, quarter, or year. Add your revenue to get gross profit and gross margin in the same view.

Quick answerCOGS = beginning inventory + purchases − ending inventory. Gross profit = revenue − COGS. Gross margin = gross profit ÷ revenue.

Your numbers

Edit any field — results update as you type.

$
$
$
$
Cost of Goods Sold
$36,000.00
62.1% gross margin · $59,000.00 gross profit on $95,000.00 revenue.
COGS
$36,000.00
Gross profit
$59,000.00
Gross margin
62.1%
Sanity check: if ending inventory looks suspiciously high or low, you probably have a count or valuation issue. Walk the shelves before you trust the number on the P&L.

What's in COGS — and what isn't

In: direct materials, direct labor, freight-in, manufacturing overhead allocated to units sold, packaging that ships with the product.

Out: marketing, sales salaries, rent on your office or store, distribution, software subscriptions, professional fees. Those live below gross profit as operating expenses.

Frequently asked

Related calculators

Last updated: 2026-05-14