Stock Average Cost & Return Calculator
Commission, Sale tax (optional)
New average cost
New average
- Total shares
- Total cost
Profit and return
Profit
- Cost
- Market value
- Return
- %
- Result
Break-even price
Break-even price
- Rise needed
- %
Gain to recover a loss
Gain needed%
Shares for a target average
Shares to buy
- Cost
- New average
Your inputs are saved in the address. Bookmark the page (Ctrl+D) to come back to them.
Most stock math comes down to three questions: what does my average become if I buy more, what do I actually keep if I sell now, and how far does the price have to climb before I am back to even?
The five calculators below share their average cost, shares, price, commission and tax boxes, so a value typed once carries through to the others. Commission and tax start at 0 because they depend on your broker and where you live; enter your own rates to see the real result.
How it works
Average cost is weighted by the number of shares: (old average × old shares + new price × new shares) ÷ total shares. Adding the two prices and halving them only works when both purchases are the same size, which is rarely the case.
Return is measured against what you paid. Commission is charged on both the purchase and the sale, and tax only on the sale: cost = average × shares × (1 + commission), proceeds = price × shares × (1 − commission − tax), and return = (proceeds − cost) ÷ cost × 100. With both rates at 0 this is the familiar (price − average) ÷ average × 100.
The break-even price is where that profit is exactly zero: average × (1 + commission) ÷ (1 − commission − tax). Whenever trading has a cost, selling at your average is a small loss, so break-even always sits a little above it.
To recover a loss of L%, the price has to rise L ÷ (100 − L) × 100 percent. After a 50% drop the remaining half has to double, which is a 100% gain, and the required gain grows faster and faster as losses deepen.
For a target average T, solve (average × shares + price × x) ÷ (shares + x) = T for x, which gives x = shares × (average − T) ÷ (T − price). The target must lie between the current price and your current average, and the closer it is to the current price the more shares you need. The answer is rounded up to a whole share, and the average you would actually end up with is shown alongside.
Commissions, transaction taxes and capital gains taxes vary by broker, market, account type and year, and they change. No rate is built into this calculator, so check your broker's fee schedule and local rules and enter the figures that apply to you. Every step uses exact decimal arithmetic; numbers are only rounded for display.
Worked examples
- New average cost
You hold 40 shares at an average of 142.50. Buying 25 more at 118 moves your average to 133.08, with 65 shares and 8,650.00 invested in total. - Profit and return
Selling 120 shares bought at 86.40 for 97.25 each, with 0.1% commission and 0% tax, you paid 10,378.37 and the shares are worth 11,670.00. Result: Gain, 1,279.96 (12.33%). - Break-even price
With an average cost of 86.40, 0.1% commission and 0.5% tax on the sale, you need to sell at 87.01 or more to avoid a loss. That is 0.7% above your average. - Gain to recover a loss
A stock that is down 40% has to rise 66.67% from here to get back to where it started. - Shares for a target average
Holding 150 shares at an average of 64, with the price now at 41, you need to buy 97 more shares (rounded up) to bring your average to 55. They cost 3,977.00 and leave your average at 54.97.
Reference table
| Price of the new purchase \ Shares bought | 25 | 50 | 100 | 200 | 400 |
|---|---|---|---|---|---|
| 9,500 | 9,900 | 9,833.33 | 9,750 | 9,666.67 | 9,600 |
| 9,000 | 9,800 | 9,666.67 | 9,500 | 9,333.33 | 9,200 |
| 8,000 | 9,600 | 9,333.33 | 9,000 | 8,666.67 | 8,400 |
| 7,000 | 9,400 | 9,000 | 8,500 | 8,000 | 7,600 |
| 6,000 | 9,200 | 8,666.67 | 8,000 | 7,333.33 | 6,800 |
| 5,000 | 9,000 | 8,333.33 | 7,500 | 6,666.67 | 6,000 |
Reference table
| Current price \ Target average | 9,500 | 9,000 | 8,500 | 8,000 | 7,500 |
|---|---|---|---|---|---|
| 9,000 | 100 | – | – | – | – |
| 8,000 | 34 | 100 | 300 | – | – |
| 7,000 | 20 | 50 | 100 | 200 | 500 |
| 6,000 | 15 | 34 | 60 | 100 | 167 |
| 5,000 | 12 | 25 | 43 | 67 | 100 |
FAQ
Does averaging down make sense?
The math only tells you what your average becomes, not whether the stock will recover. Buying more at a lower price lowers the break-even point but also puts more money into the same position, so weigh it against how much of your portfolio you want in one stock.
Why is my brokerage showing a different return?
Brokers differ in whether they fold the purchase commission into your average cost and whether they subtract estimated selling costs. Set commission and tax to 0 to match a plain price return, or enter your own rates to see what you would actually keep.
What commission and tax rates should I enter?
It depends on your broker, account type, market and country, and the rules change over time. Look up your broker's current fee schedule and the tax rules that apply to you. Many trades are commission-free today, in which case leave it at 0.
Why does a 50% loss need a 100% gain to recover?
The percentages are measured from different starting points. A price of 100 that falls 50% is at 50; getting from 50 back to 100 means rising by 50, which is 100% of 50.
The target-average calculator says my value is out of range.
Buying at the current price can only pull your average toward that price, never past it. When averaging down, the target must be above the current price and below your current average; when averaging up, it must be between your average and the higher current price.
Can I use fractional shares or other currencies?
Yes. Prices and share counts accept decimals and are calculated exactly, in whatever currency you use. Exchange-rate moves and conversion fees are not included, and the target-average result is rounded up to whole shares.