Your Stock Average
About This Calculator
- What it does
- Calculates the weighted average buy price across multiple stock purchases at different prices and quantities. Also shows total shares owned, total amount invested, and optional profit/loss at a target sell price.
- Inputs required
- Buy price and quantity for each purchase lot. Optional: brokerage per trade, target sell price.
- Outputs shown
- Weighted average buy price, total shares, total amount invested, number of buy entries, optional break-even price (with brokerage), estimated P&L and return % at target sell price, per-lot contribution table.
- Formula used
- Average Buy Price = Total Amount Invested ÷ Total Quantity. Total Amount Invested = Σ (Buy Price × Quantity) for each lot. With brokerage: add brokerage per trade to each lot's amount before summing.
- Assumptions
- All purchases are for the same stock/instrument. Brokerage is a flat amount per trade (not percentage). Tax, STT, and other regulatory charges are not included unless added to the brokerage field. Fractional shares supported.
- Last updated
- 3 March 2026
Quick Answer: Stock Average Price Formula
Total Amount Invested = (Price₁ × Qty₁) + (Price₂ × Qty₂) + … + (Priceₙ × Qtyₙ)
Profit / Loss = (Sell Price − Average Buy Price) × Total Shares
30-second example: You buy 50 shares at ₹200 and 100 shares at ₹180. Total invested = ₹10,000 + ₹18,000 = ₹28,000. Total shares = 150. Average buy price = ₹28,000 ÷ 150 = ₹186.67. If you sell at ₹220: profit = (₹220 − ₹186.67) × 150 = ₹5,000 (26.8% return).
To calculate the weighted average stock price, you cannot simply add ₹200 and ₹180 and divide by 2 — that gives ₹190, which is wrong because you bought twice as many shares at ₹180. The weighted average accounts for quantity at each price.
How to Use This Calculator
- Enter your first buy. Type the buy price and number of shares for your first purchase in the Share 1 row.
- Add more buys. Click Add More to add a row for each subsequent purchase at a different price or date. There is no limit.
- Optional — add brokerage. Open Advanced Options and enter brokerage per trade (e.g. ₹20 for Zerodha flat fee) to see the true break-even sell price that covers all your transaction costs.
- Optional — enter target sell price. Type the price at which you intend to sell to instantly see estimated profit/loss and return percentage.
- Click Calculate. Results show your weighted average buy price, total shares, total invested amount, and a per-lot breakdown table.
In India, also add STT (Securities Transaction Tax — 0.1% on equity delivery) to the brokerage field to get a fully loaded break-even price.
What Is Stock Averaging?
Stock averaging means buying shares of the same company at different prices on different dates. Because each purchase lot has a different price, your actual cost per share is the weighted average of all your purchase prices — not the simple mean.
Knowing your average buy price is essential for:
- Calculating P&L accurately. Gain = (Sell Price − Average Buy Price) × Total Shares. Without knowing your average, you cannot know if you are actually in profit.
- Planning the next buy. The calculator tells you exactly how much a new purchase will move your average — up or down.
- Tax reporting. In India, capital gains tax is calculated on cost basis (average acquisition price in most cases). Use the Income Tax Calculator to estimate your liability after a sale.
- Setting exit targets. You need your average cost to set a meaningful profit-booking price or stop-loss.
Weighted Average Price Formula
Where Pᵢ is the buy price of lot i and Qᵢ is the number of shares in lot i. This is identical to the formula used by portfolio trackers and most brokers for cost basis reporting.
With brokerage and charges included:
Break-Even Price = Total Invested ÷ Total Quantity
The break-even price is always slightly higher than the average buy price because it includes transaction costs you must recover before making any profit.
Worked Examples
Example 1 — Two Buys, Adding to a Position
You buy shares of a mid-cap IT stock in two lots:
- Buy 1: 11 shares at ₹890 = ₹9,790
- Buy 2: 17 shares at ₹900 = ₹15,300
Total: 28 shares, ₹25,090 invested. Average Buy Price = ₹25,090 ÷ 28 = ₹896.07
A simple average of ₹890 and ₹900 would give ₹895 — wrong, because you bought more at ₹900. The weighted average reflects reality: ₹896.07.
Selling at ₹950: P&L = (₹950 − ₹896.07) × 28 = +₹1,510 profit (+6.0%)
Example 2 — Averaging Down Over Four Buys
You bought a pharma stock that kept falling. Here is your buy history:
| Buy | Price (₹) | Shares | Amount (₹) |
|---|---|---|---|
| Buy 1 | 500 | 50 | 25,000 |
| Buy 2 | 450 | 60 | 27,000 |
| Buy 3 | 400 | 80 | 32,000 |
| Buy 4 | 370 | 100 | 37,000 |
| Total | — | 290 shares | ₹1,21,000 |
Average Buy Price: ₹1,21,000 ÷ 290 = ₹417.24 per share
The stock is currently at ₹370 (your last buy). You are sitting at a loss of ₹(417.24 − 370) × 290 = ₹13,700 unrealised loss. The stock only needs to recover to ₹417.24 — not to your original ₹500 — for you to break even. That is the benefit of averaging down when fundamentals are sound.
Sell at ₹470: P&L = (₹470 − ₹417.24) × 290 = +₹15,300 profit (+12.6%) — even though you never got back to ₹500.
How Much Does a Stock Need to Recover to Break Even?
This is the most underestimated concept in investing. A stock that falls 50% does not need to rise 50% to recover — it needs to rise 100%. The table below shows the recovery percentage needed for each decline.
| Stock Falls By | Recovery % Needed to Break Even | Averaging Down Helps? |
|---|---|---|
| 5% | 5.3% | Marginally |
| 10% | 11.1% | Yes, if fundamentals solid |
| 20% | 25.0% | Yes, meaningfully lowers recovery need |
| 30% | 42.9% | Yes, but requires strong conviction |
| 40% | 66.7% | Only if business is genuinely intact |
| 50% | 100.0% | Very high risk — reassess thesis |
| 60% | 150.0% | Rarely advisable for retail investors |
| 70% | 233.3% | Near-turnaround or speculation only |
Averaging down reduces how far the stock needs to recover because your average cost drops with each additional purchase. But as the table shows, deep declines require enormous recoveries — which is why the quality of the company matters more than the math when you are averaging down.
Averaging Down vs Averaging Up: When Each Makes Sense
Both strategies have their place. The mistake is not averaging — it is averaging without a thesis.
Averaging Down
Buying more shares at a lower price than your previous purchase. This reduces your average cost and lowers the price you need to break even.
When averaging down makes sense:
- The price has fallen due to a broad market correction, not company-specific problems.
- The company's revenue, profits, and balance sheet are intact — the fundamentals have not changed.
- You have done fresh research on the company after the fall, not just hoping for a bounce.
- The new purchase does not violate your position sizing rules (e.g. no single stock over 10% of your portfolio).
When averaging down is a trap:
- The stock is falling because earnings, revenue, or guidance have deteriorated.
- The sector itself is in structural decline (e.g. disruption by technology).
- You are averaging down to feel better about a losing position, not because of a rational thesis.
- You have no fresh capital and are averaging down by selling better-performing holdings.
Averaging Up
Buying more shares at a higher price than your previous purchase. This raises your average cost but adds to a winning position.
When averaging up makes sense:
- The stock is rising because business results are improving — not just market sentiment.
- You initially bought a small quantity and want to build a full position as your conviction grows.
- Trend followers and momentum investors use averaging up systematically to stay with strong trends.
When averaging up creates risk:
- You buy at a higher price just before a reversal, leaving you with an expensive average cost and no cushion.
- The stock has already priced in all good news and the easy gains are behind it.
The Value Trap: When You Should NOT Average Down
The most expensive mistake retail investors make is confusing a cheap stock with a good stock. A stock that has fallen 50% can fall another 50% — and another after that.
Signs you are in a value trap, not a buying opportunity:
- Shrinking revenues. If the company is losing customers or market share quarter after quarter, a lower price is just a reflection of less value — not a discount.
- Rising debt with falling profits. Companies that borrow to survive are burning through shareholder capital. Averaging down locks in more capital in a potentially insolvent business.
- Promoter selling stake. When promoters (founders, directors) are selling their own shares, they know something the market is beginning to price in. This is especially visible in NSE/BSE filings.
- Governance issues. Companies with audit qualifications, SEBI inquiries, or frequent management changes are high-risk averaging targets.
- Sector-wide disruption. If the entire sector is being disrupted (e.g. traditional retail, print media), individual company fundamentals matter less.
The calculator tells you the math. Whether to average down requires judgment about the business — not just the price.
Average Buy Price and Capital Gains Tax
Your average buy price directly determines your taxable capital gain when you sell. Getting it wrong means filing incorrect taxes.
| Country | Short-Term Gain Tax | Long-Term Gain Tax | Holding Period |
|---|---|---|---|
| India (Equity) | 20% (STCG) | 12.5% on gains above ₹1.25 lakh/year (LTCG) | 12 months threshold |
| USA | Ordinary income rate (10–37%) | 0%, 15%, or 20% based on income | 12 months threshold |
| UK | 18% or 24% CGT (from April 2024); £3,000 annual exempt amount | No short/long distinction | |
| Saudi Arabia | No personal capital gains tax on listed Saudi stocks for Saudi nationals | — | |
| Poland | 19% flat tax on capital gains (Belka Tax) | No short/long distinction | |
India note: SEBI-regulated brokers (Zerodha, Groww, Upstox, Motilal, HDFC Securities) use the FIFO method for capital gains tax reporting, not weighted average. This means the first shares you bought are treated as the first shares sold when calculating gains. Weighted average is useful for portfolio tracking; FIFO is what goes on your ITR. For LTCG calculation, note that STT must be paid on both buy and sell transactions to qualify for the 12.5% tax rate.
US note: The IRS wash sale rule prohibits claiming a capital loss on a sale if you buy the same stock within 30 days before or after the sale. If you are averaging down into a stock where you are also booking tax losses, the wash sale rule can deny your deduction.
Common Mistakes When Calculating Stock Average Price
- Using simple average instead of weighted average. If you bought 10 shares at ₹100 and 100 shares at ₹50, your simple average is ₹75 — but your actual average is ₹(1,000 + 5,000) ÷ 110 = ₹54.55. The difference of ₹20 per share matters enormously when calculating profit or loss.
- Forgetting brokerage in the break-even calculation. If you trade frequently with smaller lots, brokerage across multiple buys can add up to several hundred rupees, raising your true break-even. In India, STT alone is 0.1% on buy + 0.1% on sell for equity delivery — on a ₹1 lakh position that is ₹200 in STT you must recover.
- Averaging down across different stocks. This calculator works for one stock at a time. Do not mix two different companies or two different instruments (stock vs futures) in the same calculation — the resulting average is meaningless.
- Confusing average buy price with break-even price. Break-even is always higher than average buy price because it includes brokerage. Many investors set price alerts at their average cost and are surprised they are still at a small loss when the stock reaches that level.
- Not recalculating after a partial sale. If you sold 50 shares and still hold 100, your average buy price applies only to the remaining 100 shares. Partial sales do not change your average buy price for the remaining holding — but your total invested amount does change.
- Using FIFO average for tax calculations in India. Your broker calculates capital gains using FIFO, not weighted average. For ITR filing, use the buy price of the specific lot being sold (per FIFO), not your weighted average.
Frequently Asked Questions
Calculator Category
This tool belongs to Finance Calculators. Browse similar tools for investment, loan, and business finance calculations.
Results are for informational and planning purposes only. This is not investment advice. Stock prices can fall as well as rise. Past purchase prices do not guarantee future returns. Always consult a qualified financial advisor before making investment decisions.