Stock average cost calculator

Average price per share across several buys, and how many shares to buy to reach a target average.

  • ๐Ÿ‡บ๐Ÿ‡ธ US federal & state rules
  • See sources

Example: 20 150 means 20 shares at $150.

$
$
$

Shows how many shares to buy at the current price to reach it.

Example

Average cost per share

$130.00

45 shares over 3 buys

Total shares
45
Total cost
$5,850.00
Value at $105.00
$4,725.00 (-19.23%)

This is an example. Enter your numbers above and press the button to see your own result.

Running average

Buy 1: 20 at $150.00average so far $150.00
Buy 2: 10 at $120.00average so far $140.00
Buy 3: 15 at $110.00average so far $130.00

To bring your average to $120.00

Shares to buy30 (round up to 30)
Money needed$3,150.00
New average with whole shares$120.00
  • Fees are added to the cost basis. The average uses every lot, which matches the average cost method mutual funds may use. For stocks, brokers usually track each lot (FIFO by default).
Show the math
Average($5,850.00 + $0.00 fees) รท 45 shares = $130.00

What to do next

How it works

Each line is one purchase: number of shares, then the price per share. The calculator adds the dollars and shares, includes any commissions, and divides. The running average shows how each buy moved it.

With a current price and a target, it solves for the number of shares to buy at that price so that the new average equals the target. A target can only be reached if it sits between the current price and your average.

Things to keep in mind

For taxes, the IRS lets brokers use first in, first out or specific lot identification for stocks. The average cost method is mainly for mutual fund shares.

Sources

Frequently asked questions

How do I calculate my average cost per share?

Add up what you paid for every buy, then divide by the total shares. 10 shares at $100 plus 10 at $80 is $1,800 for 20 shares, an average of $90.

How many shares do I need to buy to lower my average?

Solve (current shares ร— average + new shares ร— price) รท (total shares) = target. With 100 shares at $50 and a $30 price, buying 100 more brings the average to $40.

Does averaging down make sense?

It lowers your break-even price, but it also puts more money into a position that has fallen. Decide based on the company, not just the average.

Is this the same as the cost basis on my 1099-B?

Not always. Brokers usually use first in, first out for stocks unless you pick specific lots, so the basis for each sale can differ from the simple average.

Related tools