1. Your trades
Charges (optional)
Your average
Running average after each trade
2. Average down or up
Uses your current holding and average from above. Change the buy price if you plan to buy at a different price than the market.
3. Sales: average vs FIFO
Stock average formula
Average price = (Q₁ × P₁ + Q₂ × P₂ + … ) ÷ (Q₁ + Q₂ + … ), where Q is the number of shares in each purchase and P is the price paid. It is a weighted average, so a bigger purchase pulls the average closer to its price. To include costs, add your charges to the total before dividing.
Worked example
You buy 50 shares at ₹1,500 (₹75,000) and later 100 shares at ₹1,200 (₹1,20,000). You now hold 150 shares that cost ₹1,95,000, so your average is ₹1,300, not the plain average of ₹1,350. At a market price of ₹1,250 the holding is worth ₹1,87,500, a loss of ₹7,500, and the price needs to rise 4% to break even.
How many shares to buy to average down
If you hold Q shares at an average A and buy more at price P, the shares needed to reach a target average T are Q × (A − T) ÷ (T − P). Holding 100 shares at ₹500 with the price at ₹400, reaching a ₹450 average needs 100 × 50 ÷ 50 = 100 shares, which costs ₹40,000. The target must lie between your average and the buy price, and the closer it gets to the buy price, the more shares you need.
Averaging down: think before you buy
- A lower average makes break-even easier, but it also makes your position bigger, so any further fall costs more.
- Ask whether you would buy the stock fresh today at this price. If not, a lower average is not a reason on its own.
- Averaging up (buying more as a stock rises) raises your average but adds to a position that is working.
Selling: average price vs FIFO
Selling does not change the average of the shares you keep, which is what your broker's holdings screen shows. For capital gains tax in India, though, the shares bought first are treated as sold first (FIFO), so the taxable gain can differ. Section 3 of the calculator shows both side by side when you add a sell.
Frequently asked questions
How do I calculate the average price of a stock?
Multiply each purchase's quantity by its price, add those amounts, and divide by the total number of shares. 50 shares at ₹1,500 and 100 at ₹1,200 cost ₹1,95,000 for 150 shares, an average of ₹1,300.
How many shares should I buy to average down?
Shares to buy = held quantity × (current average − target average) ÷ (target average − market price). Holding 100 shares at ₹500 with the price at ₹400, reaching a ₹450 average needs 100 more shares, or ₹40,000.
Does selling shares change my average price?
No. With the weighted average method that brokers show, a sale removes shares at the current average, so the average of what is left stays the same. Only new buys change it.
Why is my tax profit different from my broker's average?
For capital gains tax in India, shares are treated as sold first in, first out (FIFO), so the oldest lots are sold first. That can give a different cost and gain than the weighted average shown in your holdings.
Should I include brokerage and charges?
For a true break-even, yes. Enter your buy charges as a percentage or a flat amount per buy and the calculator adds them to your cost, so the break-even price includes them.