Overview

If you buy the same stock several times at different prices, your average cost per share is what counts for judging your gain or loss.

Enter each purchase, add as many rows as you need, then enter today’s price.

Worked examples

InputsResult
Shares and Price ($)50, 40 · 30, 35 · 20, 52Current price ($)48Average cost per share: $40.90Total shares: 100Total invested: $4,090.00Current value: $4,800.00 (gain $710.00, 17.36%)
Show 2 more examples
Shares and Price ($)100, 25 · 100, 20 · 100, 30Current price ($)22Average cost per share: $25.00Total shares: 300Total invested: $7,500.00Current value: $6,600.00 (loss $900.00, -12%)
Shares and Price ($)10, 200 · 5, 180 · 5, 150 · 8, 165 · 12, 142Current price ($)170Average cost per share: $166.85Total shares: 40Total invested: $6,674.00Current value: $6,800.00 (gain $126.00, 1.89%)

How it works

Average cost = total money spent ÷ total shares. Gain compares the current value with the total spent.

The formula

Average cost = Σ(shares × price) ÷ Σ shares
ΣSum over all your purchases

Practical tips

  • 50 shares at $40, 30 at $35 and 20 at $52 have an average cost of $40.90, and a value of $4,800 at $48.
  • Buying a fixed dollar amount regularly (dollar-cost averaging) lowers your average cost when prices fall.
  • Tax lots may use specific purchases instead of the average.

Frequently asked questions

What is dollar-cost averaging?

Investing a fixed amount at regular intervals so you buy more shares when prices are low.

Does this include fees?

No. Add commissions to the price you enter if you want them included.