Guide

COGS for Online Sellers: Calculating Cost of Goods Sold Without Guesswork

COGS calculation for ecommerce: the formula, what belongs in it versus operating expenses, how landed cost and valuation methods feed it, and the per-SKU version that drives decisions.

Start free trial

Cost of goods sold is what the units you actually sold cost you, not what you spent on inventory this period, and the distinction is where seller bookkeeping most often goes wrong. Buying $20,000 of stock in March is not $20,000 of March COGS; it is inventory, becoming COGS unit by unit as sales happen. Getting this right is not just tax hygiene: every margin number, pricing floor, and channel decision reads from it.

The formula and its inputs

COGS = beginning inventory + purchases during the period - ending inventory, all at cost. Three inputs, each with its own discipline:

  • Inventory values come from counts you trust: record accuracy and cycle counts are what make the beginning and ending numbers real rather than plugs.
  • Purchases mean landed cost: invoice price plus freight, duty, and inbound handling, the landed-cost math, captured per PO at receiving. Invoice-only purchasing understates COGS and flatters margins.
  • The valuation method decides which cost each sale books: FIFO, weighted average, or specific identification, the methods untangled, chosen once with an accountant, applied consistently.

What belongs in COGS versus operating expenses

In COGS: the cost of the sold units themselves, product cost, inbound freight and duties, prep that makes units sellable (FBA prep counts).

Not in COGS (operating expenses): marketplace fees and payment processing, outbound shipping, ads, software, storage and holding, your labor. They are real costs, on other lines, and mixing them into COGS breaks every comparison your books could power.

The seams to watch: returns restocked reverse their COGS when the unit re-enters inventory sellable; shrinkage and write-offs leave inventory without a sale, booked as their own expense line, not smuggled through COGS; and bundles book component costs per the mapping.

Per-SKU COGS: where decisions live

Business-level COGS closes the books; per-SKU COGS runs the business:

  • True margin per SKU per channel: revenue minus per-unit COGS minus that channel’s fee stack, the number that says where each product actually earns, the mix data with money attached.
  • Floors that mean something: repricing limits and clearance depth computed from real unit costs instead of vibes.
  • Kill decisions with evidence: the ABC tail review armed with true margins finds the SKUs that were never actually profitable after landed cost, the most valuable bad news in the catalog.

The mechanics are light: per-SKU landed cost recorded at receiving, sales quantities from the consolidated order stream, and the multiplication done continuously rather than at year-end.

Common questions

Is inventory I bought but have not sold deductible?

Generally no, it is an asset until sold (jurisdiction nuances exist; the accountant lane). This is exactly why COGS and purchases differ.

How do I compute COGS for products I make?

Materials plus direct production costs per unit, with the same landed-cost logic applied to your inputs, made-to-order capacity models included.

Do marketplace fees ever belong in COGS?

Standard practice books them as selling expenses, not COGS. What matters most is consistency, pick the treatment with your accountant and never toggle it.

What breaks COGS numbers most often?

Missing landed-cost components (freight and duty forgotten), counts that drift (accuracy again), and returns handled without reversing the cost. All three are process fixes, not accounting mysteries.

True costs, live margins

Per-SKU costs and consolidated sales in one place, the raw material of every honest margin number, from $49/month with unlimited orders. See pricing.

Key takeaways

  • COGS = what the units you SOLD cost you - beginning inventory + purchases - ending inventory, at cost.
  • Landed cost per unit is the input; the valuation method (FIFO, weighted average) decides which cost each sale books.
  • Business-level COGS satisfies the accountant; per-SKU COGS drives pricing, channel, and kill decisions.

Ready to list everywhere that matters?

Bring Unifystock to your channels. Multi-channel publishing without the spreadsheets, the developer, or the dashboards.

Start free trial