Skip to content
TraderCalcs.io

Stock Average Price Calculator

Add each purchase to calculate total shares, total cost and the weighted average cost per share.

When shares are bought in more than one transaction, the cost basis becomes a weighted average rather than any single price paid. This stock average price calculator returns that figure — the average cost per share a broker reports, and the number every unrealised gain or loss is measured against.

Formula: average cost = Σ(shares × price) ÷ Σ shares

Your figures

Share purchases

Enter the number of shares and the price paid for each buy.

Purchase 1
Purchase 2

Optional — price per share now. Shows the holding's value and unrealised profit.

Results

Average cost per share

US$21.68

across 250 shares

Total shares
250
Total cost
US$5,420.00
Purchases counted
2

What this means

2 purchases totalling US$5,420.00 give an average cost of US$21.68 per share. This is a weighted average — purchases of more shares pull it further than smaller ones — and it is the figure unrealised profit is measured against.

  • Excludes commission and stamp duty. Add those to the price paid if you want them in the cost basis.
  • Tax rules on cost basis vary by jurisdiction; some require specific matching rules rather than a simple average.

Average cost per share: US$21.68

The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.

About the Stock Average Price calculation

It takes each purchase as a share count and a price, and returns the total shares, the total cost and the weighted average cost. Adding a current price shows the market value and the unrealised gain or loss.

The weighting is what separates an average share price calculator from a simple mean. Buying 10 shares at $100 and 1,000 shares at $10 gives an average close to $10.89, not the $55 that averaging the two prices would suggest.

Stock Average Price formula

total cost   = Σ (shares × price)
total shares = Σ shares
average cost per share = total cost ÷ total shares

market value = total shares × current price
unrealised profit = market value − total cost
Σ
The sum across all purchases.
cost basis
The total amount paid, which unrealised profit is measured against.

Each price is weighted by the number of shares bought at it, so larger purchases pull the average further. This is why the result differs from a simple mean of the prices unless every purchase was for the same number of shares.

The average is a single figure summarising the whole position. It does not track which specific shares were bought when, which matters because some tax regimes require exactly that.

Unrealised profit is measured against total cost rather than against the average price, though the two are equivalent — average price times share count is total cost.

Stock Average Price: a worked example

Buying 100 shares at $24.50, then another 150 shares at $19.80.

  1. Cost of purchase 1100 × 24.50 = $2,450
  2. Cost of purchase 2150 × 19.80 = $2,970
  3. Total cost$5,420
  4. Total shares250
  5. Average cost per share5,420 ÷ 250 = $21.68

The average cost is $21.68 per share. Averaging down — the second, larger purchase at the lower price — pulls the result below the $22.15 midpoint of the two prices.

How to use the Stock Average Price calculator

  1. Add a row for each purchase, entering the number of shares and the price paid.
  2. Include commission in the price if you want it in the cost basis — divide the commission by the share count and add it to the price.
  3. Optionally enter the current share price to see the holding's value and unrealised profit or loss.
  4. Fractional shares are supported for platforms that offer them.

Limitations of the Stock Average Price calculator

Every calculation makes assumptions. These are the ones that matter here.

  • Excludes commission and stamp duty unless you build them into the prices entered.
  • Assumes a single average cost basis. UK share matching rules, US wash-sale rules and other regimes may require different treatment.
  • Does not account for stock splits, consolidations or scrip dividends, all of which change the share count.
  • This page keeps nothing — the figures exist only while it is open. Anything worth keeping belongs in the trade journal, which saves to your own browser.

Frequently asked questions about Stock Average Price

Why is the average not the midpoint of my two prices?

Because it is weighted by share count. A purchase of 150 shares influences the average one and a half times as much as a purchase of 100 shares at a different price.

Should commission be included in the stock average calculator?

For an accurate cost basis, yes. Divide the commission for each purchase by its share count and add the result to the price paid, so the average carries the dealing charge as well as the quoted price.

Does this stock cost basis calculator match HMRC's share matching rules?

Not necessarily. UK rules use a share pool with same-day and 30-day matching rules that can differ from a straight average. This page gives the arithmetic average, which is what most brokers display. Check the rules that apply to you.

Does averaging down stocks lower the break-even price?

It lowers the average cost per share, and with it the price at which the position returns to break-even. How far it moves depends on the size of the new purchase relative to the shares already held, and the average says nothing about whether the original reasoning still holds.

What happens after a stock split?

Adjust the historical share counts and prices to post-split terms before entering them. A two-for-one split doubles the shares and halves the price for every purchase made before it.

Last reviewed . See our methodology and editorial policy.

More stocks calculators