What the calculator computes
An average buy price is a weighted mean, not a straight-line middle. If you bought 100 shares at ₹500 and 50 shares at ₹440, you did not buy at the simple midpoint of ₹470. The total cost of 150 shares is 100 times 500 plus 50 times 440, which is ₹72,000. Divided by 150 shares, the average is ₹480 a share. The second buy pulled the average down to 480 because its quantity was half the first buy; a smaller second quantity would have moved it less.
This page lets you enter any number of buys between one and twelve, with any quantity and price for each. It prints the running weighted average after every row, the total cost, the breakeven after your per-side cost percentage, and the gain or loss at a reference price you enter. The market quote is never fetched; the reference price is your own input.
The weighted-mean formula
For buys one to n, the weighted average equals the sum of (quantity times price) divided by the sum of quantities. The total cost is the sum of (quantity times price). The running average after row k is the weighted mean of rows one through k. These are the same two columns a broker contract note carries, in a different order.
Breakeven after costs is a slight restatement of the formula. If costs run at c per cent on each side, then the breakeven sell price must satisfy quantity times sell times (one minus c divided by 100) equals cost times (one plus c divided by 100). Rearranging gives breakeven equal to total cost times (one plus c) divided by (quantity times (one minus c)). On a flat 0.1 per cent per side, the breakeven on a ₹480 average is about ₹480.96.
Averaging down: arithmetic, not a promise
A fresh buy at a lower price pulls the weighted average down. That is mechanical: more shares at a lower price mix into the total cost and the total quantity. It says nothing about whether the share will recover. A stock can keep falling after the fresh buy, and the lower average then sits further below the price than the first one did, with more money at stake.
Averaging down raises the capital at risk. If a 100-share buy at ₹500 was followed by a 100-share buy at ₹400, the average is ₹450 on 200 shares, with a total of ₹90,000 committed. A further fall to ₹300 is now a ₹30,000 unrealised loss, against the ₹20,000 unrealised loss at the same price before the second buy. The lower average is a number on a screen; the larger position is the real change. Read the arithmetic as what it is and sit the decision on your plan, not on the average.
A worked example a reader can check
Two buys: 100 shares at ₹500 and 50 shares at ₹440. Total cost is 100 times 500 plus 50 times 440, which is ₹72,000. Total shares equal 150. Weighted average is 72,000 divided by 150, which is ₹480. At a reference price of ₹480 the gross is exactly zero. Applying a 0.1 per cent per-side cost pushes the breakeven up to (72,000 times 1.001) divided by (150 times 0.999), which works out to ₹480.96 a share. Below ₹480.96 the trade loses after costs; above it, the trade gains after costs.
| Buy | Shares | Price | Running shares | Running average |
|---|---|---|---|---|
| Buy 1 | 100 | ₹500.00 | 100 | ₹500.00 |
| Buy 2 | 50 | ₹440.00 | 150 | ₹480.00 |
Target mode: shares needed to reach a chosen average
The second tab asks a different question. Given shares already held at a current average, and a new price at which more shares can be bought, how many fresh shares move the average to a chosen number. The arithmetic rearranges the weighted-mean formula: fresh shares equal held shares times (held average minus target) divided by (target minus new price).
For 100 shares at a ₹500 average and a new buy at ₹400, a ₹450 target average needs 100 times (500 minus 450) divided by (450 minus 400), which is 100 shares. Below the new price, a chosen target cannot be reached by buying at that price: a target of ₹390 needs an infinite number of shares at ₹400 to pull the average that far down, so the calculator flags this as not reachable rather than returning a nonsense number.
How the per-side cost percentage changes the breakeven
The per-side cost input is a compact stand-in for all the one-time charges the broker takes on each buy and each sell: brokerage, STT, exchange charges, the SEBI fee, buy-side stamp duty, GST on the fee lines, and the DP charge on a delivery sell. If those total 0.10 per cent of the trade on each side, the breakeven on a ₹480 average is about ₹480.96 as above. At 0.25 per cent each side, the same breakeven becomes closer to ₹482.41. At zero per cent, it is exactly the average. For a detailed line-by-line total of the real charges on a given trade at FY 2026-27 rates, run the brokerage calculator in parallel.
What this calculator leaves out
- Capital gains tax. Equity LTCG above ₹1,25,000 is taxed at 12.5 per cent and STCG at 20 per cent for FY 2026-27. The average here is a cost figure, not a post-tax number.
- A corporate action: a split, bonus or merger changes the share count and the per-share price on the holding. Adjust the entered rows if one happened between buys.
- Interest, where any of the buys were funded. For a buy under a margin trading facility, use the MTF margin calculator to see the interest cost before averaging further.
- Dividends received. A dividend reduces the effective cost of holding, but is not the same arithmetic as the weighted-mean average this page shows.
- Inflation, which erodes the real value of the money put in. The average is a nominal figure.
Frequently asked questions
How is an average buy price calculated?
The average is total cost divided by total shares. Total cost is the sum of (quantity times price) across every buy. Total shares is the sum of quantities. The ratio is the weighted mean: a bigger quantity at a given price pulls the average further than a smaller quantity.
Does a lower average mean the stock will recover?
No. A lower average is arithmetic on the orders you entered; it changes the cost figure, not the price. A stock can keep falling after a fresh buy, and the larger position means the loss can grow faster from there.
How is the breakeven after costs worked out?
The breakeven is the sell price at which the net of total cost times (one plus cost per cent) on the buy side equals quantity times sell times (one minus cost per cent) on the sell side. On a 0.1 per cent per-side cost and a ₹480 average, the breakeven comes out to about ₹480.96 a share.
What does the target mode solve for?
It solves for the fresh shares needed at a new price to move the weighted average to a chosen target, given the shares already held and your current average. The formula is held times (held average minus target) divided by (target minus new price).
Why does the calculator say 'not reachable' sometimes?
A target can sit only between the current average and the new-buy price. If the target is outside that band, no finite quantity at the new price can land the average on the target. The calculator flags that rather than show an impossible figure.
Does the page use live market data?
No. The reference price is a number you enter. The calculator makes no fetch and carries no quote. That keeps the arithmetic reproducible and the page compliant with the rule against presenting live market data in educational material.
Courses that teach the subject behind the stock average calculator
NIFM Certified Smart Investor Course
A certification in stock market basics, online trading and investment strategies, with forex and commodity training.
₹7,500 + 18% GST
Trading Rules and Strategies for Stock and Commodity Market
Trading rules and strategies for stock and commodity markets, including handling volatility, losses and returns.
₹2,500 + 18% GST
Financial Market Beginners Module
Structured online preparation for the NSE NCFM Financial Market Beginners Module.
₹1,400 + 18% GST
