Average Cost Calculator

List every buy of the same stock and get your average cost per share. Then see how many shares you would need at today's price to pull that average down to a target.

By kkun · Updated November 5, 2026

Your buysUSD
Average down to a targetoptional
$
$
Resultper share
Average cost—
Total shares—
Total spent—
Value at price now—
Gain / loss now—
Shares to buy for target—
Cash needed for target—

How average cost is calculated

Average cost = total dollars spent ÷ total shares owned. If you bought 40 shares at $185 and 25 more at $151, you spent $7,400 + $3,775 = $11,175 on 65 shares, so your average is $171.92. It is a weighted average: the buy with more shares pulls the number harder.

How many shares to reach a target average

To move your average to a target T by buying at today's price P, you need shares × (average − T) ÷ (T − P) more shares. This only works when today's price is below the target and the target is below your current average. The closer the target sits to today's price, the more shares it takes, and the number climbs fast.

Before you average down

A worked example

Say you bought 40 shares of a stock at $185, it slid, and you bought 25 more at $151. Your average is $171.92. The stock now trades at $142.30 and you would like your average to be $160. Each new share at $142.30 pulls the average down by a little less than the one before, and the formula says you need 44 more shares, about $6,260. Ask for $165 instead and it drops to 20 shares. Ask for $150 and it jumps to 186 shares, about $26,500. That curve is the real lesson: the last few dollars of a lower average are the most expensive.

Common questions

Do commissions change my average cost?

For tax purposes in the U.S., yes: fees paid to buy are added to your cost basis. Most brokers charge $0 for stocks today, so it rarely matters. If yours does charge, add the fee to the price of that buy, or divide it by the shares and add it per share.

What happens to my average after a stock split?

The average divides by the split ratio and your share count multiplies by it, so your total cost stays the same. After a 4-for-1 split, 10 shares at $400 become 40 shares at $100. Your broker adjusts this automatically.

Do reinvested dividends count as buys?

Yes. Every dividend reinvestment is a small purchase at that day's price and becomes part of your cost basis. Leaving them out makes your average look higher than it is and your gain look bigger than it is.

Is averaging down a good idea?

It depends entirely on why the price fell. Adding to a broad index fund in a market drop has historically worked out over long periods. Adding to a single company whose business is breaking down can turn a small loss into a large one. The calculator tells you the cost, not whether it is worth paying.