Become a tester

Average cost per share: how to calculate it

When you buy the same share or ETF several times at different prices, you need one figure to know where you stand: your average cost per share, also called cost basis per share.

The formula

Average cost = total paid for all purchases, fees included ÷ number of shares held.

It is a weighted average: a large purchase weighs more than a small one.

An example

PurchaseSharesPriceFeesTotal paid
First10$50$1$501
Second10$40$1$401
Total20$902

Average cost = $902 ÷ 20 = $45.10. Without fees you would get $45: fees slightly raise the price above which you are in profit.

Unrealized gain

If the share trades at $48, the unrealized gain is ($48 − $45.10) × 20 = $58, or +6.4%. It is unrealized as long as you have not sold: it can still grow, shrink or turn into a loss.

What if you sell part of it?

With the average cost method, selling part of a holding does not change the average cost of the shares you keep: sell 5 of 20 shares and the other 15 keep an average cost of $45.10. The realized gain on the 5 shares sold is measured against that same figure, minus selling fees.

What varies between brokers and countries

  • some brokers include fees in the average cost they show, others do not;
  • some deduct dividends received, which lowers the figure over time;
  • tax rules differ by country: some use the average cost, others match the oldest shares first or let you pick the lots you sell. Check the rules that apply to you.

In NEXORA

In NEXORA, each asset in Wealth has a “unit cost” field: enter your average cost, and the app shows the holding’s performance as a percentage next to its value. Linked to its quote, the holding updates on its own. All about Wealth.

Checked on November 16, 2026. General information, not investment advice.

Other guides

NEXORA is not on the stores yet

Become a tester