Free tool · Finance calculators
Stock average calculator
Add each buy with its shares, price and fee. You get your average cost per share and total cost, and how many more shares reach a target average. Plain arithmetic, not advice.
- Free
- No sign-up
- Runs in your browser
Average cost $114.5714per share, after 3 buys of 35 shares in all
- 35 shares
- Total $4,010.00
- Average cost per share
- $114.5714
- Total shares
- 35
- Total cost
- $4,010.00
| Buy | Shares | Price | Cost |
|---|---|---|---|
| 1 | 10 | $150.00 | $1,500.00 |
| 2 | 5 | $120.00 | $600.00 |
| 3 | 20 | $95.50 | $1,910.00 |
| All | 35 | $114.5714 | $4,010.00 |
Formula: average cost = total cost ÷ total shares, where each buy costs shares × price + fee.
Your numbers: (10 × 150.00 + 5 × 120.00 + 20 × 95.50) ÷ 35 = $114.5714
To reach a target averageBuy 51 more sharesat $90.00, for $4,590.00. Your average then is $100.00 on 86 shares.
Formula: n = (total cost − target × shares) ÷ (target − buy price). Your numbers: (4,010.00 − 100.00 × 35) ÷ (100.00 − 90.00) = 51.
Plain arithmetic on the numbers you typed. It is not investment advice, and it does not know about splits, taxes or selling fees.
How to use the Stock Average Calculator
- In Your buys, type the Shares and Price per share for each buy, and the Fee if you paid one. Press Add a buy for more rows.
- Optional: under Shares to buy to reach a target average, type a Buy price and a Target average.
- Optional: type a Current price to see the value now and the gain or loss on paper.
- Read the average cost, the table of your buys, the formula with your numbers and the share count under Result.
How do I calculate the average cost of shares?
The average cost per share is the total you paid divided by the total number of shares: average = (sum of shares × price + fees) ÷ total shares. It is a weighted average, so a buy of many shares counts for more than a buy of few. Say you bought 10 shares at 150, then 5 at 120, then 20 at 95.50. You paid 1,500 + 600 + 1,910 = 4,010 for 35 shares, so the average is 4,010 ÷ 35 = 114.5714 per share.
Do not average the prices themselves. The three prices above average to 121.83, which is too high because most of your shares were bought at the lowest price. Weighting by shares gives the correct figure.
Fees raise your cost. If you paid a fee of 5 on each of two buys, type it in the Fee column. It is added to that buy's cost, so the average cost goes up, and the result also shows the average price before fees. Shares can be fractional, for example 0.25, and prices keep up to four decimals.
How many shares do I need to buy to reach a target average?
If the average you want is Y and you plan to buy at price X, the number of shares n follows from setting the new average equal to Y: n = (total cost + fee − Y × shares) ÷ (Y − X). With the example above (total cost 4,010 for 35 shares), a target of 100 and a buy price of 90, n = (4,010 − 100 × 35) ÷ (100 − 90) = 51. Buying 51 shares at 90 costs 4,590, and the new average is (4,010 + 4,590) ÷ 86 = 100.00 exactly.
When the answer is not a whole number the calculator rounds up to whole shares and shows the average that results, which then sits at or just past your target. A fee on the planned buy is included, so it can raise the count by a share or more. The buy price must lie on the other side of the target from your current average: you cannot bring an average of 114 down to 100 by buying at 105. In that case the page says why instead of showing a number. A buy exactly at the target price only moves the average toward it and never reaches it.
The calculator does only this arithmetic. Whether buying more of anything is sensible depends on your goals, your other holdings and your risk, and it gives no investment advice.
Does the average include fees, and what price do I need to break even?
Yes, if you type the fees. The average cost with fees included is the price at which selling all your shares would return what you paid, before any fee for selling and before tax. Type a price in Current price to see the value of your shares now and the gain or loss against your total cost. With 35 shares and a current price of 120, the value is 4,200, which is 190 above the 4,010 you paid, a gain of 4.74%.
The figures are plain arithmetic on what you enter. They do not know about stock splits (enter shares and prices after the split), dividends, currency changes or tax. Your broker or tax authority may use a different method for reporting cost than a simple average, so check with them or a qualified professional for anything you file or decide on.
Use it with
- Savings Goal Calculator: monthly saving to reach a goal.
- 50/30/20 Budget Calculator: split income into needs, wants, savings.
- Markup Calculator: price from cost and markup.
Questions
How do I calculate the average price of stock I bought at different prices?
Divide the total you paid by the total shares: (shares × price for every buy, plus fees) ÷ total shares. Buying 10 at 100 and 10 at 80 gives (1,000 + 800) ÷ 20 = 90.
What does averaging down mean?
It means buying more shares at a lower price than your average, which lowers the average cost per share. This tool shows the arithmetic of how many shares that takes. It says nothing about whether it is a good idea.
How many shares do I need to buy to reach a target average?
n = (total cost + fee − target × shares) ÷ (target − buy price). The result is rounded up to whole shares. The buy price has to be on the other side of the target from your current average.
Does the average cost include fees?
Yes. Type the fee for each buy and it is added to that buy's cost. The result also shows the average price before fees.
What price do I need to break even?
Your average cost per share with fees included, before any fee for selling and before tax. Anything above it on the day you sell is a gain on paper.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.