Stock average cost calculator

Buying a stock at several prices leaves you with one number that matters: your average cost. Enter each purchase to find it, compare it with the current price, and see how many more shares it would take to bring it to a target.

Your purchases

Shows how many more shares at the current price would get you there.

Average cost per share

$45.00

Total shares
150
Total cost
$6,750.00
Value now
$4,500.00
Unrealized profit or loss
-$2,250.00
-33.33%
Shares to reach the target
75
$2,250.00 more to invest

For education only, not investment advice. Results are estimates based on what you enter, and they leave out anything not shown, such as slippage and most taxes. Check the numbers with your broker or a licensed professional before acting on them.

The formula

Average cost
sum of (shares x price) / total shares
Shares to reach a target
shares x (average - target) / (target - current price)

Worked example

You bought 100 shares at $50 and another 50 at $35. The stock is now $30, and you want to know what it takes to get your average to $40.

  1. Total cost: (100 x $50) + (50 x $35) = $6,750.00
  2. Average: $6,750.00 / 150 shares = $45.00
  3. Unrealized result: 150 x $30 - $6,750.00 = -$2,250.00
  4. Shares to reach $40: 150 x ($45 - $40) / ($40 - $30) = 75

Your average is $45.00. Reaching $40 takes 75 more shares at $30, or $2,250.00 of new money.

Averaging down changes less than it feels like

A lower average makes the break-even look closer, but the new shares are a new decision and the old ones haven't got any better. Averaging down adds money to a position that has already gone against you, and the total at risk grows with each purchase. It is worth asking whether you would buy the stock today if you held none.

Averaging down on purpose, as part of a plan set beforehand with a limit on the total, is very different from adding to a loser to feel better about it.

Average cost and your tax records may differ

For US taxes, brokers generally track each purchase as its own lot, and sales of stock often default to first in, first out. The average price is the right figure for judging a position, but your reported gain on a partial sale can differ. Splits change the share count and price of every lot, so enter adjusted numbers if a split happened after you bought. Commissions can be included by adding them to the purchase price.

Frequently asked questions

How do I calculate my average stock price?

Multiply each purchase's shares by its price, add those totals, and divide by the total shares. Don't just average the prices, because a larger purchase should count for more.

Why does the target average have to be between two numbers?

A new purchase can only pull your average towards the price you buy at. If the stock is $30 and your average is $45, no number of shares can get you to $25 or $50.

Do dividends affect average cost?

Reinvested dividends buy new shares, so they count as purchases and can be entered as extra rows. Cash dividends don't change the average cost, but they are still part of your return.