Ad Space — Top Banner

Stock Average Cost Calculator

Calculate average cost per share after purchases at different prices and quantities.
Returns cost basis and weighted average price for stocks, ETFs, and crypto.

Average Cost Per Share

Average Cost Per Share (also called cost basis) tells you the weighted average price you paid across multiple stock or ETF purchases. This is different from a simple average of prices — it accounts for the number of shares bought at each price.

Formula:

Average Cost = Total Amount Invested / Total Shares Owned

Total Invested = Σ (Shares Bought × Price Per Share)

What each variable means:

  • Shares: the number of shares purchased in each transaction.
  • Price Per Share: the price you paid per share in that transaction.
  • Current Price (optional): today’s market price, used to calculate your unrealized gain or loss.

Practical example with 3 purchases:

Purchase Shares Price Cost
1st 10 $50 $500
2nd 20 $40 $800
3rd 15 $45 $675
Total 45 , $1,975

Average Cost = $1,975 / 45 = $43.89 per share. Note: a simple average of prices ($50 + $40 + $45) / 3 = $45.00 would be incorrect because you bought more shares at the lower price.

When to use this calculator: Use it to track your cost basis for tax reporting (capital gains are calculated from your average cost), to evaluate your dollar-cost averaging strategy, or simply to know your breakeven price — the price at which you start making a profit.

Why it matters for taxes: When you sell shares, your taxable gain = (Selling Price - Average Cost) × Shares Sold. Knowing your exact average cost prevents you from overpaying or underpaying taxes.

Tips: Dollar-cost averaging (DCA) — investing a fixed amount regularly regardless of price — naturally lowers your average cost over time because you buy more shares when prices are low and fewer when prices are high. If you have a current price, this calculator also shows your total unrealized gain or loss and the percentage return on your investment.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.