Stock Average Calculator

Find your average cost per share after buying a stock at different prices, with trading fees, and see the gain or loss at the current price.

$
$
$
$
$
$
$

Result

Total shares—
Total cost (with fees)—
Average cost per share—
Current value—
Gain or loss—
Gain or loss %—
Purchases counted—

Few people buy a stock only once. You might buy 100 shares, add more when the price drops, and buy again with every paycheck. Each purchase happens at a different price, so what you paid per share is no longer obvious. The average cost per share, also called the cost basis per share, is the figure that tells you where you break even and how much you have gained or lost. This stock average calculator combines up to five purchases, adds trading fees, and shows your average cost, total cost, current value and gain or loss.

How to use the stock average calculator

  1. Enter each purchase as a number of shares and the price per share. Leave unused purchases at zero.
  2. Enter the fee per purchase, if your broker charges one.
  3. Enter the current price to see the value of your position and your gain or loss.
  4. Read the average cost per share, which is also your break-even price.

Average cost formula

Average cost per shareLots: 100 @ $50, 50 @ $42, 75 @ $38.50$50.00After lot 1$47.33After lot 2$44.39After lot 3calcmaple.com
Buying more shares at lower prices pulls the average cost down: total cost ÷ total shares, here ending at $44.39.
Average cost = (shares₁ × price₁ + shares₂ × price₂ + … + fees) ÷ (shares₁ + shares₂ + …)
Gain or loss = shares × current price − total cost
Gain or loss % = gain ÷ total cost × 100

This is a weighted average, which gives more weight to the purchases that involved more shares. A simple average of the prices would be wrong unless every purchase had the same number of shares.

Worked example: three purchases

  1. 100 shares at $50.00 = $5,000.00; 50 shares at $42.00 = $2,100.00; 75 shares at $38.50 = $2,887.50.
  2. Total cost: $9,987.50 for 225 shares.
  3. Average cost: $9,987.50 ÷ 225 = $44.3889 per share. The simple average of the three prices would be $43.5000, which is misleading.
  4. At $45 the position is worth $10,125.00, a gain of $137.50 (1.38%).
  5. With a $5 fee on each of the three purchases, the cost becomes $10,002.50 and the average $44.4556.

Averaging down: 100 shares at $50 plus 100 more at a lower price

Second purchase priceTotal sharesNew average costRise needed from that price to break even
$45.00200 shares$47.505.6%
$40.00200 shares$45.0012.5%
$35.00200 shares$42.5021.4%
$30.00200 shares$40.0033.3%
$25.00200 shares$37.5050.0%

Points to remember

Related tools

To calculate the result of a sale after fees and tax, use the Stock Profit Calculator. The ROI Calculator measures the return on any investment, the CAGR Calculator turns a start and end value into an annual rate, and the Percent Change Calculator gives the change between two prices.

Frequently asked questions

How is the average cost per share calculated?

Add the cost of every purchase (shares × price, plus any fees) and divide by the total number of shares. It is a weighted average: larger purchases count for more. It is not the simple average of the prices.

What does it mean to average down?

Buying more shares after the price falls lowers your average cost. With 100 shares bought at $50, buying 100 more at $40 gives an average of $45.00, so the stock only has to climb back to $45 for you to break even, not $50. It does not remove the risk that the price keeps falling.

Is this the same as dollar-cost averaging?

Dollar-cost averaging means investing a fixed amount at regular intervals, which buys more shares when the price is low and fewer when it is high. The average cost per share it produces is calculated the same way.

Do fees count in the average?

Yes. Commissions and fees are part of what you paid, so they raise your cost basis. Enter the fee per purchase and the calculator adds it for every lot that has shares.

Is this my tax cost basis?

It is a useful estimate, but tax rules depend on your country and account. In the US, brokers default to a specific method (often average cost for funds and FIFO for stocks) and wash-sale rules can change the basis. Check your broker’s statements.

Related calculators

Last updated November 17, 2026. Found a problem with this calculator? Tell us.