Stock average calculator

Your average cost per share across every buy, what the position is worth at today’s price, and how many more shares it would take to pull the average down to a number you can live with.

Disclosure: I earn nothing from this page. There are no affiliate links here, no broker deals, and nothing is gated. If that ever changes, I'll put it right here.

Every number below is arithmetic on the lots you type. The three example lots are only there so the page isn't empty. Replace them.

Your buys

LotSharesPrice paidCostShare of positionRemove
Added to each lot’s cost. Leave at 0 if your broker charges no commission on stock.
Average cost
–
Total shares
–
Worth now
–
Gain or loss on paper
–

Averaging down: what it takes to reach a target average

Defaults to the current price above
Shares to buy
–
Cash required
–
Shares after
–

Averaging down leaves you down the same dollars, just spread over more shares, with more of your money in one stock. The last tile shows how many shares you'd end up with and how much money that is.

Where the money went

Each block is one lot's share of your total cost.

How the average is calculated

Average cost is total dollars spent divided by total shares: (shares1 × price1 + shares2 × price2 + …) ÷ total shares. Commissions go into the dollars. A lot bought at a lower price pulls the average down in proportion to its size, which is why a small buy at a great price barely moves the number.

Shares to reach a target average. With S shares at average A, buying n more at price P gives a new average of (S × A + n × P) ÷ (S + n). Setting that equal to your target T and solving: n = S × (A − T) ÷ (T − P). The target has to sit between the buy price and the current average, or there's no answer.

Unrealized P/L is (current price − average cost) × shares. It's before the commission to sell and before tax, and you won't always get the last price when you actually sell.

Where to go next

What this isn't. Your broker’s cost basis can differ from this number: wash-sale adjustments, reinvested dividends, stock splits, and the lot method your broker uses (FIFO, specific identification, average cost for funds) all change what shows on the statement and on the tax form. For taxes, go by your broker's number.

Nothing here is investment advice, a recommendation, or a solicitation.