Home › Guides

How to calculate COGS (cost of goods sold) for your online store

Updated October 27, 2026 · SellerSheetKit Guides

Cost of goods sold — COGS — is the single number that decides whether your pricing works. Get it wrong and every margin, fee calculation, and tax estimate built on top of it is wrong too. Yet many small sellers either skip it ("my supplies cost about five bucks") or calculate it once and never update it. This guide shows the standard formula, what belongs in COGS for makers and resellers, and how to turn it into a per-unit cost you can price from.

The COGS formula

For a period such as a year, accountants calculate COGS like this:

COGS = Beginning inventory + Purchases during the period − Ending inventory

Example: you start the year with $2,000 of inventory on hand, buy $11,500 more during the year, and count $3,100 left on December 31. Your COGS is $2,000 + $11,500 − $3,100 = $10,400. That is the cost of the goods you actually sold, which is what gets matched against your sales.

The IRS uses the same structure on Schedule C, Part III, for businesses that carry inventory. IRS Publication 334 (Tax Guide for Small Business) explains inventory and cost of goods sold in more detail; small businesses may qualify for simplified inventory methods, so ask a tax professional what applies to you.

What to include in COGS

Include costs that are directly tied to getting a product ready to sell:

What usually does not go in COGS

Keeping these separate lets you see gross margin (product economics) and net margin (business economics) clearly. For the pricing decision, though, you will add everything back together.

Calculating unit cost: two examples

Maker example: a handmade soy candle

You make a batch of 24 candles:

CostBatch total
Soy wax (10 lb)$32.00
Fragrance oil$28.00
Wicks (24)$6.00
Jars and lids (24)$48.00
Labels (24)$7.20
Inbound shipping on supplies$14.00
Total$135.20

Unit COGS = $135.20 ÷ 24 = $5.63 per candle. If a few candles fail quality control, divide by the number of sellable units: with 22 good candles it is $6.15. Waste is a real cost.

Reseller example: imported product

You order 500 phone stands at $2.10 each ($1,050), pay $260 freight and $85 in duties and customs fees, and $40 for poly bags. Landed cost = $1,435 ÷ 500 = $2.87 per unit. Many sellers price off the $2.10 factory price and wonder where their margin went — freight and duties added 37%.

From COGS to price

Once you know unit cost, layer on everything else to find a price that works:

  1. Unit COGS (from above).
  2. Your time, if you are the maker: minutes per unit × your target hourly rate. Even if it is not an accounting COGS item, a price that does not pay you is not sustainable.
  3. Selling fees: see Etsy fees, Shopify costs, or Amazon FBA fees.
  4. Shipping and packaging to the customer, if not fully charged to the buyer.
  5. Ad cost per sale, if you advertise.
  6. Target profit.

A quick check many sellers use: if price is less than about 2.5–3× unit COGS, there may not be enough room left for fees, ads, and profit once you sell through marketplaces. That is a rule of thumb, not a law — high-volume resellers often work on thinner multiples — but it is a useful warning light.

Common COGS mistakes

Why COGS matters for taxes too

COGS reduces your gross profit, which in turn affects the taxable profit you base quarterly estimated tax set-asides on. Accurate COGS means you are neither over-saving nor under-saving.

More seller guides

SellerSheetKit is not affiliated with Etsy, Shopify, or Amazon. Fee figures are summarized from official sources on the date above and can change; verify against your seller account. Educational content only — not tax, legal, or accounting advice.