How this stock average calculator works
When you buy the same stock multiple times, each purchase may have a different price and fee.
This calculator computes your weighted average buy price so you can see the
true cost per share across all lots combined.
For each lot, we calculate:
- Lot cost = shares × price per share + fees
Then we add everything together:
Total shares = sum of shares for all lots
Total cost = sum of lot costs (including fees)
Average price = Total cost ÷ Total shares
If you enter a current market price, the calculator also shows market value and unrealized
profit or loss:
Market value = Total shares × current price
Unrealized P/L = Market value − Total cost
Return % = Unrealized P/L ÷ Total cost
Example: averaging down your stock position
Suppose you buy a stock three times:
- Lot 1: 50 shares at $20.00
- Lot 2: 50 shares at $16.00
- Lot 3: 100 shares at $14.00
Ignoring fees for simplicity:
Total shares = 50 + 50 + 100 = 200
Total cost = (50 × 20) + (50 × 16) + (100 × 14)
= 1,000 + 800 + 1,400
= 3,200
Average price = 3,200 ÷ 200
= 16.00
Your average buy price is now $16.00 per share.
If the current market price rises above $16, you are in profit overall,
even though your first lot was at $20.
Why fees matter for your true average price
Brokerage commissions, exchange fees and transaction taxes all increase the
real cost of buying shares. Ignoring them can make your average price look
lower than it actually is.
In this calculator, each lot has its own optional fee field.
These fees are added to the lot cost before the average price is computed,
so your result reflects a more realistic break-even level.
Tips for using the stock average calculator
- Only fill in the lots you actually used – leave the rest blank.
- Use the same currency for all prices and fees.
- Include both buy commissions and any per-trade taxes as fees.
- Update the current price occasionally to track unrealized profit or loss.
Frequently asked questions
Does this work for fractional shares?
Yes. You can enter decimal numbers for both shares and prices. Many brokers
now allow fractional share purchases, and the calculator supports that.
Is this the same as “dollar-cost averaging”?
The idea is related. Dollar-cost averaging is an investing strategy where you
invest a fixed amount regularly. The calculator simply shows the resulting
average price per share of the trades you enter, whatever strategy you used.
Can I use this for ETFs and crypto?
Yes. As long as you have trades with shares/units, prices and fees, the math
is the same — the tool doesn’t care whether it’s a stock, ETF or token.