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 will say so right here, in this spot, before anything else.

Every number below is arithmetic on the lots you type. The three example lots are only there so the page is not 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
Position now
Unrealized

Averaging down: what it takes to reach a target average

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

A lower average is not a smaller loss. It is the same loss spread over more shares, plus new money at risk in the same name. The tile on the right shows how much bigger the position becomes.

Where the money went

Each block is one lot’s share of your total cost. The big block is the price that matters.

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 is no answer.

Unrealized P/L is (current price − average cost) × shares. It is gross: no selling commission, no tax, and no guarantee the bid is where the last print was.

Where to go next

What this is not. 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. Use the broker’s figure for taxes and this one for thinking.

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