Stock Average Calculator – Your Real Average Price and What It Takes to Move It
Buy the same stock, ETF or coin more than once and two questions follow: what is my average price? and how many more shares would bring it down (or up) to a target? This calculator answers both. It tracks buys, sells, splits and bonus issues in order, allows for brokerage, and shows your profit or loss and break-even price at today's price.
The weighted average formula
Your average price is a weighted average: total cost divided by total shares, so bigger buys count for more.
Average = (q₁ × p₁ + q₂ × p₂ + …) ÷ (q₁ + q₂ + …)
Buy 100 shares at 500, 50 at 420 and 150 at 380. You paid 128,000 for 300 shares, an average of 426.67. A plain average of the three prices says 433.33, which overstates your cost because it treats the 50-share buy like the 150-share one. At a current price of 400 you are down 8,000 (−6.25%) and need a 6.67% rise to break even.
The chart shows each buy as a bubble sized by the shares bought, with your running average as a step line. Each buy pulls the average toward its own price, and the biggest buys pull hardest. A shaded band shows the gap between your average and the current price.
Averaging down: the arithmetic
If you hold Q shares at an average A and buy at price P, the shares needed to reach a target average T are:
Shares = Q × (A − T) ÷ (T − P)
With 100 shares at 500, buying at 400 to reach 450 takes 100 × 50 ÷ 50 = 100 shares, costing 40,000. The target must sit between your average and the buy price; you can approach the buy price but never reach it. That produces the rule of diminishing returns:
| Close the gap by | Shares | Cost | New average |
|---|---|---|---|
| 25% | 34 | 13,600 | 474.63 |
| 50% | 100 | 40,000 | 450.00 |
| 75% | 300 | 120,000 | 425.00 |
| 90% | 900 | 360,000 | 410.00 |
Halving the gap always takes as many shares as you already hold; cutting it by 90% takes nine times as many. When the exact answer isn't a whole number, the calculator rounds up when averaging down and down when averaging up, so the target is actually met.
What averaging down does and doesn't do
In the example, buying 100 more at 400 cuts the rise you need to break even from 25% to 12.5%. But your loss at 400 is still 10,000, and you now have 90,000 in the stock instead of 50,000, so a further 10% fall costs 8,000 instead of 4,000. The before-and-after panel shows both sides without recommending either.
Average cost vs FIFO when you sell
Buy 100 at 500 and 100 at 400, then sell 80 at 460. Under average cost the sale leaves at the 450 average, so you realise +800 and your average stays 450. Under FIFO the 80 shares come from the 500 lot, so you realise −3,200 and the remaining shares average 416.67. Add a later buy of 50 at 420 and a price of 430, and the total profit or loss is −1,100 under both methods. The method only moves it between realised and unrealised. Which one applies to you depends on your broker and your country's tax rules.
Splits and bonus issues
A split or bonus changes how many shares you hold but not what you paid, so the average divides by the same factor. Enter it as "for every old shares you now have new": a 2-for-1 split is 1 → 2, a 1:2 bonus is 2 → 3, and a 1-for-10 reverse split is 10 → 1. The chart shows earlier prices split-adjusted so the lines stay continuous.
What this calculator leaves out
It works on the numbers you type and runs entirely in your browser. It doesn't fetch live prices, and it doesn't handle capital-gains tax, holding periods or wash-sale rules, short positions, currency conversion for foreign stocks (enter every price in one currency), or exchange tick-size rounding. Dividends paid in cash aren't counted; a reinvested dividend is simply another Buy row.