Skip to main content

How Weighted Average Cost Works

Weighted average cost (WAC) is Bookkeep's canonical measure of what your inventory is worth. Unlike Last Cost, which calculates cost based on price at the time of the last invoice received, Weighted average cost is the blended cost of everything you've paid for a product or variant, weighted by how much you bought.

The cost ledger

Bookkeep keeps a cost ledger for each product variant. The ledger tracks three events:

EventCreated by
SeedAn opening cost baseline, usually imported at migration
ReceiptReceiving a purchase order line, at its full landed cost
CorrectionFixing or reversing a committed receipt

Your current WAC is the result of calculating a ledger in date order. This design is what makes retroactive fixes safe: When a ledger event is added or changed at an earlier date, Bookkeep recalculates every event after it, so the current value remains exact. This makes WAC is an excellent way to drive valuation and COGS.

WAC is not your supplier's price

Two different costs live on a variant. Understanding the difference is paramount:

  • Weighted average cost — what you have actually paid, blended across receipts. Internal to Bookkeep, used for valuation and synced to Shopify.
  • Supplier catalog price — what a supplier charges you today. It populates as the default price when you build a new purchase order. It never moves WAC on its own.

How does the Stocky migration work if I use Weighted Average Cost?

Catalog prices arrive with the Stocky full import and are maintained afterward distinctly per each supplier.

Without an opening baseline, WAC begins at your first Bookkeep receipt and silently discards every dollar of cost history that came before it. WAC only ever changes when goods are received, seeded, or corrected; without an accurate historical basis to define WAC, your first receipt becomes your entire cost basis.

The import does not establish WAC. It gives you history and supplier pricing. Your opening cost baseline comes from a separate step: the seed event.

The variant cost import reads one number per variant — average cost — from a Stocky variant report and writes it to the ledger as a seed event.

What makes the seed behave differently from a receipt:

  • Cost only, not quantity. The CSV's stock column is ignored. A quantity captured at export time would likely be stale by the time you received anything (e.g. after supplier and shipping turnaround), so Bookkeep doesn't rely upon it.
  • Quantity is resolved later. The seed sits in reserve until the first purchase order is received for that variant. At that moment Bookkeep pairs the seeded cost with your live on-hand count and blends it with the receipt.
  • The export date doesn't matter. Because there's no quantity to go stale, you can export whenever it's convenient.
  • It backdates. The seed is written before your existing receipts and the ledger replays, so importing after you've already started receiving in Bookkeep still produces the correct running average. You don't have to freeze operations to migrate.

Imported purchase orders are historical records, not live orders. They document what you ordered in Stocky; they don't create incoming inventory in Shopify and they can't be received in Bookkeep. To carry an order forward, open it and click Duplicate — that produces a real, live Bookkeep PO you can receive against. If you do that for an order still open in Stocky, cancel it in Stocky so Shopify's incoming quantities aren't counted twice.

Weighted Average Cost in a real world pricing scenario

You seed a variant at **$8.00**. Weeks later, with 40 units on hand, you receive your first Bookkeep purchase order — 60 units at $10.00:

(40 × $8.00) + (60 × $10.00)
──────────────────────────── = $9.20
40 + 60

WAC becomes $9.20 and syncs to Shopify.

Landed cost is part of WAC

A receipt enters the ledger at its landed cost: unit cost, plus allocated fees, minus allocated discounts, not its base cost on the PO line. Freight, duties, and similar charges are attached to the receipt and spread across its lines by one of two methods:

  • By quantity — split evenly per unit
  • By value — split in proportion to each line's extended cost

The method you choose can change your numbers dramatically when a receipt mixes cheap and expensive items. Receiving one $100 item and one $1.00 item with a $50.00 freight charge:

Allocation$100.00 item lands at$1.00 item lands at
By quantity$125.00$26.00
By value$149.50$1.50

Splitting freight evenly makes the cheap item cost 26× its purchase price. For freight and most value-driven charges, by value is the standard choice.

Set the default per fee type in your landed cost settings — see Configure Your Cost Tracking Method — and override it on an individual receipt when a particular shipment warrants it.

Shopify COGS Calculation

When a receipt commits, Bookkeep pushes a cost per item to Shopify. Based on your store's choice to use Last cost received or Weighted average cost COGS will then calculate on subsequent sales, which flows back through Bookkeep into your accounting platform.

What do I do if I entered my Receipt wrong?

Because the ledger replays, mistakes are repaired rather than erased. Bookkeep offers a cost correction when only the price was wrong, and a void when the quantity, items, or purchase order were wrong. Both recompute WAC from the original receive date forward and preserve the original entries.

Read further in Fix a Receipt: Voids and Cost Corrections.