Average cost formula
Shares to reach target = (Total cost − Target × Shares) ÷ (Target − New price)
Averaging down: think first
- Only add if your reason for owning the stock still holds.
- Set a maximum position size so one company cannot sink your portfolio.
- For taxes, brokers usually track cost basis per lot (FIFO by default in the U.S.).
Measure performance over time with the ROI calculator.
How to use the calculator
- Enter each purchase: number of shares and price paid. Include fractional shares if your broker allows them.
- Optionally add the current price to see the position’s value and gain or loss.
- Optionally enter a target average to see how many more shares you would need to buy at today’s price to reach it.
How extra purchases move the average
Starting from 100 shares at $50 and 50 at $40 (average $46.67):
| Extra shares bought at $40 | Total shares | Total cost | New average | Gain/loss at $45 |
|---|---|---|---|---|
| 0 | 150 | $7,000 | $46.67 | -3.6% |
| 25 | 175 | $8,000 | $45.71 | -1.6% |
| 50 | 200 | $9,000 | $45.00 | +0.0% |
| 100 | 250 | $11,000 | $44.00 | +2.3% |
| 150 | 300 | $13,000 | $43.33 | +3.8% |
| 200 | 350 | $15,000 | $42.86 | +5.0% |
Each additional purchase moves the average less, because it is a smaller share of the whole position. Getting all the way down to the current price is impossible — you can only approach it.
Should commissions be included?
For tax purposes, your cost basis includes commissions and fees paid to buy the shares. Most U.S. brokers now charge no commission on stock trades, but if you paid one, add it to the purchase total. Reinvested dividends also count as new purchases at the reinvestment price, which raises both your share count and your basis — forgetting them can lead to paying tax twice on the same money.
Cost basis methods for taxes
- Average cost is commonly used for mutual funds.
- FIFO (first in, first out) is the default for stocks at most U.S. brokers: the oldest shares are considered sold first.
- Specific identification lets you choose which lots to sell, for example the highest-cost lots to reduce a taxable gain.
The method affects how much gain you report when you sell part of a position, but not the overall profit of the whole position. Check your broker’s cost basis settings before selling.
Dollar-cost averaging vs. averaging down
Dollar-cost averaging means investing a fixed amount on a schedule, such as $500 every month, regardless of price; you automatically buy more shares when prices are low. It is widely used for diversified index funds through retirement plans. Averaging down means buying more of a single stock specifically because it fell. That can work when the business is sound and the drop is temporary, but it increases your exposure to one company exactly when the market is signaling a problem. A common guideline is to decide position limits in advance, for example no single stock above 5–10% of your portfolio.