Stock Average Calculator
Average buy price across several purchases, the gain or loss at the last close, and the shares needed to reach a target average.
Your average share price is the total amount paid divided by the total number of shares. Enter each purchase to get the average, load any NSE stock to see your gain or loss at the last close, and find how many shares to buy at today's price to bring the average down (or up) to a target.
Buying the same stock more than once leaves you with an average cost that sits between your purchase prices, weighted by how many shares you bought each time. That average is your break-even: the stock has to trade above it for the holding to show a profit.
Add each purchase in the calculator. Load the stock's symbol to compare the average with its last closing price, then use the second part to see what another purchase would do to the average, or how many shares it takes to reach a target.
The formulas
Average price = (Q1 × P1 + Q2 × P2 + …) / (Q1 + Q2 + …), where Q is the number of shares and P the price of each purchase.
To reach a target average T by buying at price P when you hold Q shares at average A, you need Q × (A − T) / (T − P) more shares. The target has to lie between your current average and the buy price: buying below your average can pull it down towards the new price but never below it.
Averaging down, and what it does not change
Averaging down lowers the break-even price, but it also puts more money into the same stock: the holding's size and its risk both grow. A lower average does not make the stock more likely to recover; whether to add is a judgement about the company, not about your cost.
Brokers usually show the average excluding charges. For capital gains tax on a partial sale, shares held in demat are treated as sold first-in, first-out, so the cost used for tax is that of the earliest purchases, not the average. The capital gains tax calculator works per purchase lot.
Key takeaways
- Average price is total cost divided by total shares.
- The average after a new buy always lands between the old average and the new price.
- Shares needed for a target average: Q × (A − T) / (T − P).
- For tax, demat shares are sold first-in, first-out, not at the average price.
Frequently asked questions
How do I calculate the average price of a stock?
Multiply the shares in each purchase by its price, add those amounts, and divide by the total number of shares. For 100 shares at ₹1,500 and 50 at ₹1,200, the average is (150,000 + 60,000) / 150 = ₹1,400.
How many shares do I need to buy to average down?
Holding Q shares at average A and buying at price P, you need Q × (A − T) / (T − P) shares to reach target average T. With 150 shares at ₹1,400, buying at ₹1,100 to reach ₹1,300 takes 150 × 100 / 200 = 75 shares.
Can I bring my average below the current price?
No. The new average is a weighted mix of the old average and the buy price, so it always lands between them. Buying at ₹1,100 can bring an average of ₹1,400 close to ₹1,100 but never below it.
Does the average price include brokerage?
Brokers' average prices usually exclude brokerage and taxes. For capital gains tax, brokerage on purchase is part of the cost and brokerage on sale is deducted from the sale value; securities transaction tax is not deductible.