About the Stock Average Calculator
When you buy the same share at different prices, your real cost is the weighted average of all your purchases, not a simple average of the prices. This calculator takes each purchase as a line with a quantity and a price, and gives your average cost per share, total shares and total cost. If you add today's price it shows your profit or loss. If you add a target average and a price you could buy at, it tells you how many more shares you would need to buy to move your average to that target, a tactic often called averaging down.
Updated October 2026
How to use the Stock Average Calculator
- 1Type each purchase on its own line as quantity @ price, such as 10 @ 150.
- 2Add as many lines as you need. Separators like x, @, a comma or a space all work.
- 3Optional: add the current price to see your profit or loss.
- 4Optional: add a target average and a price you could buy at to see how many shares you need.
- 5Read the average price and copy the summary.
A worked example
You buy 10 shares at 150, then 20 at 120, then 5 at 180. The total cost is 1,500 + 2,400 + 900 = 4,800 for 35 shares, an average of 137.14. If the price today is 140 you are slightly ahead, with a value of 4,900 and a gain of about 100 or 2.1 percent.
Using the target average feature
Suppose you hold 100 shares at an average of 50 and the price has dropped to 30. To reach an average of 40 you need to buy 100 more shares at 30, because (100 × 50 + 100 × 30) ÷ 200 = 40. The calculator solves this with the exact formula and rounds up to whole shares.
Remember that averaging down commits more money to the same investment, so it should be a deliberate decision, not a reflex. Once you know your average price, test the result against a return target with the ROI Calculator and the CAGR Calculator. The Dividend Yield Calculator shows the income side, and the Compound Interest Calculator tells you how reinvesting can grow a position over many years.
Good habits when tracking purchases
- Record every purchase with the date, quantity, price and fees.
- Keep the original contract notes for tax time.
- Check the average whenever you buy or sell part of a holding.
- Compare your results with a broad index to see if your picking adds value.
Features
- Weighted average cost per share
- Total shares and total cost
- Profit or loss against a current price
- Shares needed to reach a target average
- Many lines of purchases
- Pick your currency symbol
- Private: nothing is uploaded
Frequently asked questions
How do I calculate the average cost of my shares?
Multiply each purchase's quantity by its price, add all the amounts to get the total cost and divide by the total number of shares. Buying 10 at 150 and 20 at 120 costs 3,900 for 30 shares, an average of 130.
Why is my average not the middle of the two prices?
Because larger purchases count for more. A weighted average gives each price influence in proportion to the shares bought at it. Twenty shares at 120 weigh twice as much as ten at 150, so the average sits closer to 120.
What does averaging down mean?
It means buying more of a share after its price has fallen so that your overall average cost drops. It can lower the price the share must reach for you to break even, but it also increases your exposure to a share that is falling.
Should I add brokerage fees?
If you want your true cost, yes. Add the fee per share to the price on that line, or enter the fee as part of the price. The calculator only uses the numbers you give it.
Can I use this for crypto or funds?
Yes. Any asset bought in several lots works the same way, including shares, funds, crypto and even bulk goods. Use the quantity and price for each lot.
How does this relate to tax cost basis?
Some countries calculate capital gains using an average cost, others use specific lots or first-in first-out. This tool gives the average method only, so check the rules that apply to you before using it for tax.