CalcThis CalcThis
Average cost per share

Stock Average Calculator

Add each purchase — shares and price — and get your average cost per share. Then type today's price and a target to see how many more shares to buy. Buying 50 shares at 200 and 100 at 150 averages 166.67, not 175.

Your purchases

SharesPrice per share

Add the current price to see your gain or loss, and a target to see how many shares to buy at that price.

Average price per share
—
Enter shares and price for at least one purchase.
Average price
—

How to use the stock average calculator

Enter the shares and the price per share for each purchase and tap Add purchase for more. The big number is your average cost per share; the table shows your total shares, total cost and your lowest and highest buy. Fractional shares work.

Type the current price to see what your holding is worth and your gain or loss. Add a target average as well and the calculator tells you how many shares to buy at today's price to reach it, what that purchase costs and your new average.

The average cost formula

Average cost = total cost ÷ total shares (SHARES₁ × PRICE₁ + SHARES₂ × PRICE₂ + …) ÷ (SHARES₁ + SHARES₂ + …)

You buy 50 shares at 200 and 100 shares at 150. The total cost is 50 × 200 + 100 × 150 = 25,000 for 150 shares, so the average is 25,000 ÷ 150 = 166.67. Averaging the two prices (175) is wrong because it ignores that you bought twice as many shares at 150.

Averaging down: how many shares to buy

Say you hold 100 shares bought at 50 (cost 5,000), the price is now 40 and you want an average of 45. Buying x more shares at 40 gives (5,000 + 40x) ÷ (100 + x) = 45, so x = (45 × 100 − 5,000) ÷ (40 − 45) = 100 shares. The new average is 45 on 200 shares.

The general rule: shares to buy = (target × shares − cost) ÷ (price − target). The new average always lands between your current average and the price you buy at, so a target outside that range can't be reached with one purchase — the calculator tells you so.

Good to know

  • Fees — under Go advanced, add a flat fee per purchase and it is included in the cost and in the solver.
  • Selling — this tool covers buying. After a sale the cost basis depends on the method your broker or tax authority uses (average cost, FIFO or specific lots).
  • Not advice — averaging down adds to a losing position; the calculator shows the arithmetic, not whether it is a good idea.

For the average of any other list of numbers use the average calculator; for values with different weights, the weighted average calculator.

Common questions

How do you calculate the average price of a stock?

Divide your total cost by your total shares. Buying 50 shares at 200 and 100 shares at 150 costs 25,000 for 150 shares, so the average price is 166.67.

Why isn’t it just the average of the prices?

Because the purchases are different sizes. The plain average of 200 and 150 is 175, but you bought twice as many shares at 150, so your real average is 166.67. This is a weighted average, with the share counts as the weights.

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

Use the target solver: shares to buy = (target × shares − cost) ÷ (price − target). With 100 shares bought at 50, a price of 40 and a target of 45, you need 100 more shares. Enter your current price and target in the calculator for your own numbers.

Can I get my average below the current price?

No. Any new purchase pulls the average toward the price you buy at, so it can get close to the current price but never below it. A target outside the range between your average and the current price is reported as not reachable.

Do fees change my average cost?

Yes — fees add to what you paid. Open Go advanced and enter a flat fee per purchase; it is added to every buy and to the new purchase in the solver.

Does this work for crypto or fractional shares?

Yes. Shares can be any positive number, including fractions, so it works for fractional shares, ETFs and crypto — enter the amount bought and the price paid.

Does this handle selling shares or tax lots?

No. It calculates the average cost of purchases. How a sale changes your cost basis depends on the method your broker or tax authority uses, so check that separately.