Does Shopify calculate weighted average cost?
No. Shopify stores one Cost per item for each variant, and Shopify's own help says each variant has a static cost that stays fixed when you receive a purchase order or transfer
. A weighted average has to be worked out on every delivery: (units on hand × current average cost + units received × price paid) ÷ (units on hand + units received). You can do it by hand after each delivery, or use an app such as True COGS, which does it when the stock is received and writes the result to Cost per item.
What Shopify does with your cost today
Every variant in Shopify has one field for cost, Cost per item. It holds a single number, and nothing in Shopify recalculates it when new stock arrives. In its guide for stores leaving Stocky, Shopify says its built-in system does not calculate weighted-average costing, that each variant's cost stays fixed when you receive a purchase order or transfer
, and that stores needing weighted-average costing or landed cost allocation should use a third-party inventory app (Shopify Help).
That single number matters more than it looks. Shopify says profit is reported only for products and variants that had cost recorded at the time they were sold
(Shopify Help, profit reports). So the Cost per item sitting on a variant on the day of a sale is the cost that sale is reported with. If it is out of date, the sale's margin is out of date too.
Until 31 August 2026, Stocky filled this gap: it recalculated an average unit cost every time a purchase order was received. Stocky is no longer available (Shopify Help). If you relied on it, read how to replace Stocky's average unit cost.
The weighted average cost formula
new average = (units on hand × current average + units received × price paid) ÷ (units on hand + units received)
This is the same calculation Stocky used. Shopify's own example: 30 units at $10.00 on hand, 15 units received at $8.00, new average $9.33 (Shopify Help, Stocky average unit cost).
Worked example
| Step | Units | Unit cost | Value |
|---|---|---|---|
| On hand before the delivery | 40 | $12.00 | $480.00 |
| Purchase order received | 60 | $13.50 | $810.00 |
| After the delivery | 100 | $12.90 | $1,290.00 |
Why the wrong cost costs you
Take the 100 units above and sell 50 of them at $25.00 each, $1,250.00 of sales. What the margin looks like depends only on which number is sitting in Cost per item:
| Cost per item on the variant | Cost of 50 units | Gross profit | Margin |
|---|---|---|---|
| Left at the old price, $12.00 | $600.00 | $650.00 | 52.0% |
| Overwritten with the last price, $13.50 | $675.00 | $575.00 | 46.0% |
| Weighted average, $12.90 | $645.00 | $605.00 | 48.4% |
Leaving the old cost overstates profit by $45.00 on these 50 units. Typing the newest price understates it by $30.00. Neither error shows up anywhere in Shopify, because the report simply trusts the field. Multiply that by every product you reorder at a new price and the gap is the difference between a margin you can price from and one you can't.
Weighted average cost calculator
Enter what is on the shelf now, then each delivery in the order it arrived.
For a whole month of deliveries and sales, with the periodic and the moving average side by side, see weighted average inventory valuation.
Cases the formula must handle
- Rejected units. Units you refuse on receipt never entered your stock, so they must not enter the average.
- Oversold stock. If a variant is below zero when a delivery arrives, there are no units to average with. Stocky set the average to the received cost in that case (Shopify Help); the same rule is the only sensible one.
- Partial receipts. A purchase order received in three batches must be counted once per batch, never twice when a batch is saved again.
- Units with no cost yet. If a product was created by hand with stock and no cost, a zero is not a price. Averaging with $0 drags the cost down; the first real price should become the average.
- Freight and duty. If you pay shipping or customs on a delivery, the price paid per unit should include its share. See landed cost per unit.
Three ways to keep Cost per item at the weighted average
- By hand. After every delivery, work out the new average for each variant (the calculator above) and type it into Cost per item. It works for a handful of products and breaks the first week you are busy.
- A planning app that syncs cost. Some inventory planning apps can push a weighted average to Shopify. Prediko, for example, offers last price, weighted average or FIFO, checks costs once a day, and has the sync off by default (Prediko Help).
- An app that costs each delivery when it is received. True COGS records the price on arrival and updates the average for that receipt, with the date kept.
Comparing options? See Shopify apps for cost of goods sold compared.
How True COGS keeps the weighted average
- When you receive a purchase order in Shopify, the price on the purchase order is recorded for the units received, checked against the last price you paid, blended into the weighted average with the formula above, and written to Cost per item. This works on the free plan.
- Stock that arrives without a price, such as a transfer with no purchase order, waits in one list where you type the price once.
- Every price is kept with its date, so you can see which delivery changed a cost and when.
- If your accountant asks for FIFO, paid plans switch the method; see FIFO vs weighted average.
Questions merchants ask
Does Shopify have an average cost feature?
No. Shopify keeps one Cost per item per variant, and Shopify Help says it stays fixed when you receive a purchase order or transfer. Weighted-average costing needs a third-party app or a manual calculation.
Does receiving a purchase order update Cost per item in Shopify?
No. Receiving changes quantities. Shopify Help states that the cost stays fixed when you receive a purchase order or transfer.
What is the weighted average cost formula?
New average = (units on hand × current average + units received × price paid) ÷ (units on hand + units received). For example, 40 units at $12.00 plus 60 units at $13.50 gives $12.90.
Is weighted average cost an accepted accounting method?
Yes. Weighted average cost and FIFO are both accepted under US GAAP and IFRS. Check with your accountant for the rules that apply to your business and country.
Which app updates Cost per item to the weighted average automatically?
True COGS does it when stock is received, on its free plan for up to 25 variants with a cost on record. Prediko can sync a weighted average once a day. See the comparison.
Try True COGS free. True COGS is an inventory costing app for Shopify by Nexus Logic Systems. It records the price you paid on every delivery (a received purchase order or a transfer), with its share of freight and duty on paid plans, keeps every price with its date, and writes your moving weighted average cost, or FIFO cost on a paid plan, to Shopify's Cost per item. It is free for up to 25 variants with a cost on record; paid plans start at $29 a month or $290 a year.
Install from the App Store