Commerce operations
COGS (cost of goods sold)
COGS is the direct cost of the products sold in a period — typically unit cost plus inbound freight and duties — excluding marketing, overhead and outbound shipping.
For accurate margin reporting COGS must be tracked at variant level, not product level. Sizes and configurations of the same product frequently differ in cost, and a product-level average silently misprices the mix.
It also needs to be time-anchored. Landed cost changes with each purchase order, and applying today's cost to last quarter's orders produces margin history that never happened.
The version that catches people out is a freight spike. If a shipment arrives at double the usual freight cost and the system stores one current cost per variant, restating it retroactively rewrites every historical order at the new figure — so last quarter's margin drops for reasons that had nothing to do with last quarter. Costs need to be versioned with effective dates, and orders need to hold the cost that applied when they shipped.
What belongs in COGS, and what does not
The boundary that matters operationally is between the cost of having the unit ready to sell and the cost of getting it to the customer. Everything on the first side is COGS; everything on the second is fulfilment, and mixing them makes it impossible to tell a sourcing problem from a shipping problem.
Accountants may draw the line differently under full absorption costing, where a share of warehouse overhead is capitalised into inventory. That is a valid financial-statement treatment and a poor operating one, because it makes per-order margin depend on how busy the warehouse was. The table below is the operating view — the one that has to be right for pricing and acquisition decisions.
| Cost | In COGS? | Why |
|---|---|---|
| Unit cost from the manufacturer | Yes | The base of landed cost |
| Inbound freight to your warehouse | Yes | Incurred to get sellable stock in place |
| Duties, tariffs and customs brokerage | Yes | Same reason, and often the most volatile line |
| Retail packaging (box, bottle, label) | Yes | It is part of the product the customer receives |
| Shipping carton, dunnage, packing slip | No | Fulfilment — consumed by the shipment, not the product |
| Pick and pack fee | No | Fulfilment |
| Outbound postage | No | Fulfilment |
| Storage at the warehouse or 3PL | No | Scales with inventory held, not with units sold |
| Payment processing | No | A cost of collecting money, not of making product |
| Marketing, influencer seeding, agency fees | No | Acquisition cost, compared against margin rather than inside it |
| A returned unit graded unsellable | Yes | Its landed cost is written off against the period |
| Gift with purchase or free sample units | Yes | The unit cost is real; it just attaches to a different order |
Landed cost is per shipment, not per SKU
The number that belongs in COGS is landed cost: what one sellable unit cost to have standing in your warehouse. It is computed per purchase order, because freight and duty are charged per shipment and then allocated across the units in it.
Take an example purchase order: 5,000 units at a $4.20 invoice price is $21,000 of goods, plus $3,400 of ocean freight and drayage, plus duty at 7.5% of the declared $21,000 which is $1,575, plus $250 of customs brokerage. The total is $26,225, so landed cost is $26,225 / 5,000 = $5.245 per unit — 24.9% above the invoice price a brand quoting "my cost is $4.20" would use.
Now repeat the same order with freight at $6,800 instead of $3,400, which is an ordinary swing in a bad quarter. Total becomes $29,625 and landed cost becomes $5.925 — 13.0% above the previous purchase order, on a SKU whose factory price did not move at all. At an unchanged retail price, $0.68 of margin per unit vanished for reasons entirely outside the product.
This is why landed cost is stored against the receipt rather than against the SKU. One SKU can have several live landed costs at once, one per batch still in stock, and which one applies depends on the costing method — FIFO, weighted average or specific identification. Pick one and apply it consistently; switching methods mid-year produces a margin trend that is an artifact of the change.
The variant-level trap, with the arithmetic
Costs are held per variant because they differ per variant. A larger size uses more material, a different colourway can carry a different dye cost, and a bundle SKU has no cost of its own at all until its components are rolled up.
Consider an example tee: sizes S, M and L cost $6.00 landed, XXL costs $7.80. In a month selling 300 S, 500 M, 400 L and 200 XXL, true cost is (1,200 x $6.00) + (200 x $7.80) = $7,200 + $1,560 = $8,760 across 1,400 units, a blended $6.257. Store that single blended figure at product level and the monthly total is correct, which is exactly why the error survives.
It is wrong on every individual order. Each XXL order understates cost by $1.54 and each S, M or L order overstates it by $0.26, so per-variant profitability — the thing you would use to decide what to reorder — is inverted for the size that costs the most.
Then the mix moves. If XXL grows to 500 of the same 1,400 units, true cost is (900 x $6.00) + (500 x $7.80) = $5,400 + $3,900 = $9,300, while the stored blended cost still reports 1,400 x $6.257 = $8,760. The month overstates margin by $540, and nothing in the system flags it, because the figure was accurate when it was written.
Cost has to be versioned and the order has to keep a copy
Two rules follow from everything above, and they are the ones most systems get wrong. First, cost records carry effective dates rather than being overwritten. Second, an order snapshots the cost that applied when it shipped and never asks the cost table again.
Without the snapshot, historical margin is not a history — it is a simulation re-run against today's prices every time somebody opens the report. A freight spike in March silently rewrites January, a supplier renegotiation in July makes last year look better than it was, and nobody can reconcile a margin figure with the one they screenshotted a month ago.
The same discipline applies to renewal and subscription orders, which are frequently created by a billing job rather than by a checkout and can be written without a cost attached at all. An order with no COGS reports 100% margin, so a growing subscription base makes blended margin improve on a chart while it is flat or falling in reality.
Frequently asked questions
- What is COGS?
- COGS, or cost of goods sold, is the direct cost of the products a business sold in a period. For a DTC brand that means the landed cost of each unit shipped: the manufacturer price plus inbound freight, duties and customs charges, plus any packaging that forms part of the product itself. Marketing, overhead and outbound shipping are excluded.
- Is shipping included in COGS?
- Inbound shipping is, outbound shipping is not. Freight that brings stock from the supplier to your warehouse is part of landed cost and belongs in COGS. Postage that carries the parcel from your warehouse to the customer is a fulfilment cost, deducted after COGS when calculating contribution margin. Conflating the two makes a sourcing problem look like a shipping problem.
- What is landed cost?
- Landed cost is what one sellable unit cost to have standing in your warehouse: the invoice price plus inbound freight, duties, tariffs and brokerage, allocated across the units in that shipment. It is computed per purchase order because freight and duty are charged per shipment, so the same SKU can carry different landed costs across batches.
- Should COGS be tracked per variant or per product?
- Per variant. Sizes, colourways and configurations of the same product frequently differ in cost, and a product-level average is correct in aggregate while being wrong on every individual order. It also decays silently: when the sales mix shifts towards the more expensive variant, the stored average keeps reporting the old blend and margin is overstated.
- Does COGS include payment processing fees?
- No. Payment processing is a cost of collecting money, not of producing or acquiring the product, so it sits below COGS as a variable cost in contribution margin. It matters just as much to per-order economics, but keeping it separate is what lets you tell a supplier price rise apart from a change in payment mix.
- How do you handle COGS when supplier prices change?
- Version the cost with an effective date instead of overwriting it, and store the applicable cost on each order at the moment it ships. Overwriting means every historical margin report is recalculated at today's price, so a freight spike this month retroactively rewrites last quarter's margin for reasons that had nothing to do with last quarter.