📊 Stock Average Cost Calculator

Average down or up across multiple buy lots — break-even, P&L, and what-if scenarios. No login required.

Cosmetic label only — no live price data.
Avg Cost Per Share
Total Shares
Total Invested
Enter at least one buy lot to see results.
Buy Lots
# Shares Price Per Share Total Cost Weight Remove
Current Market Price (Optional)
Auto-filled from lots above
What-If: Target Average

How many more shares do I need to buy at $X to bring my average to $Y?

How Average Cost Calculation Works

The average cost per share (also called cost basis per share) is calculated by dividing your total amount invested by your total number of shares held:

Average Cost = Total Amount Invested ÷ Total Shares Owned

When you buy shares at different prices over time, this weighted average blends all your purchase prices. Unlike a simple average of the prices, it correctly weights each lot by size.

Worked Example

Suppose you buy shares of a stock in three lots:

  • Lot 1: 100 shares at $10.00 = $1,000
  • Lot 2: 200 shares at $8.00 = $1,600
  • Lot 3: 150 shares at $7.50 = $1,125

Total shares: 450 | Total invested: $3,725
Average cost: $3,725 ÷ 450 = $8.278 per share

If the current price is $9.00, unrealized P&L = (450 × $9.00) − $3,725 = $4,050 − $3,725 = +$325 (+8.72%).

The What-If Formula (Reverse Solver)

To find how many shares you need to buy at price Pnew to reach target average Atarget, given current shares N and current average A:

Shares needed = N × (A − Atarget) ÷ (Atarget − Pnew)

This only works when Atarget is between Pnew and A. You cannot average down to a price below the new buy price, and you cannot average up to a price above the new buy price.

Practical Tips

  • Averaging down increases your total position size and risk. Only average down in stocks you have high conviction in — not to "break even" emotionally.
  • Averaging up (buying more as the stock rises) is a momentum strategy used by trend-followers. The same math applies.
  • Cost basis matters for taxes. In many jurisdictions you can choose FIFO, LIFO, or specific-lot identification when you sell. This calculator computes the blended average (average cost method), which is often the IRS default for mutual funds.
  • Options traders use average cost when tracking the premium paid across multiple contracts before assignment.

Average Down Strategy Explained

Averaging down means purchasing additional shares of a stock whose price has fallen since your initial purchase. The goal is to lower your average cost basis so that the stock needs to rise less to return to profitability.

When it makes sense: You believe the business fundamentals are intact and the price drop is temporary or market-driven. Investors like Warren Buffett famously use falling prices as opportunities to buy more of high-quality businesses at better prices.

When it's dangerous: Averaging down on a deteriorating company — "catching a falling knife" — amplifies losses. The stock may never recover. Before adding to a losing position, ask: "Would I buy this for the first time today at this price?"

Average Up: The Other Direction

Trend-followers and growth investors often average up: buying more as the price rises to add to winning positions. This increases the average cost but also means capital is deployed into confirmed winners. This calculator handles both directions identically.

Crypto and Other Assets

The same averaging math applies to Bitcoin, ETH, gold, or any other asset where you accumulate over time. The calculator is intentionally asset-agnostic.

Frequently Asked Questions