Stock average calculator
Work out your true average price across any number of buys, including charges. See your break-even sell price, profit at today’s price, and exactly how many shares it takes to reach a target average. Works in ₹, $, £ and €. It also works for a crypto position: enter the price and size of each fill. Some traders call this a trade average or average price calculator.
How the stock average is calculated
When you buy the same share more than once at different prices, your average price is a weighted average: every share counts once, so a larger buy pulls the average further than a small one. The formula is simple:
Average price = (Q₁ × P₁ + Q₂ × P₂ + … + Qₙ × Pₙ) ÷ (Q₁ + Q₂ + … + Qₙ)
Q is the number of shares in each buy and P is the price you paid. The calculator above applies it to as many buys as you add, then goes further than a basic average: it can include the charges you paid on each buy, work out the price you must sell at just to break even after selling costs, show your profit or loss at today’s price, and solve the reverse problem of how many shares to buy to reach a target average.
Worked example: averaging down
Suppose you bought 100 shares at ₹250 and the price fell, so you bought 150 more at ₹200.
- ₹25,000. The first purchase. Price times shares, not the price alone.
- ₹30,000. The second purchase is bigger in shares, so it pulls the average harder.
- 250 shares. Divide by shares held, not by the number of purchases.
- ₹220. The weighted average. Averaging the two prices would say ₹225 and overstate the break-even by ₹5 a share.
On the real screen: The calculator above starts with these two buys. Add a third row at ₹190 and watch the average fall more slowly each time.
Good habitKeep the purchase rows in a sheet, including charges, so the average matches what your tax statement will use.
Common mistakeAveraging two prices without weighting by quantity.
| Buy | Shares | Price | Cost | Average after this buy |
|---|---|---|---|---|
| 1 | 100 | ₹250 | ₹25,000 | ₹250.00 |
| 2 | 150 | ₹200 | ₹30,000 | ₹220.00 |
| Total | 250 | ₹55,000 | ₹220.00 |
The simple average of the two prices would be ₹225, but because the second buy was larger the real average is ₹220. That is why you should never average the prices alone.
Reaching a target. If you now want the average down to ₹210 and expect to buy at ₹190, the number of extra shares is (₹55,000 − ₹210 × 250) ÷ (₹210 − ₹190) = ₹2,500 ÷ ₹20 = 125 shares, costing ₹23,750. After that buy you would hold 375 shares at an average of exactly ₹210. Notice the trade-off: you have put in another ₹23,750 to move the average by ₹10.
Why charges change the average and the break-even
Suppose 20 shares bought at ₹145 and 30 at ₹155 cost ₹7,550 in total. That is ₹151 per share. A ₹25 purchase fee raises the acquisition cost to ₹151.50 per share. If a full sale is estimated to cost another ₹15, a cash break-even sale needs about ₹151.80 per share under those fee assumptions. Verify the final exit costs at the price you intend to use.
Brokers and exchanges add costs to every buy and sell, so your true cost per share is slightly higher than the price on the screen. For delivery trades in India on a zero-brokerage plan, statutory charges are roughly 0.12% of a buy and 0.10% of a sell (STT, exchange charges, stamp duty on the buy, SEBI fee and GST), plus a DP charge of about ₹15–₹24 per stock on the day you sell. The “India” example button fills in those approximate figures. Use the brokerage calculator for your broker’s exact charges.
With those costs, the ₹220 average in the example becomes about ₹220.26 per share, and the price you need just to break even after selling costs is about ₹220.55. That gap looks small, but on short-term trades it can be the difference between a small profit and a small loss.
In the US most brokers charge no commission on stock trades, though a sale carries a tiny SEC fee and FINRA trading activity fee. In the UK, buying most UK shares adds 0.5% stamp duty reserve tax, which raises the average noticeably; selling does not. Enter the percentage that matches your market.
Averaging up
Averaging up means adding shares as the price rises. Your average climbs but stays below the latest price, so the whole position remains in profit while you add to a stock that is moving your way. The “US” example shows three buys at $180, $195 and $205: 40 shares with an average of $190. Many traders prefer averaging up to averaging down because they add to something that is working rather than to something that is not.
Averaging down: when it helps and when it hurts
Averaging down lowers the price the stock needs to recover to, which can feel like progress. It also puts more money into a position that has already moved against you. Before you add, ask three questions:
- Has the reason you bought changed? If the company’s results, debt or prospects have worsened, a lower price may be the market pricing that in, not a bargain.
- How big will the position become? Averaging down increases the share of your portfolio in one stock. Check it against the risk limit you set, using the position size calculator.
- What if it keeps falling? Work out the loss at the next support level, not only the new break-even.
Never average down in a leveraged product such as futures, options or margin trading without a defined stop. Losses there compound much faster than in fully paid shares. Our margin calculator and risk-reward calculator help you see the downside first.
Average price and tax
Tax rules do not always use a simple average. In India, capital gains on listed shares are worked out lot by lot on a first-in, first-out basis, so selling part of a holding uses the oldest buy price first, not your average. The UK pools shares in the same company into a “section 104 holding” at an average cost, with special rules for shares bought and sold on the same day or within 30 days. In the US your broker usually reports cost basis lot by lot, and you may be able to choose specific lots. Use this calculator for trading decisions and your broker’s tax statement for filing. The India trader tax estimator covers the Indian rates.
Doing it in a spreadsheet
Put the shares in column A and the prices in column B, one buy per row. Then:
- Average price:
=SUMPRODUCT(A2:A10,B2:B10)/SUM(A2:A10) - Shares needed to reach target T at price P, with total cost in D1 and total shares in D2:
=(D1-T*D2)/(T-P) - Break-even after a sell charge of s% and a fixed fee F:
=(D1+F)/(D2*(1-s/100))
Break-even after charges on this example
Selling all 250 shares at exactly ₹220 does not get you back to zero. On delivery at Zerodha the round trip pays STT of 0.1% on both sides, stamp duty on the buys, exchange and SEBI fees, GST on those fees and a DP charge when the shares leave the demat account.
| Line | Amount |
|---|---|
| STT (buy and sell) | ₹110.14 |
| Exchange charge | ₹3.38 |
| Stamp duty on ₹55,000 of buys | ₹8.25 |
| SEBI fee | ₹0.11 |
| GST | ₹0.63 |
| DP charge on the sale | ₹15.34 |
| Total | ₹137.85 |
Spread over 250 shares that is about 55 paise a share, so the true break-even is about ₹220.55. At a broker that also charges ₹20 per delivery order it is closer to ₹220.77, because there were two buy orders and one sell order. Small, but it is the difference between a trade that “came back to cost” and one that actually did.
The brokerage comparison calculator gives the same lines for any price and quantity.
Related tools
- Brokerage calculator for the exact charges on each buy and sell in India.
- Position size calculator to decide how many shares to add without breaking your risk limit.
- Profit target calculator to plan exits once the position is built.
- Pivot point calculator to mark likely support and resistance before you add.
Questions people ask
How do I calculate my average share price?
Multiply each buy’s shares by its price, add those up, and divide by the total number of shares. For 100 shares at ₹250 and 150 at ₹200, that is ₹55,000 ÷ 250 = ₹220.
How many shares should I buy to average down to a target?
Shares needed = (total cost − target × shares held) ÷ (target − next buy price). The target must sit between the next buy price and your current average.
Does the average include brokerage and taxes?
Only if you enter them. Add the buy charge as a percentage and the calculator spreads it across the shares; sell charges and a fixed DP fee move the break-even price.
Is averaging down a good strategy?
It lowers the price a stock needs to recover to but adds money to a losing position. Check that your reason for owning the stock still holds and that the larger position stays within your risk limit.
Is my average price used for capital gains tax?
Not always. India taxes listed shares lot by lot on a first-in, first-out basis; the UK uses a pooled average with same-day and 30-day rules; US brokers usually report each lot.
