Cost of goods sold is the single input that determines whether every other profitability number in your business is true. Get it wrong and gross margin, contribution, product ranking, break-even ROAS and the budget you set from them are all wrong by the same amount, in the same direction, invisibly.
It is also the number most often filled in with the supplier's unit price and left there.
What belongs in COGS
The test is whether the cost is incurred because that unit exists. If selling one more unit creates the cost, it is cost of goods.
- Unit purchase price — what the supplier invoices.
- Inbound freight — getting it from the factory to your warehouse, per unit.
- Duties and import taxes — non-recoverable ones.
- Inspection, rework and packaging done before sale.
- Defect loss — if 1,000 units arrive and 40 are unsellable, the whole cost is carried by the 960 you can actually sell.
What does not
- Advertising. It is an acquisition cost. Folding it into COGS makes gross margin move whenever you change media spend, which destroys the one metric that should be stable.
- Outbound shipping to the customer. Genuinely variable, but it belongs in contribution, not in the cost of the goods.
- Payment processing fees. Variable, tied to the transaction rather than the unit — again contribution.
- Warehousing, salaries, software, rent. Operating expenses. They exist whether or not the unit sells.
The distinction is not pedantry. Gross margin is supposed to answer "is this product fundamentally viable", and it can only do that if it is insulated from decisions about how hard you are advertising this month.
Landed cost, per good unit
Purchase price $12,000 (1,000 units)
+ Inbound freight $1,400
+ Duty $960
= Total landed cost $14,360
Good units received 960 (40 defective)
Landed unit cost = $14,360 ÷ 960 = $14.96
Two things in that calculation are routinely skipped, and both push cost down and margin up:
- Freight and duty are often left out because they arrive as a separate invoice weeks later. Here they add $2.46 per unit — on a $12 supplier price that is a fifth of the cost.
- Defects are divided across the units you can sell, not the units that arrived. Dividing by 1,000 instead of 960 gives $14.36 and quietly loses $0.60 a unit.
Variant cost is not an optional refinement
A catalogue-level average cost moves profit between variants. A size run rarely costs the same across every size; a colourway with a different treatment does not either. Averaging makes the cheap variants look less profitable than they are and the expensive ones look better, which is exactly backwards for a decision about what to reorder.
Where a variant has its own landed cost, use it. Where it does not, falling back to the product-level cost is reasonable — partial cost data producing usable numbers is better than blanks — as long as you know which SKUs are on the fallback.
Which cost, when the price changes
You will eventually hold two batches of the same SKU bought at different prices. There are three defensible answers and one indefensible one:
- Weighted average — simple, stable, and what most ecommerce businesses should use.
- FIFO — matches physical flow for perishables and fashion.
- Latest cost — most useful for forward-looking pricing decisions, because it reflects what a replacement actually costs today.
- Whichever the spreadsheet happened to contain — the indefensible one, and the most common.
Any of the first three is fine. What matters is picking one, applying it everywhere, and knowing which you picked — a margin trend where the costing method changed halfway through is not a trend.
Returns, and where they belong
A returned unit should not carry COGS as a cost of sale, because it was not sold. The cleanest treatment is for returned units never to enter revenue or COGS at all — then gross margin is computed on what actually stayed sold, and the additional costs of the return (shipping both ways, handling, any loss on resale) sit in contribution where they belong.
The common alternative — counting the sale, then subtracting the refund as an expense — produces a gross margin that is too high and an expense line that hides the real return cost inside it.
The signals that your COGS is wrong
- Gross margin that moves when ad spend moves. Something acquisition-related is in your cost of goods.
- A product at 100% margin. It has no cost recorded, and it is inflating every aggregate it appears in.
- Margins that look better than the bank balance. Usually freight, duty or defects.
- Every variant at the same cost in a catalogue where the supplier invoices differ.
How ORVX uses it
Cost is held per product and, where it exists, per variant, and ORVX computes COGS as delivered units × landed unit cost — delivered, so returned units never carry a cost of sale. Products with no cost recorded are flagged rather than silently reported at full margin, because a catalogue where a quarter of the SKUs have no cost produces a gross margin that is confidently wrong.
Landed cost changes, and margin trends have to survive it
Supplier prices move, freight rates move a great deal, and duty changes with policy. A landed unit cost is therefore a figure with a date attached, not a constant — and the most common reporting error is to apply today's cost to last year's sales.
Recalculating history with the current cost makes an old month look more or less profitable than it actually was, which quietly rewrites your own record of what worked. A margin trend computed that way is measuring your supplier's pricing, not your business.
The discipline is to hold the cost that applied when the unit sold, and to keep a separate view of what a replacement costs now. The first tells you what happened; the second tells you what to charge next.
Frequently asked questions
Does shipping to the customer go in COGS?
No. Outbound shipping is genuinely variable but it is a cost of fulfilling an order, not a cost of the goods. Keeping it out is what lets gross margin answer "is this product fundamentally viable" without moving every time a carrier rate changes. It belongs in contribution, immediately below gross profit.
How do defects change the calculation?
They change the divisor, not the numerator. If 1,000 units arrive and 40 are unsellable, the entire landed cost is carried by the 960 you can sell. Dividing by 1,000 understates unit cost by about 4% and overstates every margin built on it by the same amount.
Average cost, FIFO or latest cost?
Weighted average suits most ecommerce businesses; FIFO matches physical flow for perishables and fashion; latest cost is the most useful input for forward pricing because it reflects what a replacement costs today. Any of the three is defensible. Changing halfway through a period without saying so is not — the resulting margin trend is an artefact of the method, not of the business.
How do I know my COGS is wrong?
Three signals. Gross margin that moves when ad spend moves means something acquisition-related is in your cost of goods. A product showing 100% margin has no cost recorded and is inflating every aggregate it appears in. And margins that look consistently better than the bank balance usually mean freight, duty or defects are missing.