Two buys
10 shares at $10 and 5 shares at $20: $200 for 15 shares, an average of $13.33. At $18 today they are worth $270, a $70 gain (35%).
Find your average buy price over several purchases of a stock or crypto, and your gain.
Enter your values and select Calculate to see the result.
Runs in your browser — nothing you enter is sent to a server.
List the price of each buy, then either how many shares or coins you bought each time, or how much money you spent each time (in the same order). The calculator adds up the total invested and the total quantity and divides one by the other: that is your average cost, or cost basis, per unit.
Enter today's price to see what the position is worth and your gain or loss.
average = total spent ÷ total quantity = Σ(quantity × price) ÷ Σ quantity
When you spend the same amount each time (dollar-cost averaging), quantity = amount ÷ price, and the average cost is the harmonic mean of the prices — never above their simple average, because you buy more units when the price is low.
10 shares at $10 and 5 shares at $20: $200 for 15 shares, an average of $13.33. At $18 today they are worth $270, a $70 gain (35%).
$100 at $10 and $100 at $20 buys 10 + 5 = 15 units for $200: again $13.33, below the $15 average of the two prices.
Yes, for a true cost basis: add each buy's fee to the amount spent, or use the "amount spent" mode with fees included.
With the average-cost method used in many countries, selling doesn't change the average of what's left. Other rules, such as first in, first out, work differently for tax.
No. Everything is calculated in your browser.
Work out profit or loss on a crypto trade, including exchange fees and the break-even price.
Finance Tools
Work out a stock's dividend yield and the yearly income from your shares.
Finance Tools
Calculate return on investment as a percentage, plus the annualized return over the years you held it.
Finance Tools