Share Average Calculator

When you buy the same stock more than once, your cost per share is not the price of any single trade. It is the total you paid divided by the total number of shares you hold. Enter each purchase with its quantity and price, add the brokerage you paid per trade if you like, and the calculator returns your total shares, total cost and average price per share. Add the current price to see your profit or loss, or set a target average to find how many more shares to buy.

How to calculate your average share price

  1. 1

    Enter your purchases

    Type the number of shares and the price per share for each buy. Use Add another purchase for more rows, up to 20. Fractional shares are fine.

  2. 2

    Add the optional details

    Enter the brokerage you paid per trade, the current share price for a profit or loss figure, and a target average with the price you would buy more at.

  3. 3

    Read the result

    See your average price per share, total shares and total cost, then the profit or loss and the number of shares to buy for your target, if you filled those in.

How the average price of shares is worked out

The average price is a weighted average: each price counts in proportion to the number of shares bought at it.

average price = (sum of shares x price for every purchase + brokerage) / total shares

A simple average of the prices would be wrong whenever the quantities differ. If you buy 100 shares at 50 and 50 shares at 40, the simple average of the two prices is 45, but you paid 7,000 for 150 shares, which is 46.67 per share.

Worked examples

Purchases Total shares Total cost Average price
100 at 50 and 50 at 40 150 7,000 46.67
100 at 50 and 100 at 30 200 8,000 40.00
10 at 100 and 40 at 80 50 4,200 84.00
100 at 50 and 50 at 40, brokerage 10 per trade 150 7,020 46.80

Brokerage

The brokerage field is a flat amount charged on every purchase you entered, so two purchases with a brokerage of 10 add 20 to your cost. It raises your average price slightly, which is how most investors track their real cost basis. Selling costs are not included in the profit or loss figure.

Profit or loss

With a current price, the calculator shows the value of your shares today and the difference from your total cost, as an amount and as a percentage of that cost.

Reaching a target average

Averaging down means buying more shares at a lower price to pull your average cost down. Give the calculator a target average and the price you would buy at, and it solves for the number of whole shares:

shares to buy = (total cost + brokerage - target x total shares) / (target - buying price)

rounded up, so the new average lands at or just below the target. The brokerage you entered is counted once more for this extra purchase. Two cases have no answer to buy: if your average is already at or below the target, nothing more is needed, and if the buying price is not below the target, no number of shares can bring the average down to it.

  • Buying more of a falling stock lowers your average but also increases how much money you have in it.
  • A lower average only helps if the price later recovers above it.
  • Enter every price in the same currency.

Frequently Asked Questions

Multiply the shares by the price for each purchase, add the results, and divide by the total number of shares. For 100 shares at 50 and 50 shares at 40 that is (5,000 + 2,000) / 150 = 46.67 per share.

Yes, when you enter it. The brokerage per trade is added to your cost for every purchase, so the average shows what you really paid per share. Leave it empty to ignore fees.

Fill in the target average and the price you would buy at. The calculator returns the whole number of shares to buy, the cost of that purchase and your new average. The buying price must be lower than the target.

Your current average is already at or below the target you entered. Averaging down only makes sense when the target is lower than what you currently pay per share on average.

No. The figures you type are sent to our server to work out the result, and they are added to the page link as you move between steps so a calculation can be bookmarked or shared. They are not saved to any account or profile.

Related Tools

Tool available in other languages