Blog

Shopify Cost of Goods Sold: Set Cost per Item to Your Real Landed Cost

By the LandedCostSKU team · updated 2026-11-15 · 6 min read

Shopify's profit reports are only as good as the one field they start from. This is what that field does, what it does not do, and how to feed it a number that includes the freight, duty and fees your imports actually carried.

How Shopify gets to COGS

Every variant has a Cost per item. When an order is created, Shopify copies the cost in force at that moment onto the order line. Profit reports then compute, per product or variant:

Gross profit  = net sales − cost
Gross margin  = (net sales − cost) ÷ net sales × 100

The product page shows a simpler projected margin, (price − cost) ÷ price, unless your prices include tax, in which case it hides it (your margin then depends on the buyer's tax rate).

Three consequences follow:

  1. It is one number. There is no cost history, no layers, no average being maintained for you. Whatever you last typed is the cost of every unit, including the ones you bought at a different price last spring.
  2. It is snapshotted. Change the cost today and yesterday's orders keep yesterday's cost. That protects your historical reports — and means a late correction never reaches orders already placed.
  3. It is whatever you enter. Shopify's own guidance describes it as the price you paid the manufacturer, excluding shipping and other costs. Receiving a purchase order in the admin does not touch it.

So if you import, the field is wrong by exactly your freight, duty, brokerage, insurance, agent commission and domestic leg — unless you allocate those into it.

What "real landed cost" means per variant

Landed cost is the supplier price plus each unit's share of every bill on the shipment, in your store currency at the rates you actually paid. The share depends on the bill: duty follows value, LCL freight follows volume, a broker's flat fee follows units. For a worked example with six bills, see the landed cost calculator article. For the one-SKU case, the COGS calculator.

If you already hold stock of the variant, the number to write is not this receipt's landed unit but the moving average: (on hand × old cost + received × landed unit) ÷ (on hand + received). That is what Stocky used to maintain; since it closed in August 2026, nothing in Shopify does.

Setting it safely by CSV

The bulk editor works for a handful of variants. For a receipt of thirty, a product CSV import is the tool — with three rules that matter:

  • Updating products needs URL handle and Title. Updating anything at variant level — SKU, Cost per item — also needs Option1 name and Option1 value, or Shopify replaces your variants with a single default one.
  • A column that is present but blank clears the store value. Leave columns out rather than empty.
  • Tick Overwrite products with matching handles on import.

The safest file therefore contains only: Title, URL handle, the Option name/value columns, SKU and Cost per item — with every variant row of each touched product present, untouched variants keeping their current cost. That is exactly the file the allocator writes when you attach your product export; variant IDs cannot change because every option value is copied verbatim. The column rules and a template are on the Shopify cost per item CSV page.

Free allocator

Split your freight, duty and agent fee across the units you received — and download the Shopify CSV.

Allocate my shipment

Edge cases

  • Gift cards have no cost per item. They are skipped.
  • Tax-inclusive prices hide projected margin on the product page; the CSV still imports and reports still work.
  • Legacy exports with Handle, Variant SKU, Variant Cost are read fine; the file we write uses the current names.
  • Variants without a SKU are matched by handle plus option values, so a missing SKU is not a blocker — but add SKUs; your reports will thank you.

A monthly habit

Receive in Shopify for quantities. Cost the receipt in the allocator — supplier invoice, freight bill, customs entry, agent and inspection — and import the CSV the same day. Your gross margin report for the month is then built on what the goods cost, not on a number typed before the first container.