Stock and purchases · free tool
Average cost calculator after a purchase
When a new purchase has a different price, the inventory cost reference also changes. Add the value of existing units to the entry cost and obtain an average weighted by quantities, including shipping attributed to the purchase.
Free, no sign-up required
In action
See an example
There were 50 units left at R$10, or R$500. Another 30 arrived at R$12 with R$40 in shipping, or R$400. The stock is now worth R$900 across 80 units, and the new average cost is R$11.25.
Use “Fill in example” to try these fictional values.
How we calculate
- Valor anterior = unidades atuais × custo médio atual.
- Valor da compra = unidades recebidas × preço unitário + frete atribuído.
- Somamos os valores e dividimos pelo total de unidades. A média aparece com 2 casas decimais, mas o valor total é calculado antes desse arredondamento.
Weighted average
Quantity gives each price its weight.
Buying a few expensive units does not make the whole stock expensive. Each group weighs by its total value: quantity × cost. Then the sum of the values is divided by the sum of the units.
The simple average of the two prices only matches this result when the quantities are equal.
Use the quantity actually left in stock, not the total bought months ago.
Shipping for several items
Shared shipping needs a rule first.
If the shipment brought several items, decide which part belongs to the product you are analyzing before filling in. Weight, volume or value all work, as long as you always use the same rule.
The calculator only receives the finished share. It does not handle tax credits, bookkeeping or returns.
When reviewing the selling price, also look at the cost of the next restock, which may differ from the historical average.
Questions when filling out
Can I use without previous stock?
Yes. Enter zero in current units. The average will be the cost of the new purchase, including shipping, divided only by the units received.
Why multiplying the displayed cost may not add up to the total?
The average can have more than 2 decimal places. The total uses the full values, and the unit cost is shown rounded. Multiplying the rounded value back can be off by a few cents.
Sources and further reading
- Sebrae · Stock inventory (opens in new tab)
Physical inventory counts and average stock cost.
Organize everyday life with Focca
With the purchase verified, record the disbursement separately from the inventory update. Discover Focca's expense control.