Smekys
Ad Space

Average Cost Calculator

Free average cost calculator: find the weighted average price per unit across multiple purchase batches, plus total units and total spend.

Enter Values

units

Number of units purchased in your first batch.

$/unit

The price you paid for each unit in batch 1.

units

Units purchased in your second batch (0 if none).

$/unit

Price per unit in batch 2.

units

Add a third batch if you restocked again.

$/unit

Price per unit in batch 3.

units

Add a fourth batch if needed.

$/unit

Price per unit in batch 4.

Result

Total Units Purchased
300
Total Amount Spent
$1,900.00
Average Cost per Unit
$6.33
Highest Batch Cost / Unit
$7.00
Lowest Batch Cost / Unit
$5.00

When you buy the same item at different times for different prices — office supplies, raw materials, inventory, stock, groceries, or even fuel — you cannot just guess what each unit actually cost you. The average cost calculator below takes up to four purchase batches, weights them by quantity, and returns the true weighted-average price per unit you have been paying.

This is the same weighted-average cost method that GAAP and IFRS allow for inventory valuation, and it is the default cost-basis method many brokerages use when you dollar-cost average into a position. Enter your batches and the average cost updates instantly.

How to Use

  1. Enter the Quantity and Cost per Unit for your Batch 1 — the first time you bought this item.
  2. Add your Batch 2 details. If you have only bought the item once, leave Batches 3 and 4 at zero.
  3. Expand and fill Batch 3 and Batch 4 only if you restocked more than twice.
  4. Read the result card: Total Units Purchased, Total Amount Spent, and the highlighted Average Cost per Unit.
  5. Compare that average against today's purchase price to decide whether to restock now, wait, or run a promotion.

The calculator weights each batch by the number of units you actually bought, so a large batch at a cheap price pulls the average down more than a small batch at the same price would. That is exactly what makes a weighted average different from a simple average of the prices.

The Weighted-Average Cost Formula

The math is deliberately simple:

Average Cost per Unit = Σ (Quantityᵢ × Unit Costᵢ) / Σ Quantityᵢ

In words: multiply each batch quantity by its unit price, add all those products together to get your total spend, then divide by the total number of units bought.

Worked example — the defaults on this page:

  • Batch 1: 100 units at $5.00 each = $500.00
  • Batch 2: 200 units at $7.00 each = $1,400.00
  • Total spend = $1,900.00; total units = 300
  • Average cost = $1,900.00 / 300 = $6.33 per unit

Notice that the simple average of $5 and $7 would be $6.00, but the weighted average is $6.33 because you bought twice as many units at the higher price. That gap — $0.33 per unit — is exactly the kind of mistake a quick mental average hides.

When Average Cost Matters

  • Inventory and small business. Under the weighted-average inventory method, every unit you have on hand — whether bought last month or last quarter — is carried at the same blended cost. This smooths out price spikes and dips, which is why retailers, distributors, and manufacturers often choose it over LIFO or FIFO.
  • Dollar-cost averaging into stock or crypto. If you buy 100 shares at $50 and later 100 shares at $60, your average cost basis is $55, not $60. Knowing that number tells you exactly what price you need to sell at just to break even.
  • Restocking and pricing decisions. If your weighted-average landed cost is $4.20 per unit and your supplier now quotes $3.60, you know you have been overpaying — and you can negotiate with confidence.
  • Personal budgeting. Tracking the average price per liter of gas, per bag of coffee, or per month of a subscription shows you whether your real cost of living is trending up or down even when individual prices jump around.

Examples

Example 1 — Default two-batch case. You buy 100 units at $5.00, then later buy 200 units at $7.00. Total units = 300, total spend = $1,900.00, and your average cost per unit is $6.33. The calculator also reports a highest batch cost of $7.00 and a lowest batch cost of $5.00, so you can see how far the average sits between the two.

Example 2 — A small café restocking beans. The café buys 5 kg at $18/kg in January, 8 kg at $21/kg in March, and 7 kg at $19/kg in June. Total cost = 5×$18 + 8×$21 + 7×$19 = $90 + $168 + $133 = $391.00 across 20 kg, for an average landed cost of $19.55 per kg. Any cup priced below that threshold — after accounting for labor, milk, and overhead — is sold at a loss on the bean cost alone.

Example 3 — A large inventory order. A distributor purchases 1,000,000 units at $10.00 and a follow-on 500,000 units at $12.00. Total units = 1,500,000, total spend = $16,000,000.00, and the weighted average cost per unit is $10.67. Running this calculation at scale confirms that the second, more expensive order only nudged the blended cost up by 67 cents because it represented one-third of the total volume.

FAQ

What is the difference between average cost and weighted average cost?

A simple average cost adds the prices you paid and divides by the number of different prices. A weighted average cost adds each price multiplied by how many units you bought at that price, then divides by the total units. The weighted version is the correct number for accounting, inventory, and investment cost basis because batches of different sizes should not count equally.

How do I calculate average cost if I bought items at different prices?

Multiply each purchase quantity by its price, sum those products to get your total spend, then divide by the total number of units bought. For example, 100 units at $5 plus 200 units at $7 gives ($500 + $1,400) / 300 = $6.33 per unit. Enter those batches in the calculator above to see it instantly.

Is average cost the same as cost of goods sold?

Not exactly. Average cost is the per-unit figure; cost of goods sold (COGS) is that per-unit figure multiplied by the number of units you actually sold during the period. Under the weighted-average inventory method, both ending inventory and COGS use the same blended per-unit cost, which is why the average cost number drives both the balance sheet and the income statement.

When should I use average cost instead of FIFO or LIFO?

Average cost is easiest to administer when inventory items are interchangeable — identical raw materials, commodity parts, or fungible shares — and when prices are volatile but you want a smoothed value. FIFO matches physical flow for goods that expire or age, LIFO can reduce taxable income during inflation, and average cost sits between them. Consult your accountant before choosing a method for financial statements or tax.

Can I use this calculator for stocks and crypto?

Yes. Treat each buy as a batch: quantity is the number of shares or coins, and cost per unit is the price you paid. The result is your average cost basis, which you can compare against the current market price to compute unrealized gain or loss. Note that specific tax lots and wash-sale rules may require FIFO or identified-share accounting for your tax return.

What if I only have one batch?

The average cost is just the cost per unit of that batch — there is nothing to average. The calculator still reports total units and total spend, which is useful as a sanity check.

What happens if I enter a negative quantity?

The calculator rejects the input with an error telling you that quantity must be zero or a positive number. Negative quantities would flip the math and produce nonsense averages, so the engine blocks them rather than returning a misleading result.

Disclaimer

This average cost calculator is provided for informational purposes only and does not constitute accounting, tax, investment, or legal advice. Results are estimates based on the numbers you enter and the weighted-average cost formula; actual inventory valuation, cost-basis reporting, and tax treatment may require LIFO, FIFO, specific-identification, or other methods under your jurisdiction's rules. Always consult a qualified accountant or tax professional before using these figures on a financial statement or tax return.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.