Stock average calculator

This stock average calculator works out the weighted average cost of several purchases. Example: 100 shares at 50, 100 at 40 and 50 at 36 give 43.20 on 250 shares and 10,800 invested.

Source: Wikipedia – Weighted arithmetic mean. Updated: .

Number of shares in this purchase; empty rows are ignored.
Price per share at purchase, excluding fees.
For the calculated change against the average cost; leave empty if not needed.
My ToolboxYour inputs are saved in this browser only.

Result

Average cost
Average cost = 43.20 (250 shares, invested 10,800)
Individual purchases
PurchaseSharesPriceAmount
Purchase 1100505,000
Purchase 2100404,000
Purchase 350361,800
Working
  • Total invested = 100 × 50 + 100 × 40 + 50 × 36 = 10,800
  • Total shares = 100 + 100 + 50 = 250
  • Average cost = 10,800 ÷ 250 = 43.20
  • Change versus current price 48: (48 − 43.20) ÷ 43.20 = 11.11%
Calculated weighted mean of the purchases entered, without fees, taxes or dividends; not investment advice. How purchases are allocated for tax or accounting purposes depends on the method used (for example average cost or FIFO).

How it is calculated

The average cost (average purchase price) is the weighted mean of all purchase prices in a position. If you buy a stock, an ETF or a cryptocurrency in several tranches, you get a single cost basis per share.

Formula

Average cost = sum of (shares × price) ÷ sum of shares. The weighting uses the number of shares because larger purchases count for more than small ones. A simple average of the prices would only be right if all purchases had the same size.

Example

Purchase 1: 100 × 50 = 5,000. Purchase 2: 100 × 40 = 4,000. Purchase 3: 50 × 36 = 1,800. Total invested 10,800 for 250 shares, so 10,800 ÷ 250 = 43.20. With only the first two purchases (equal size) it would be the simple mean 45.00.

Frequently asked questions

How do you calculate the average cost of several purchases?

Add up all amounts (shares × price) and divide by the total number of shares. In the example 10,800 ÷ 250 = 43.20.

Why is a simple average of the prices not enough?

Because the purchase sizes differ. The simple mean of 50, 40 and 36 would be 42.00, the weighted value 43.20.

What is the cost basis per share?

It is another name for the average cost: the mean purchase price per share, from which the calculated gain or loss against the current price follows.

Sources and legal basis

As of: · Editorial policy

Related tools