How to use it
- In Purchases, one per line, write each purchase on its own line: the number of shares, then the price per share.
- Type the Commission on each trade that your broker charges, as a percentage of the value.
- Optionally, type a Planned purchase with its shares and price to see the average after it.
- Read the Average cost per share and the Break-even price per share, then the table of purchases.
How the average cost is calculated
When you buy shares at different prices, the average cost per share is the total amount you paid divided by the number of shares. A purchase of many shares counts more than a purchase of few, so the average is a weighted average of the prices. This is the average cost method of the cost basis, which Wikipedia describes as widely used by mutual funds.
Commission is part of what you paid, so it is added to the total cost of each purchase. The break-even price is found the same way from the sale side: selling every share must bring in the total cost after the commission on the sale.
Cost of a purchase = shares × price × (1 + commission)
Average cost per share = total cost ÷ total shares
Break-even price = total cost ÷ (total shares × (1 − commission))
- Buying 100 shares at 25.50 and 50 at 30 gives an average of (2,550 + 1,500) ÷ 150 = 27.00 without commission.
- Each purchase adds its shares and its cost to the totals; the average after a planned purchase uses the same totals.
Why the break-even price is above the average
The average cost includes the commission you paid on the purchases, but the break-even price also includes the commission you pay when you sell. That is why it is a little higher than the average, even though the price per share is the same.
What this calculator does not include
- Taxes on gains from a sale, and any tax rules on which shares are sold first.
- Dividends and other income from the shares, which reduce the average cost when they are reinvested or taken as cash.
- Stock splits, rights issues and fees other than the commission.
Worked example: 100 at 25.50, 50 at 30 and 200 at 22, with 0.5% commission
The values are 2,550, 1,500 and 4,400, a total of 8,450 for 350 shares. The commission at 0.5% adds 42.25, so the total cost is 8,492.25.
The average cost is 8,492.25 ÷ 350 = 24.26 per share. The break-even price is 8,492.25 ÷ (350 × (1 − 0.005)) = 24.39: at that price, after the 0.5% sale commission, the 350 shares return the total cost.
| Figure | |
|---|---|
| Total shares | 350 |
| Total cost, commission included | 8,492.25 |
| Average cost per share | 24.26 |
| Break-even price per share | 24.39 |
Frequently asked questions
Why is the average cost lower than my last purchase price?
The average is weighted by the number of shares bought at each price. If you bought more shares when the price was low, the average sits below the recent price.
Does the average include the commission?
Yes. Each purchase's commission is added to its cost, so the average is the cost per share including commission. Enter 0 in the commission field if you do not pay one.
How do I see the effect of buying more shares?
Enter the planned number of shares and the price in the planned purchase fields. The calculator shows the new average and how much it changes.
Does the break-even price include tax?
No. It covers only the commission. Taxes on a sale depend on your country and your gain, and are not included.
Is my data sent to a server?
No. The calculation runs in your browser, and nothing you enter is sent to us.
Sources
Figures and text last checked on Tuesday, November 10, 2026.