Weighted average cost calculator for inventory

Write each purchase batch on a line with quantity then unit price to get the average cost used to value your stock.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter batches (one per line: quantity, unit price).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Weighted average cost = sum of (quantity × unit price) ÷ total quantity.

Example

Result: Weighted average cost per unit: 10.8333; Total quantity: 300 units; Total cost: 3,250.00.

Limits and caveats

  • Write numbers without thousands separators; the last two numbers on each line are read as quantity then price.
  • Units sold between batches are not deducted; it averages only the purchases you enter.

Questions about this tool

Why not take a simple average of prices?

A large batch should count more than a small one. A simple average gives every batch equal weight regardless of quantity.

Should shipping be in the unit price?

Yes, for a realistic cost. Spread freight and duty over the units of each batch before entering the price.

How is this different from FIFO?

FIFO issues the oldest units first at their own price, while weighted average gives every unit the same cost.