Free online tool

Stock Average Cost Calculator

Bought the same stock at different prices? Add each buy lot to find your true average cost per share, how many shares you hold, and — with a current price — whether you're up or down.

Average cost per share Total shares & cost Profit or loss
Your buy lots
SharesPrice paidCost
$
Average cost per share
$0.00
Total shares
0
Total invested
$0
Current value
—
Unrealised profit / loss: —

Estimates are for illustration and education only — not financial advice. This tool ignores commissions, fees and taxes, which affect your true cost basis.

Good to understand

What your average cost really tells you

Your average cost per share is simply your total money invested divided by your total shares. When you buy the same stock more than once at different prices, this blended number — not any single purchase price — is your real break-even point.

Averaging down, and its risk

Buying more shares as a price falls lowers your average cost, so the stock needs a smaller rebound for you to break even. That's "averaging down." It can work well for a solid company on sale — but it also means putting more money into something that's losing, so it magnifies the damage if the decline is justified.

Cost basis and taxes

For tax purposes your cost basis also includes commissions and fees, and brokers may track it per-lot rather than as a single average. This calculator gives the simple blended average; check your brokerage statements for the exact figures at tax time.

Once you know your position, project where regular investing could take it with our dollar-cost averaging calculator.

The math

The average cost formula

Your average cost per share is a weighted average — bigger purchases pull it toward their price. It's just total money in, divided by total shares held.

Average cost = Σ (shares × price) ⁄ Σ shares
Sum the cost of every buy lot, then divide by the total number of shares across all lots.
Unrealised P/L = (Current price − Avg cost) × Shares
Positive means a paper gain, negative a paper loss — "unrealised" until you actually sell.
Worked example. You buy 10 shares at $120 ($1,200), 15 at $95 ($1,425) and 8 at $140 ($1,120). That's 33 shares for $3,745, so your average cost is $3,745 ÷ 33 = $113.48 per share. At a current price of $130 the position is worth $4,290 — an unrealised gain of about $545, even though your most recent buy is under water.
Get it right

Averaging down vs averaging up

Adding shares at a different price always moves your average. Whether that's smart depends entirely on why the price moved.

Averaging down lowers avg

  • Buying more as the price falls pulls your average cost down
  • Needs a smaller rebound to reach break-even
  • Sensible for a strong company temporarily on sale
  • Risky if the drop reflects a real, lasting problem

Averaging up raises avg

  • Buying more as the price rises lifts your average cost
  • Adds to a position that's already working
  • Confirms conviction in a winning holding
  • Reduces your margin of safety if momentum reverses

Average cost is your break-even. It's the price the stock must reach for your whole position to be in the black — a far more useful reference point than any single purchase price when you own multiple lots.

Cost basis and tax. For taxes, your cost basis also includes commissions and fees, and brokers may report it per-lot (allowing methods like FIFO or specific-lot identification) rather than as one blended average. This tool gives the simple average; rely on your brokerage's cost-basis records at tax time.

Worked through

How each lot shifts the average

Watch the running average move as lots are added. A larger lot at a lower price does the most to pull the average down.

Lot Shares Price Cost Running avg
Buy 1 10 $120 $1,200 $120.00
Buy 2 15 $95 $1,425 $105.00
Buy 3 8 $140 $1,120 $113.48

The big middle lot at $95 dragged the average from $120 down to $105; the smaller, pricier third lot nudged it back up only modestly. Weight — shares times price — is what matters, not the number of transactions.

Quick answers

Average cost calculator FAQ

Is this stock average cost calculator free?
Yes — it's free, runs entirely in your browser, and your numbers never leave your device.
How is average cost calculated?
It's your total amount invested divided by your total number of shares — a single blended price across all your buy lots.
Does it include fees and commissions?
No. It uses share count times price only. Your true tax cost basis also includes commissions and fees, so check your brokerage records for exact numbers.
Can I enter fractional shares?
Yes — the shares field accepts decimals, so fractional-share purchases work fine.
What does the profit/loss figure mean?
If you enter a current price, it shows your unrealised gain or loss: current value minus total invested. It's "unrealised" until you actually sell.
Is this financial advice?
No — it's an educational tool. Averaging down can increase risk. Consult a qualified advisor before making investment decisions.