What this calculator does
Buying the same holding several times at different prices leaves you with a blended cost per share rather than any single purchase price. That blended figure is what determines whether the position is up or down, and it is what most brokers show as your cost basis.
Brokerage matters more than it looks on small parcels. A $10 fee on a $500 purchase is 2% of the trade: a hurdle the position has to clear before it breaks even. This calculator folds the fee for each executed trade into the cost.
The formula
Total cost is the sum of shares multiplied by price for each purchase, plus brokerage on each trade actually made. Dividing by the total shares gives the blended cost per share, and comparing that against the current price gives the position’s profit or loss.
| Term | Meaning |
|---|---|
| Average cost | Total amount paid ÷ total shares held. |
| Position value | Total shares × current price. |
| Cost basis | Another name for the total amount paid, used for tax purposes. |
The inputs explained
| Field | What to enter |
|---|---|
| Buy 1: shares | Number of shares in your first purchase. |
| Buy 1: price ($) | Price per share paid in the first purchase. |
| Buy 2: shares | Shares in a second purchase. Leave at zero if there was only one. |
| Buy 2: price ($) | Price per share in the second purchase. |
| Buy 3: shares | Shares in a third purchase, if any. |
| Buy 3: price ($) | Price per share in the third purchase. |
| Current price ($) | The current market price per share. |
| Brokerage per trade ($) | Brokerage per trade. Counted once for each purchase where you actually bought shares. |
When to use it
Tracking a position built over time
Enter each purchase as you make it. The blended cost is the number that determines whether you are ahead, not the price of your first or last buy.
Working out what averaging down actually achieves
Add a purchase at a lower price and watch the blended cost fall. It also shows how much capital that requires: the effect on the average is usually smaller than people expect for the money committed.
Finding your break-even price
The blended cost per share is your break-even. Below it the position is at a loss; above it, at a profit: before any tax on the gain.
Seeing what brokerage costs you
Set the fee to zero and compare. On small parcels the difference in break-even price is often substantial, which is the argument for fewer, larger trades.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How a second purchase changes the average
An initial 100 shares at $22.50, followed by a second purchase at $18.20, with $10 brokerage per trade and a $24 current price.
| Second purchase | Average cost per share | Total shares | Total invested | Profit / loss |
|---|---|---|---|---|
| 0 shares | $22.60 | 100 | $2,260.00 | $140.00 (6.19%) |
| 50 shares | $21.20 | 150 | $3,180.00 | $420.00 (13.2%) |
| 100 shares | $20.45 | 200 | $4,090.00 | $710.00 (17.4%) |
| 150 shares | $20.00 | 250 | $5,000.00 | $1,000.00 (20.0%) |
| 300 shares | $19.33 | 400 | $7,730.00 | $1,870.00 (24.2%) |
| 600 shares | $18.84 | 700 | $13,190.00 | $3,610.00 (27.4%) |
The position at different current prices
A fixed position of 250 shares at a blended cost, valued at a range of market prices.
| Current price | Average cost per share | Position value | Profit / loss |
|---|---|---|---|
| $15 | $20.00 | $3,750.00 | −$1,250.00 (-25.0%) |
| $18 | $20.00 | $4,500.00 | −$500.00 (-10.0%) |
| $20 | $20.00 | $5,000.00 | $0.00 (0.000%) |
| $21 | $20.00 | $5,250.00 | $250.00 (5.00%) |
| $24 | $20.00 | $6,000.00 | $1,000.00 (20.0%) |
| $30 | $20.00 | $7,500.00 | $2,500.00 (50.0%) |
Questions
Should I include brokerage in my cost basis?
Yes. Purchase costs form part of the cost basis in most tax jurisdictions, and they are certainly part of your real break-even. This calculator counts one fee for each purchase where shares were actually bought.
Does this handle dividends?
No: it covers cost basis and current value. For total return including dividends, use the ROI calculator and enter dividends received in the income field.
What about a dividend reinvestment plan?
Treat each reinvestment as a purchase at the reinvestment price. With more than three, work out the totals separately: sum all amounts paid and divide by all shares acquired.
Is averaging down a good strategy?
It lowers your break-even but concentrates more capital in a position that has moved against you. Whether that is sensible depends entirely on why the price fell: the arithmetic here cannot answer that part.
How do share splits affect this?
A split multiplies your share count and divides the price by the same factor, leaving the total cost unchanged. Adjust prior purchases to post-split terms before entering them.
For total return including income, use the ROI calculator. For annualised growth between two values, see CAGR.