If you have bought the same stock, fund or coin more than once, you probably own shares at several different prices. Your average cost per share is the single number that tells you where you break even. This calculator combines any number of purchases, includes commissions, shows your gain or loss at today’s price, and works out how many more shares you would need to buy to pull the average to a target.
How to use the average cost calculator
- List each purchase on its own line as shares @ price, for example
100 @ 50. Add a third number for a commission:75 @ 38 1.50. Fractional shares are fine. - Optionally enter the current share price to see the market value and unrealized gain or loss.
- To plan a new purchase, enter a target average cost and the price of the next purchase. The calculator returns the number of shares and dollars needed.
Average cost formula
The average cost is a weighted average — larger purchases count for more:
To reach a target average T by buying more shares at price P, when you currently hold S shares at average A:
The formula comes from setting (S·A + n·P) ÷ (S + n) equal to T and solving for n.
Worked example
You bought a stock three times: 100 shares at $50, 50 shares at $42.50, and 75 shares at $38 with a $1.50 commission.
Total cost = 5,000 + 2,125 + 2,851.50 = $9,976.50
Average cost = 9,976.50 ÷ 225 = $44.34 per share
At today's price of $41, the position is worth $9,225 — an unrealized loss of $751.50 (−7.53%)
To bring the average down to $42 by buying at $36:
n = 225 × (44.34 − 42) ÷ (42 − 36) ≈ 87.75 shares, costing about $3,159
After that purchase you would own about 312.75 shares at an average of $42, so a rebound to $42 would put you back at break-even instead of $44.34.
Averaging down vs. dollar-cost averaging
These sound alike but are different decisions:
| Approach | What triggers a purchase | Main risk |
|---|---|---|
| Dollar-cost averaging | The calendar — a fixed amount every week or month | Little; it simply spreads purchases over time |
| Averaging down | A falling price in a stock you already own | Adding to a loser and concentrating the portfolio |
| Averaging up | A rising price in a winner | Raising your break-even and buying at higher valuations |
Dollar-cost averaging into a diversified fund automatically buys more shares when prices are low. Averaging down into a single company is a bet that the drop is temporary.
Average cost and taxes
Your broker tracks cost basis lot by lot. When you sell part of a position, the gain depends on which lots are sold — by default first-in, first-out for stocks, or specific lots you choose. The IRS allows the average-cost method mainly for mutual fund shares and some dividend reinvestment plans. Use the stock profit calculator for a single sale and the capital gains tax calculator to estimate the tax.
This calculator is a tracking and planning aid, not investment advice. Your broker's cost-basis records are authoritative for taxes.
Frequently asked questions
How do I calculate my average cost per share?
Add up what you paid for every purchase, including commissions, and divide by the total number of shares you own. Buying 100 shares at $50, 50 at $42.50 and 75 at $38 (plus a $1.50 fee) costs $9,976.50 for 225 shares, an average of $44.34.
How many shares do I need to buy to lower my average?
Use n = S × (A − T) ÷ (T − P), where S is the shares you own, A your current average, T the target average and P the new purchase price. The target must lie between your current average and the new price, or no purchase can reach it.
Is averaging down a good strategy?
It lowers your break-even price, but it also puts more money into a position that has already fallen. It makes sense only if your reasons for owning the stock still hold. Many investors cap any single holding at a fixed share of the portfolio to avoid over-concentration.
Is average cost the same as my tax cost basis?
Not always. For individual stocks, US brokers default to first-in, first-out unless you pick specific lots, so the basis of the shares you sell may differ from the average. The average-cost method is generally allowed for mutual fund shares and certain dividend reinvestment plans.