How to calculate average cost per share after several buys

How to calculate average cost per share after several buys

Buy the same stock at three different prices and your broker shows one number: the average cost per share. Work it out yourself to check that figure, to plan the next buy, or to answer a question about the price you paid over a year.

Why the average of the prices is the wrong number

Say you bought 100 shares at $50 and later 50 shares at $40. The two prices average out to $45, but you did not pay $45 a share. You spent $7,000 on 150 shares, which is $46.67 each. The bigger purchase pulls the average toward its own price.

The wrong figure has real effects. You may think a position is back to break-even when it is still under water, or size the next purchase on a number that is too low. A question that asks for the average price you paid per share over the course of a year wants the weighted figure as well, not the mean of the prices.

Use the Stock Average Calculator

The Stock Average Calculator takes one row per purchase, with the number of shares and the price per share. Add a row for every buy, fractional shares included. It returns the average cost per share, the total shares, and the total cost.

Enter the current share price as well and it shows the market value and your profit or loss. With the two purchases above and a price of $45, the 150 shares are worth $6,750, a loss of $250, or 3.57%. The calculator leaves out commissions and fees unless you add them to the price, and it does not handle sales.

Calculate your average cost per share

  1. List every purchase with its share count and its price per share.
  2. Multiply shares by price for each purchase to get what you spent on it.
  3. If you paid a commission on a purchase, add it to that purchase's total.
  4. Add up the money spent and the shares bought.
  5. Divide the total spent by the total shares. The result is your average cost per share.
  6. Check it in the Stock Average Calculator, and enter the current price to see your profit or loss.

What the average cost per share does not tell you

  • Fees and commissions are left out unless you add them to the price per share.
  • Sales are not handled. Tax cost basis can follow rules such as FIFO, which may give a different figure.
  • A lower average after buying a dip does not mean the stock will recover. The result is an estimate, not advice.

Frequently asked questions

Is average cost per share the same as the average of the prices?

Only when every purchase has the same number of shares. Otherwise, weight each price by its share count.

How do I calculate average cost per share with fees?

Add each commission to that purchase's total, then divide the combined total by all the shares.

Does buying more shares at a lower price lower my average?

Yes. 100 shares at $50 plus 50 shares at $40 brings the average down from $50 to $46.67.

What was the average price I paid per share over the year?

Add what you paid for every share bought that year, then divide by the number of shares.

Tools used in this guide

More from the blog

All guides