Toolvito

Works on this device

Stock Average Price Calculator

Enter each buy of a share with its price. The calculator gives your average price for one share, the total cost and the average after every buy. It can also tell you how many shares to buy to reach an average you want, and what your average cost is after you sold some shares.

Enter your values

Enter each buy on its own row. Use this to average down or average up, and to see your break-even price.

Your values

Fill this in to see the value of your shares and the gain or loss at that price.

Your buys

Fee: the commission or other cost of that buy. A fee is money, so use at most 2 decimal places.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose Average price of several buys.
  2. Enter the number of shares and the price for one share of each buy, one buy on each row. Add the fee of a buy if you want it in the average.
  3. Choose Add buy for more rows.
  4. Choose Calculate. The result shows the average price, the total shares and the total cost. The table shows the average after each buy.
  5. Fill in Price now to see the value of your shares and the gain or loss at that price.

What each calculation does

  • Average price of several buys: the average price with or without fees. Use it when you average down or average up.
  • Shares to buy to reach an average price: how many shares you need at the price now to bring your average to a price you choose.
  • Average cost after buys and sells: your buys and sells in time order, with the average cost method. It also gives the gain or loss on the shares sold.
  • Volume weighted average price (VWAP): the average of trade prices where each price counts by its volume.
  • Plain average of a list of prices: the simple average of prices that you paste, for example 20 closing prices.

The formulas

  • Average price = (sum of shares × price + fees) ÷ total shares.
  • Shares to buy = shares you hold × (average now − average you want) ÷ (average you want − buy price).
  • Average cost method: a sale takes shares out at the average cost at that moment. Result of a sale = shares × price − fee − shares × average cost.
  • VWAP = sum of price × volume ÷ total volume.
  • Plain average = sum of the prices ÷ number of prices.

Worked example

You bought 100 shares at 50 and later 50 shares at 40. The total cost is 100 × 50 + 50 × 40 = 7,000 for 150 shares. The average price is 7,000 ÷ 150 = 46.6667.

Reaching an average: you hold 100 shares at an average of 50 and the price is now 40. To bring the average to 45 you need 100 × (50 − 45) ÷ (45 − 40) = 100 more shares, which cost 4,000.

After a sale: with the two buys above, you sell 60 shares at 55. The sale brings in 3,300 and takes out 60 × 46.6667 = 2,800 of cost, so the gain is 500. You keep 90 shares that cost 4,200. Their average cost is still 46.6667.

VWAP: 500 shares traded at 10, 300 at 10.20 and 200 at 9.90. The traded value is 10,040 for 1,000 shares, so the VWAP is 10.04.

Limits you should know

  • The result is arithmetic on the figures you typed. It is not investment advice. A lower average price does not tell you whether to buy more of a share.
  • This tool has no market data. It cannot look up a price, a 52-week average or the trades of a day. You type or paste every price.
  • The average cost method is one way to work out the cost of shares sold. Tax rules in many countries ask for another method, such as first in, first out. The gain or loss shown here is not a tax figure.
  • An average price can move toward the price of a new buy, and it can never pass that price.
  • Share splits and bonus shares are not adjusted for you. After a split, type the new number of shares and the new price of the old buys.
  • Money totals are rounded to cents once, at the end. A fee is typed with at most 2 decimal places. A price for one share and a number of shares may have more decimal places.

Related tools