Stock Average Calculator
Use this stock average calculator to find your average cost per share after buying the same stock or ETF several times at different prices. Add today's price to see your gain or loss, or switch to Target mode to see how many shares it takes to average down or up to a chosen price.
Updated
Results
- Total shares
- Total costAll purchases plus fees
- Average price per share (excl. fees)
- Total fees
- Market valueShown when you enter a current price
- Unrealized gain/lossMarket value minus total cost
- Gain/loss on cost
- Shares to buy (exact)Target mode
- Shares to buy (whole shares)Rounded up
- Cost of the new purchaseWhole shares plus fee
- Shares after the purchase
- New average cost per shareWith the whole shares bought
| Purchase | Shares | Price per share | Fee | Cost | Share of position |
|---|
Results are estimates. See the methodology below.
How to use the calculator
- Choose a mode. Average shows the position you hold; Target solves for the shares to buy.
- Enter your purchases. For each buy, type the number of shares and the price per share. Fractional shares are fine. Open the extra rows for up to ten purchases; empty rows are ignored.
- Add fees if you paid any. A commission or other trading fee goes in the fee field of that purchase, in dollars.
- Current price (optional). Enter today's price to see market value and your unrealized gain or loss in dollars and percent.
- Target mode: enter the price you expect to pay, the average you want to reach and an optional fee.
How the average cost is calculated
The calculator adds up what every purchase cost and divides by the total number of shares:
Average cost = (Σ shares × price + Σ fees) ÷ Σ shares
That is your cost per share including fees, which matches how the IRS describes basis for stock you buy: the purchase price plus costs such as commissions. A second figure, average price, leaves fees out so you can compare it with the number your broker shows.
Gain or loss = shares × current price − total cost. The percentage is measured against total cost, fees included.
Target mode
To reach a target average T by buying x shares at price P with fee f:
x = (total cost + f − T × shares held) ÷ (T − P)
Because you may only be able to buy whole shares, the calculator also rounds x up and shows the average you actually end with. A target is reachable only if it lies between the new price and your current average: you can't average down to $40 by buying at $45.
Worked examples
1. Three purchases of the same stock
You bought 100 shares at $48.50, 50 at $42.00 and 75 at $39.20. That is 225 shares for $9,890.00, an average cost of $43.96 per share (the calculator shows $43.9556). The first purchase is 44.4% of the position. At a current price of $41.00 the shares are worth $9,225.00, an unrealized loss of $665.00, or −6.72%.
If each trade had a $4.95 commission, fees total $14.85, the average cost rises to $44.02 while the average price stays at $43.96, and the loss becomes $679.85 (−6.86%).
2. Averaging down
| Buy at | Target average | Shares to buy | Cost | Shares after |
|---|---|---|---|---|
| $38.00 | $42.00 | 110 | $4,180.00 | 335 |
| $38.00 | $40.00 | 445 | $16,910.00 | 670 |
Each step closer to the new price costs much more. Getting to $40 takes $16,910.00, well over the $9,890.00 you have already invested.
3. Averaging up
If the stock instead trades at $52.00 and you accept a $45.00 average, the exact answer is 33.57 shares. Rounded up to 34 shares, the purchase costs $1,768.00 and leaves you with 259 shares at an average of $45.01.
How to read the result
Your average cost is your break-even price before selling costs. It says nothing about where the price goes next. Averaging down lowers your break-even, but it also puts more money into a position that has already fallen. This page is a calculation, not a strategy recommendation.
Not modeled: sales, lot-by-lot identification, wash-sale adjustments, reinvested dividends and stock splits. After a split, enter split-adjusted figures: in a 2-for-1 split the example above becomes 200, 100 and 150 shares at $24.25, $21.00 and $19.60, still $9,890.00 in total, with an average of $21.98.
Frequently asked questions
Should I include commissions and fees?
Yes, if you paid them. The IRS says the basis of stock you buy is the purchase price plus costs such as commissions and transfer fees. If your trades were commission-free, leave the fee fields blank and both averages will be the same.
Is my average cost the same as my tax cost basis?
Not always. When you sell only part of a position, the basis of the shares you sold depends on the method used. According to FINRA, firms generally use the IRS default, first in, first out (FIFO), unless you choose another method such as specific share identification, and the average cost method may be available for certain mutual fund and dividend reinvestment shares. Your broker reports cost basis on Form 1099-B; use that for taxes and this calculator for your break-even.
What does averaging down mean?
It means buying more shares after the price has fallen, which lowers your average cost. In the example above, 110 more shares at $38.00 bring the average from $43.96 to $42.00. The trade-off is a bigger stake in the same stock.
Is averaging down the same as dollar-cost averaging?
No. Investor.gov describes dollar-cost averaging as investing your money in equal portions at regular intervals, whatever the price. Averaging down is a decision to buy because the price dropped. The calculator works for both: enter each purchase and it gives the resulting average.
Why does the calculator say my target can't be reached?
A new purchase can only pull your average toward its own price. If you buy at $38.00, any target between $38.00 and your current average works; a target below $38.00 or above the current average does not. Change the target or the expected price.
Sources
This calculator is for educational purposes only and is not investment or tax advice. Use your broker's statements and Form 1099-B for tax reporting.