Ecommerce operations glossary

What is COGS (Cost of Goods Sold)?

Also called Cost of goods sold, Cost of sales

COGS, or cost of goods sold, is what the products you sold in a period cost you: their purchase price plus the freight, duty and other costs of getting them ready to sell. It is subtracted from revenue to get gross profit, and it counts only units that sold, not stock still on the shelf.

Worked example

The periodic formula works from three numbers your books already have:

COGS = opening inventory + purchases − closing inventory

Amount
Opening inventory$40,000
Purchases, at landed cost$65,000
Closing inventory$45,000
COGS$60,000

With $150,000 of revenue, gross profit is $150,000 − $60,000 = $90,000, a 60% gross margin.

Periodic and per order

The formula above gives one number for the period and depends on an accurate closing count. Recording cost on each order as it ships gives the same total over time, plus the cost of every order and product, so you can see which products earn their margin and which do not.

What goes in it

Purchase price, inbound freight, duty, brokerage and other costs of bringing stock in belong in COGS once the units sell. Outbound shipping to customers, marketplace fees and ad spend are costs of selling, and most businesses report them below gross profit. Whichever lines you choose, keep them the same every month so margins compare.

Questions

How do I post cost of goods sold to Xero from my inventory system?

Post COGS from the unit costs of what actually shipped, not as a flat percentage of sales. Most brands post it as journals by day or by period, matched to the sales they belong to, with inventory reduced by the same amount. SKU.io records COGS on each shipment as it is fulfilled, by taking the oldest FIFO cost layers for the units that left the warehouse, and keeps that in its own ledger, which it syncs to Xero or QuickBooks Online.

Why not post COGS as a percentage of sales?

Because a flat percentage hides the products that lose money and drifts from your real inventory value every month. When costs change between shipments, the percentage is wrong for some products in both directions, and the books stop matching the stock.

More terms: Accounting

Updated · All terms

Ready to see SKU.io in action?

Bring your real numbers and the messy questions — we'll walk the system against an operation like yours, not a slide deck.

Book a Demo

Founder-led demo · 2-day onboarding · no onboarding fees