Cost of Goods Sold

Cost of goods sold (COGS) is the direct cost of the inventory a business sold during a period, typically including product cost, inbound freight, duties, and other landed costs, but not outbound shipping or marketing.

A shopping bag of goods sold equals a stack of coins, the cost of those goods.

Why it matters for ecommerce brands

COGS is the base for gross margin, inventory turnover, and GMROI, so an error here flows into every product decision. The most common mistake for ecommerce brands is leaving inbound freight and duties out, which makes margins look better than they are. Use landed cost, not factory cost. For example, $120,000 of beginning inventory plus $300,000 of purchases at landed cost, minus $140,000 of ending inventory, gives $280,000 of COGS. Accurate counts at period end matter, since ending inventory directly changes the result.

Formula and calculator

COGS = beginning inventory + purchases (at landed cost) − ending inventory

Try your own numbers

$
$
$

COGS = $280,000

Common questions

Is shipping included in cost of goods sold?
Inbound freight to get inventory to your warehouse is usually capitalized into inventory and flows into COGS. Outbound shipping to customers is often reported separately as a fulfillment or selling expense, though policies vary, so apply one rule consistently.
How do you calculate COGS?
Add beginning inventory and purchases at landed cost, then subtract ending inventory. $120,000 + $300,000 − $140,000 gives $280,000.
Are 3PL fees part of COGS?
It depends on accounting policy. Many brands report pick and pack and storage as fulfillment expenses below gross margin, while some include them in COGS. Pick one approach and apply it consistently.