Stock Average Calculator

Enter each stock purchase — shares bought and price paid — to calculate your average cost per share and total investment.

Purchase Lots

$

Used to calculate unrealized gain / loss.

Enter at least one purchase to see your average cost.

Summary

Enter each stock purchase — shares bought and price paid — to calculate your average cost per share and total investment.

How it works

  1. Enter the number of shares and the price per share for your first purchase.
  2. Click "Add Purchase" to add more buy lots at different prices.
  3. Results update automatically as you type.
  4. The average cost per share is your total cost divided by total shares.
  5. Enter the current market price to see your unrealized gain or loss.
  6. Click the trash icon to remove any purchase row.

Use cases

  • Tracking the blended cost basis after dollar-cost averaging into a stock.
  • Calculating how a new purchase changes your average price.
  • Determining break-even price after buying a dip.
  • Comparing average cost against current market price to gauge profitability.
  • Planning how many shares to buy at what price to reach a target average.
  • Tax planning — knowing your average cost basis for capital gains calculations.

Frequently Asked Questions

Last updated: 2026-06-18 · Reviewed by Nham Vu