Shopify Weighted Average Cost: A Practical Guide for Accurate COGS

Your supplier raised prices again. The unit cost you paid in April isn't the unit cost you paid in May, and definitely isn't what you'll pay next month. If you're still entering a single "cost per item" in Shopify and hoping your margins work out, your COGS is wrong — and so is every profitability report built on top of it.

Start Free Trial — 14-day free trial on Starter plan, no credit card required.

What weighted average cost actually means

Weighted average cost is the total value of your inventory divided by the total units on hand. Every time you receive new stock at a different price, the average shifts proportionally to the size of that shipment.

WAC = (existing inventory value + new shipment value) / (existing units + new units)

Unlike FIFO or LIFO, WAC doesn't track which specific units came from which shipment — it blends them. For most Shopify merchants who restock the same SKUs from one or two suppliers, that's exactly what you want: a single, defensible cost number per product.

A worked example

You sell a single SKU. Here's what happens across three restocks:

Notice that sales don't change the WAC — only purchases do. And the new average is always proportional to how much of the existing pile got mixed with how much of the new pile. Type the math wrong once and every margin report downstream is off.

Why spreadsheets break down fast

A spreadsheet works fine if you have ten SKUs and one supplier. Real Shopify catalogs look different:

Most stores discover the gap during quarterly reporting: COGS doesn't match what was actually paid, gross margin looks higher (or lower) than it should, and nobody can explain why.

Where Shopify's built-in cost field falls short

Shopify has a single "Cost per item" field on every variant. It does not automatically recalculate when you receive new inventory at a new price. If you want WAC, you have to:

Five steps per SKU, dozens of SKUs per invoice, multiple invoices per week. The math is simple, the volume is what kills you — and any typo in any step corrupts the cost going forward.

Automating WAC with invoice parsing

The cleanest fix is to drive WAC straight off the supplier invoice that already contains the right numbers — unit cost, quantity, line totals. Smart Restock's invoice parser reads the invoice (PDF, CSV, Excel, or EML), matches each line to a Shopify product, and applies the WAC formula automatically before posting the inventory adjustment.

Concretely, for every line on the invoice Smart Restock:

Every change is shown on a review screen before anything is posted to Shopify, so a wrong column mapping never silently corrupts your COGS.

How accurate WAC pays back

Profit reports reflect what you actually paid.

Bookkeepers and tax filings stop needing manual reconciliation.

Costs stay accurate across hundreds of restocks.

A simple recommendation

If you only restock a handful of SKUs a month, calculate WAC by hand in a spreadsheet — just be honest about the time it takes and the risk of typos. If your supplier invoices touch more than 20 SKUs at a time, or you have multiple suppliers, or you run multi-location inventory, automate it. The math doesn't change; it's the bookkeeping discipline that's worth offloading.

Stop hand-calculating COGS after every restock

Smart Restock posts weighted average costs to Shopify automatically — review every change before it's applied.

Keep your COGS honest

Automate weighted average cost in Shopify

14-day free trial on Starter — review every change before it hits your store.