Stock Average Calculator

Calculate your average cost per share across several purchases, see profit or loss at the current price, and find how many shares to buy to reach a target average.

Purchases

Purchase 1

Purchase 2

Target average (optional)

Average Cost per Share

$46.67

Total Shares

150

Total Cost

$7,000.00

Average cost and break-even

Your average cost is the total you paid, fees included, divided by the shares you own. It is also your break-even price before selling costs: if the stock trades above it you are ahead on paper, and below it you are behind. Buying more shares at a lower price pulls the average down, but it also raises the amount of money you have in one stock, so the position carries more risk if the price keeps falling.

To see the result of selling, use the stock profit calculator. To decide how large a position should be, try the position size calculator. For regular purchases over time, see the dollar-cost averaging calculator, and to compare price with estimated value, use the margin of safety calculator.

Tools that do this with live data

This calculator works from the numbers you enter. These tools pull company data in automatically.

TradingView

Advanced interactive charting

Free; Essential $12.95/month billed annually

Finviz

Fast fundamental and technical stock screener

Free; Elite $39.50/month or $299.50/year

Related calculators and research

How It Works

  1. 1Enter the shares, price per share and optional fee for each purchase. Add a row for every buy.
  2. 2Optionally enter the current share price to see market value and unrealized profit or loss.
  3. 3Read your total shares, total cost and average cost per share.
  4. 4To plan an average down, enter the price you expect to buy at and the average cost you want.
  5. 5Review the shares and cash needed, and the size of your new total position.

The formula

  • Average cost = Σ (Shares × Price + Fees) ÷ Σ Shares
  • Unrealized profit or loss = Shares held × Current price − Total cost
  • Shares to buy = (Target average × Shares held − Total cost) ÷ (Buy price − Target average)

A target average is only reachable when it lies between the price you buy at and your current average cost.

Worked example

You buy 100 shares at $50 and later 50 shares at $40, with no fees. The stock now trades at $40.

  1. 1Total cost: 100 × $50 + 50 × $40 = $7,000
  2. 2Total shares: 100 + 50 = 150
  3. 3Average cost: $7,000 ÷ 150 = $46.67
  4. 4At $40 the position is worth $6,000, a loss of $1,000 (−14.29%)

Average cost $46.67 per share. The price has to rise 16.67% to break even.

To bring a 100-share position bought at $50 down to a $44 average by buying at $40, you need 150 more shares, or $6,000.

Frequently Asked Questions

How do I calculate the average price of a stock I bought several times?

Add up the total amount paid for every purchase, including fees, then divide by the total number of shares. Formula: (sum of shares × price + fees) ÷ total shares. This is a weighted average, so larger purchases count for more.

What does averaging down mean, and what is the risk?

Averaging down means buying more shares of a stock after its price has fallen, which lowers your average cost per share. A falling price can reflect a business that is getting worse, so a lower average does not make the investment safer. It also puts more money into one position and increases concentration.

Does the calculator include fees and commissions?

Yes. Enter the fee for each purchase and it is added to the total cost, which raises your average cost per share. The fee field is optional and defaults to 0.

How many shares do I need to buy to lower my average cost?

Enter the price you plan to buy at and the average cost you want. The calculator solves (target × current shares − current cost) ÷ (buy price − target). The target must be between the buy price and your current average. The result is rounded up to whole shares.

Is average cost the same as my tax cost basis?

Not always. Brokers and tax authorities may use specific lots, first-in-first-out or other methods, and some adjust for fees, splits or wash sale rules. Check your broker statements and local rules. This calculator is not tax advice.

Can I use it for ETFs, funds or crypto?

Yes. The math is the same for any asset bought in several lots, including ETFs, mutual funds and crypto. Use one currency for all prices and fees, and fractional share quantities are accepted.