Home ↓
CalculatorsVerified

Finance & Loans

Average Cost Basis Calculator (Average Share Price)

When you buy shares of the same company or fund at different times and prices, your average cost per share tells you what you have paid on average and what the share price must reach for you to break even. It is calculated by adding up the total amount spent on all purchases, including any commissions or fees, and dividing by the total number of shares bought. If you buy 100 shares at 50 and later another 100 shares at 30, you have spent 8,000 on 200 shares, an average of 40 per share. This is why investors talk about averaging down: buying more after the price has fallen lowers the average cost. Whether that is wise depends on why the price fell; adding to a losing investment increases your exposure to it, so the arithmetic is only part of the decision. Regular investing of a fixed amount, known as dollar-cost averaging, also produces an average cost, and because a fixed sum buys more shares when prices are low, the average cost per share ends up below the simple average of the prices paid. Enter each purchase on its own line with the number of shares, the price per share and, optionally, the fee. Add the current price to see the market value, the unrealised gain or loss, the percentage return and the break-even price. Tax rules on cost basis vary: some countries require an average-cost method for shares of the same company, while others use first-in, first-out or allow you to identify specific lots when you sell, so check the rules that apply to your account.

¤

How to use this calculator

  1. Enter each purchase on a new line as shares, price per share and optional fee.
  2. Include all purchases of the same share or fund that you still hold.
  3. Optionally enter the current share price.
  4. Read the average cost per share and total cost.
  5. Compare with the current price to see your gain or loss and break-even price.

Fees and reinvested dividends

Including purchase fees in the cost gives a truer break-even price. Reinvested dividends count as new purchases at the price on the reinvestment date, and should be included as extra lines.

Keeping records of every purchase, including small dividend reinvestments, makes it much easier to calculate gains correctly when you sell.

Selling part of a holding

When you sell some shares, the cost basis of the shares sold depends on the method used. Under average cost, each share sold carries the average cost; under first-in, first-out, the oldest purchases are sold first.

The method can change the taxable gain considerably when prices have moved a lot, so confirm which method your tax authority and broker use.

Formula & method

Total cost = Σ (shares × price + fee)Average cost per share = total cost ÷ total sharesUnrealised gain = (current price − average cost) × total sharesTax rules for cost basis (average, FIFO, specific lots) differ by country

Total cost = Σ(shares × price + fee). Average cost = total cost ÷ total shares. Unrealised gain = current price × shares − total cost. Return = gain ÷ total cost × 100.

Worked example

Two purchases: 100 shares at 50 and 100 shares at 30

  1. Total cost = 100 × 50 + 100 × 30 = 8,000.
  2. Average cost = 8,000 ÷ 200 = 40.
  3. At a current price of 45: value 9,000, gain 1,000 (12.5%).

Answer: Your average cost is 40 per share, and at 45 you are 1,000 ahead.

Frequently asked questions

What does averaging down mean?

Buying more shares after the price has fallen, which lowers your average cost per share; it can also increase your exposure to a falling investment, so it is a decision about risk, not just arithmetic.

Does the tax office use my average cost?

It depends on the country and account: some require average cost for shares of the same company, others use first-in, first-out or let you choose specific lots.

Should I include fees?

Yes, purchase fees are usually part of the cost basis and raise your break-even price.

What about stock splits?

Adjust your share count and prices for splits, or use the split calculator; the total cost stays the same.

Can I use this for crypto or funds?

Yes, the arithmetic is the same for any asset bought in units at different prices.

Why is my average below the average price?

If you invested equal amounts, you bought more units when prices were low, which pulls the average cost down.