Stock average calculator
Average cost per share after buying more
Enter your buys with shares, price and fee. You instantly see your average cost and how many shares you would need to buy to reach a target average.
Your buys
- Buy 1
- Buy 2
Your average cost
$100.50
without fees $100.00
- Total cost
- $2,010.00
- Total shares
- 20
- Fees
- $10.00
Buy more to reach a target
Shares to buy
11 shares
for $775.00 including the fee. You then hold 31 shares at an average of $89.84.
A calculation with your numbers, not a recommendation. Excludes taxes, dividends and sales.
How it is calculated
- Average cost: everything you paid divided by all shares. For each buy you paid shares times price plus the fee. Most brokers show your cost basis this way.
- Buying more: the calculator solves (cost + n × price + fee) / (shares + n) = target for n and rounds up to whole shares. If a buy has decimals, it works with fractional shares.
- Only a target between your average and the current price can be reached. Each buy moves the average closer to the price, but never past it.
Assumptions and notes
- Taxes, dividends and sales are not included.
- Fees count toward your cost basis, as with most brokers. The average without fees is shown below for comparison.
- A plain calculation with your numbers, not a recommendation to buy more.
A worked example
You buy 10 shares at $120 and later 10 shares at $80, each with a $5 fee. You paid $2,010 for 20 shares, so your average cost is $100.50 ($100 without fees).
The price is now $70. For an average of $90 the calculator works out ($2,010 + $5 − $90 × 20) / ($90 − $70) = 10.75, rounded up to 11 shares. They cost $775 including the fee, and you then hold 31 shares at an average of $89.84.
Frequently asked questions
How do I calculate my average cost per share?
Divide everything you paid by the number of shares you hold. For each buy you paid shares times price plus the fee. With 10 shares at $120 and 10 shares at $80, each with a $5 fee, that is $2,010 for 20 shares, or $100.50 per share.
How many shares do I need to buy to average down?
The number n follows from (cost + fee − target × shares) / (target − price). In the example that is ($2,010 + $5 − $90 × 20) / ($90 − $70) = 10.75, rounded up to 11 shares for $775. Your average then falls to $89.84.
Do fees count toward my average cost?
With most brokers they do, and so does this calculator. In the example the fees add $0.50 per share: $100.50 with fees and $100 without.
Why can't I reach my target average?
Each buy moves your average closer to the current price, but never past it. At a price of $70 your average can only fall to a value above $70, however many shares you buy.
Does it work for crypto and ETFs?
Yes. For crypto, enter fractional amounts such as 0.25. The calculator then works out the amount to buy with decimals instead of whole units.
