← Back to tool

Guide · Finance & inventory

Weighted Average Cost

Updated: June 2026

Buy the same thing at different prices — stock for a warehouse, shares in a company — and "what did it cost on average?" stops being a simple average. The weighted average cost method blends every purchase into one cost per unit, weighting each price by the quantity bought. It's the backbone of inventory accounting and of the average price your broker shows you.

Open the Calculator →

Free · No upload · Instant in the browser

The method in one line

Weighted average cost per unit is the total money spent divided by the total units acquired. Written as a weighted average, each unit price is weighted by its quantity:

avg cost = Σ(unit price × quantity) ÷ Σ(quantity)

The numerator is simply the total cost of all the goods, and the denominator is the total count — which is why "total cost ÷ total units" gives the identical answer. Quantity is the weight that decides how much each price moves the average.

Inventory example (AVCO)

A shop restocks the same item three times:

PurchaseUnit priceQuantityprice × qty
January$4.00100$400
March$5.00300$1,500
June$6.50200$1,300
Total600$3,200

Weighted average cost: $3,200 ÷ 600 = $5.33 per unit. Under the AVCO method, both the units sold and the units left in stock are valued at this blended $5.33, regardless of which physical batch they came from. A plain average of $4.00, $5.00 and $6.50 would be $5.17 — wrong, because it ignores that far more units were bought at the higher prices.

Average share price

The same maths gives your average entry price when you buy a stock in tranches. Buy 10 shares at $120 and later 30 at $150: (120×10 + 150×30) ÷ (10 + 30) = (1200 + 4500) ÷ 40 = $142.50 per share. Because most of your shares were bought at $150, your average sits much closer to it than to $120 — exactly what "averaging up" means.

Weighted average cost vs FIFO

FIFO (first-in, first-out) assumes the oldest, often cheapest, units are sold first, leaving newer costs on the balance sheet. Weighted average cost instead smooths every purchase into one figure, so it reacts more gently to price swings. In rising prices, FIFO reports a lower cost of goods sold and higher profit, while weighted average lands in between. Neither is "more correct" — they're different accounting choices, and many businesses prefer the average method precisely because it dampens volatility.

Practical notes

  • Quantity is the weight — always weight prices by how many units you bought.
  • Recompute after each purchase if you use a perpetual (moving average) system.
  • Include all costs — freight and duties belong in the unit cost where applicable.
  • Use enough decimals so rounding the per-unit cost doesn't distort large quantities.

Frequently asked questions

How do I calculate weighted average cost?

Divide the total cost of all units by the total number of units — equivalently, multiply each unit price by its quantity, add the products, and divide by the total quantity.

How is it different from FIFO?

FIFO assigns the cost of the oldest units first; weighted average cost blends every purchase into one average price per unit, smoothing out price changes.

Does it work for averaging a share price?

Yes. Weight each purchase price by the number of shares bought and divide by the total shares to get your average entry price.

Why isn't it just the average of the prices?

Because you usually buy different quantities at each price. The average of the prices ignores quantity; the weighted version accounts for it.