How Stock Averaging, Weighted Cost Basis & Target Averaging Work

What Is Stock Averaging (Dollar-Cost & Rupee-Cost Averaging)?

When you buy shares of the same company or ETF across different dates and price levels, your true cost basis is not a simple midpoint of the share prices—it is a quantity-weighted average price. Investors use averaging down (buying additional shares after a price dip) to lower their breakeven threshold, or pyramiding / averaging up (adding to winning stocks during an uptrend) while keeping strict control over total capital deployed. Knowing your exact weighted average price helps you set accurate stop-losses, calculate capital gains taxes, and avoid over-allocating capital to a single stock position.

How to Calculate Average Share Price in 3 Easy Steps

  1. Enter Each Buy Lot: Type the number of shares purchased and the exact execution price for Buy #1 and Buy #2 (click + Add Buy Lot for additional tranches).
  2. Check Weighted Average & P&L: Instantly view your total share count, total invested capital, weighted average cost per share, and unrealized Profit/Loss at the Current Market Price (CMP).
  3. Plan Target Average Price: Enter your desired target average price to calculate the exact number of additional shares and fresh capital required at today's market price.

Weighted Average & Target Quantity Formulas + Worked Example

Brokers and portfolio trackers compute your weighted average buy price and target averaging quantity using two exact algebraic equations:

Average Price = Σ(Sharesi × Pricei) / ΣSharesi  |  Extra Shares = Total Shares × (Avg − Target) / (Target − CMP)

Worked Example: Suppose you first buy 100 shares at ₹500 (₹50,000) and later buy 50 shares at ₹400 (₹20,000) during a market pullback.

Total Invested Capital = ₹50,000 + ₹20,000 = ₹70,000 across 100 + 50 = 150 shares.

Weighted Average Buy Price = ₹70,000 / 150 = ₹466.67 per share. If the stock trades at CMP = ₹420 and you want to lower your average to ₹450, you need 150 × (466.67 − 450) / (450 − 420) = 84 additional shares.

Stock Averaging Scenarios & Drawdown Recovery Reference Chart (16 Cases)

Use this quick reference chart to compare how different buy-lot ratios reduce your breakeven price and how much gain is needed to recover from a drawdown.

Initial Buy (Lot 1) Second Buy (Lot 2) New Weighted Avg Capital & Breakeven Impact
100 @ ₹100 100 @ ₹80 (1:1 Ratio) ₹90.00 10% lower breakeven; 2x capital
100 @ ₹100 200 @ ₹80 (1:2 Ratio) ₹86.67 13.3% lower breakeven; 3x capital
100 @ ₹100 300 @ ₹80 (1:3 Ratio) ₹85.00 15% lower breakeven; 4x capital
100 @ ₹200 100 @ ₹150 (-25% dip) ₹175.00 Needs +16.7% bounce instead of +33.3%
100 @ ₹200 200 @ ₹150 (-25% dip) ₹166.67 Needs +11.1% bounce to breakeven
50 @ ₹500 50 @ ₹400 (-20% dip) ₹450.00 Total 100 shares; ₹45,000 invested
50 @ ₹500 100 @ ₹400 (-20% dip) ₹433.33 Total 150 shares; ₹65,000 invested
100 @ ₹1,000 100 @ ₹700 (-30% dip) ₹850.00 Cuts recovery gain from +42.9% to +21.4%
100 @ ₹1,000 100 @ ₹500 (-50% dip) ₹750.00 Cuts recovery gain from +100% to +50%
100 @ ₹100 100 @ ₹120 (Averaging Up) ₹110.00 Pyramiding into strength; +9.1% profit buffer
200 @ ₹100 100 @ ₹130 (Averaging Up) ₹110.00 Maintains +18.2% unrealized gain cushion
10 @ $100 (USD) 10 @ $80 (USD) $90.00 20 shares total; $1,800 cost basis
25 @ $200 (USD) 25 @ $160 (USD) $180.00 50 shares total; $9,000 cost basis
10% Portfolio Drawdown No Averaging +11.11% Gain Needed Standard mathematical recovery hurdle
25% Portfolio Drawdown No Averaging +33.33% Gain Needed Moderate drawdown recovery hurdle
50% Portfolio Drawdown No Averaging +100.00% Gain Needed Stock must double to return to entry price

Calculating percentage gains, loan EMIs, currency exchange rates, or GST? Explore our companion financial calculators:

Frequently Asked Questions

Because different purchase orders usually involve different share quantities. Buying 200 shares at ₹100 and 50 shares at ₹200 puts far more capital at ₹100—so the true weighted cost basis is (20,000 + 10,000) / 250 = ₹120.00, not the simple midpoint of ₹150.
It solves the linear weighted equation Extra Shares = Current Shares × (Current Avg − Target Avg) / (Target Avg − CMP). Note that to average down to a lower target price, the Current Market Price (CMP) must be strictly lower than your desired Target Average Price.
Averaging down works well on broad index ETFs or fundamentally strong companies experiencing temporary market dips, but buying more of a structurally declining stock can concentrate portfolio risk. Always cap maximum position size (e.g., 5%–10% of total portfolio) before adding a second or third lot.
Never. All multi-lot calculations, P&L percentages, and target share formulas run 100% locally inside your web browser using JavaScript. Your portfolio positions never leave your device.