Skip to content

Free calculator

COGS calculator

Find your cost of goods sold two ways: for a month, quarter or year from your stock counts and purchases, or per unit for a single batch. Add your revenue or price to see gross profit and margin.

Calculate

$

Stock on hand at the start of the period, valued at cost.

$

Stock bought in the period, including inbound freight and duties.

$

Stock left at the end of the period, valued at cost.

$

Net sales for the same period, to see gross profit.

Cost of goods sold

$27,500.00

For the period

Goods available for saleOpening inventory + purchases
$42,000.00
Closing inventory
$14,500.00
Gross profitRevenue − COGS
$22,500.00
Gross margin
45%
COGS as % of revenue
55%

Calculations run in your browser. Nothing you enter is sent or stored.

What cost of goods sold means

Cost of goods sold (COGS) is what the products you sold cost you. It covers the stock itself and the costs of getting it ready to sell, such as inbound shipping, duties and packaging. It does not include running costs like rent, software, marketing or outbound shipping to customers.

COGS matters because it sets your gross profit. Revenue minus COGS is the money left to pay for everything else in the business. If you don't know it, you can't tell whether your prices work.

How the calculator works

COGS for a period uses your stock counts. Enter the value of your inventory at the start of the period, everything you bought during it, and the value left at the end. Stock that is no longer on the shelf was either sold or lost, so it counts as cost of goods sold. Add revenue for the same period to see gross profit and margin.

COGS per unit is for one order or production batch. Enter what you paid for the products, plus inbound shipping, duties and packaging for that batch, and the number of sellable units. Add a selling price to see profit and margin per unit.

Switch between the two modes at the top. Every figure updates as you type.

The COGS formula

FigureFormula
Goods available for saleOpening inventory + purchases
COGS for a periodOpening inventory + purchases − closing inventory
Gross profitRevenue − COGS
Gross marginGross profit ÷ revenue
COGS per unit(Product cost + inbound shipping + duties + packaging) ÷ units

Value inventory at what it cost you, not at your selling price.

Worked examples

For a period: a home goods brand starts the quarter with $12,000 of stock at cost. It buys $30,000 more, including freight, and counts $14,500 left at the end.

  • Goods available for sale: $12,000 + $30,000 = $42,000
  • COGS: $42,000 − $14,500 = $27,500
  • With $50,000 of revenue, gross profit is $22,500, a 45% gross margin. COGS is 55% of revenue.

Per unit: you order 500 mugs. The products cost $2,000, inbound shipping is $350, duties and fees are $150 and packaging is $250.

  • Batch cost: $2,000 + $350 + $150 + $250 = $2,750
  • COGS per unit: $2,750 ÷ 500 = $5.50
  • At a $14.00 selling price, you make $8.50 per mug, a 60.7% gross margin.

Using only the supplier price, each mug would look like it cost $4.00. That $1.50 gap per unit is the most common reason a product earns less than expected.

Common mistakes

  • Leaving out landed costs. Freight, duties and customs fees are part of what a product costs you. The landed cost calculator works them out per unit for imports.
  • Counting stock at retail value. Closing inventory at selling price makes COGS look too small and profit too big.
  • Guessing closing stock. A rough count moves COGS by the full error. Count, or use your inventory records.
  • Mixing periods. Revenue, purchases and stock counts must cover the same dates.
  • Adding overheads. Rent, ads and staff who don't make the product are operating expenses, not COGS.

How you value inventory, and what you include in COGS, can also matter for your accounts and taxes. Check with your accountant for anything you file.

Next steps

Once you know your true unit cost, use the wholesale price calculator or the margin calculator to set prices that hold your margin. If you make products yourself, the handmade pricing calculator adds your time and overhead. When your prices are set, put them in a price list you can send to buyers.

FAQ

COGS calculator FAQ

What is the formula for cost of goods sold?

COGS = opening inventory + purchases − closing inventory. With $12,000 of opening stock, $30,000 of purchases and $14,500 of closing stock, COGS is $27,500.

What is included in COGS?

The cost of the products you sold and the costs to get them ready to sell, such as inbound shipping, duties, packaging and, for makers, materials and production labor. Rent, marketing, software and outbound shipping to customers are usually operating expenses instead.

How do I calculate COGS per unit?

Add up everything you paid for a batch, including product cost, inbound shipping, duties and packaging, then divide by the number of sellable units. A $2,750 batch of 500 units costs $5.50 per unit.

Is COGS the same as cost of sales?

For a business that sells products, the two terms are usually used to mean the same thing. Service businesses more often say cost of sales or cost of revenue.

What is a good COGS percentage?

It depends on your category and sales channel. Wholesale brands need room for the retailer's margin, so they usually need a lower COGS share than brands that only sell direct. Compare your own numbers over time and against your target gross margin.

Turn your prices into a price list

Add your products with wholesale and retail prices and download a clean, category-grouped PDF, or share a link.