How average cost per share is calculated
When you buy the same stock, fund or coin more than once, your average cost is a weighted average: each purchase counts in proportion to the number of units it added. It is not the simple average of the prices you paid.
Average cost = (Σ units × price + Σ fees) ÷ Σ units
The calculator adds trading fees and commissions to the cost, because they are part of what you paid. In US tax terms they are included in your cost basis (IRS Publication 551). The result is your break-even price: if the market price is above it, the position as a whole is in profit before taxes; below it, it is at a loss. It also shows the average purchase price without fees, which is what many brokerage apps display.
Selling part of a position does not change the average cost of the units you keep under the average cost method. Only new purchases move it, so sells are not entered here.
Averaging down: how many units to buy
Averaging down means buying more after the price has fallen so the average cost drops. To reach a target average T by buying n units at price P with a one-off fee F:
n = (current cost + F − T × current units) ÷ (T − P)
The new average can only land between the buy price and your current average. It moves toward P as you buy more but never reaches it, so a target below the buy price is impossible. The same formula works in the other direction (averaging up) when you buy above your average. The what-if table shows the new average for buying a quarter, half, the same and double your current holding.
Remember that a lower average cost changes only your break-even point. It does not make a recovery more likely, and every extra purchase adds to the money at risk. This page does arithmetic, not investment advice.
Worked example
The default inputs are three buys, each with a $4.95 commission:
| Buy | Units | Price | Cost incl. fee |
|---|---|---|---|
| 1 | 100 | $50.00 | $5,004.95 |
| 2 | 60 | $42.00 | $2,524.95 |
| 3 | 40 | $36.50 | $1,464.95 |
| Total | 200 | $8,994.85 |
Average cost = $8,994.85 ÷ 200 = $44.97 ($44.90 without fees). At a market price of $40 the holding is worth $8,000, an unrealized loss of $994.85 (−11.06%), and the price must rise 12.44% to get back to break-even.
To bring the average down to $42 by buying at $40: n = (8,994.85 − 42 × 200) ÷ (42 − 40) = 297.4, so 298 whole shares costing $11,920, for a new average of $42.00 on 498 shares. Buying only 100 shares would lower the average to $43.32.
Tips and limitations
- Units can be fractional, so the same tool works for fund units, fractional shares and crypto.
- Stock splits change both units and price; enter split-adjusted figures for older buys.
- Reinvested dividends are purchases too. Add them as rows if you want them in the average.
- For tax reporting, your broker may use FIFO or specific lots instead of the average cost method, so realized gains can differ from what this average suggests.
Frequently asked questions
Should fees be included in the average cost?
Yes if you want a true break-even price. Commissions and fees are part of the cost basis. The calculator shows both the average with fees (headline) and without fees.
Why can't I average down below my new buy price?
The new average is a weighted mix of your old average and the new price, so it always lies between them. Buying more only gets it closer to the buy price.
Does selling shares change my average cost?
Under the average cost method, no: the remaining units keep the same average cost. Some apps use a different “diluted cost” that subtracts realized profit, which can differ from this figure.
Is averaging down a good strategy?
It depends on why the price fell and on your plan and risk tolerance. The calculator only shows the arithmetic; it is not a recommendation to buy or sell.
Can I use it for crypto or mutual funds?
Yes. Enter coins or fund units as the quantity; decimals are supported.
Sources & references
Last reviewed: