What a stock average calculator does
When you buy the same stock more than once at different prices, the single number that matters afterwards is your average cost per share — the price the whole holding effectively cost you. Every profit figure, every break-even target and every tax calculation is measured against it. This tool takes each purchase as a quantity and a price, adds them up the way a broker does, and returns your true average. Add a current price and it also shows the unrealised gain or loss on the combined position.
The formula
average cost per share = total amount paid ÷ total shares ownedNote what this is not: it is not the average of the prices you paid. If you buy 100 shares at $50 and 400 shares at $30, the average of the two prices is $40, but your average cost is $34 — because far more of your money went in at the lower price. This is the mistake that makes people think they are closer to break-even than they are.
Worked example
| Purchase | Shares | Price | Amount paid |
|---|---|---|---|
| First buy | 100 | $50.00 | $5,000 |
| Second buy | 400 | $30.00 | $12,000 |
| Total | 500 | — | $17,000 |
| Average cost | — | $34.00 | $17,000 ÷ 500 |
At a current price of $36 the position is worth $18,000, an unrealised gain of $1,000 or 5.88%. At $34 exactly you are flat. Anything below $34 is a loss, even though your first purchase was made at $50.
Averaging down, and what it does not fix
- Buying more at a lower price pulls the average down and lowers the break-even price. That much is arithmetic.
- It does not reduce the loss you already have — it increases the money exposed to the same position.
- The bigger the second purchase relative to the first, the more the average moves. A small top-up barely shifts it.
- Averaging down into a company whose situation has changed is how a small loss becomes a large one.
Things that change your real cost basis
- Commissions and fees — add them to the amount paid. Many brokers already include them in the cost basis they report.
- Stock splits — a 2-for-1 split doubles your shares and halves your average cost. Re-enter the post-split numbers.
- Partial sales — selling some shares does not change the average cost of the rest under average-cost accounting, but FIFO and specific-identification methods do. Which one applies depends on your broker and tax jurisdiction.
- Reinvested dividends — each reinvestment is a new purchase at that day's price. Enter it as another row.
Frequently asked questions
Why is my average not the midpoint of my two prices?
Should I include brokerage fees?
Does this work for fractional shares?
How do I handle a stock split?
What about selling part of the position?
Is my data sent anywhere?
Note
This calculator is an arithmetic tool, not investment advice. Tax treatment of cost basis differs by country and by broker; confirm the method that applies to you before relying on these figures for a tax return.