StockCalci

How to calculate the average price of shares (with partial sells, bonus and splits)

If you bought the same stock more than once, at different prices, your broker app shows one “average price”. Here is how that number is worked out, and the three situations where it confuses people: selling part of your holding, bonus issues and stock splits.

The formula

Average price = total amount invested ÷ total number of shares

Total amount invested is each buy price multiplied by its quantity, added together.

Example: two buys

Buy Price Quantity Amount
1 ₹1,200 10 ₹12,000
2 ₹1,050 10 ₹10,500
Total 20 ₹22,500

Average = ₹22,500 ÷ 20 = ₹1,125.

Example: three buys of different sizes

Buy 20 at ₹850, 15 at ₹780 and 25 at ₹720. Total invested = ₹17,000 + ₹11,700 + ₹18,000 = ₹46,700. Total shares = 60. Average = ₹46,700 ÷ 60 = ₹778.33.

Notice it is not the simple average of the three prices (₹783.33). Bigger buys pull the average towards their price. The stock average calculator does this for any number of buys.

How many shares to reach a target average?

You hold 20 shares at ₹1,125 and the stock is now ₹1,000. To bring your average down:

Target average Shares to buy at ₹1,000 Extra money needed
₹1,080 12 ₹12,000
₹1,050 30 ₹30,000
₹1,025 80 ₹80,000
₹1,010 230 ₹2,30,000

Each step closer to the market price costs far more than the last. You can never reach the market price exactly, only get near it. Before adding more to a falling stock, read averaging down: when it helps and when it hurts.

What happens when you sell part of your holding?

In your broker app, selling does not change your average buy price. If you hold 20 shares at ₹1,125 and sell 10, the remaining 10 still show ₹1,125.

But for income tax, the first shares bought are treated as the first sold (first in, first out). Using the example above:

  • You sell 10 shares at ₹1,150.
  • Broker app P&L against the average: (₹1,150 − ₹1,125) × 10 = +₹250
  • Tax P&L using the first lot bought at ₹1,200: (₹1,150 − ₹1,200) × 10 = −₹500

Same trade, a profit in the app and a loss for tax. This is why your broker’s “tax P&L report” can look different from the holdings screen. Use the tax report when filing, and the capital gains calculator for each lot.

Bonus issues

In a bonus issue, the company gives you extra shares for free. Your total investment stays the same, so the average falls.

1:1 bonus: 20 shares at ₹1,125 become 40 shares at ₹562.50. Total invested is still ₹22,500.

For tax, the bonus shares have a cost of zero and their holding period starts from the allotment date. Broker apps usually show the adjusted average for convenience.

Stock splits

In a split, each share is divided into several, and the price adjusts the same way. Nothing changes in value.

1:5 split (for example, face value ₹10 to ₹2): 20 shares at ₹1,125 become 100 shares at ₹225. Total invested is still ₹22,500.

Unlike bonus shares, split shares keep the original purchase date and cost, spread across the new number of shares.

Charges and your real average

Brokerage, STT, stamp duty and other charges on each buy are part of your real cost. Most broker apps show the average without them. For a precise break-even, add the buy-side charges to the total invested. The brokerage calculator shows charges for any trade.

Quick checklist

  1. Total invested ÷ total shares = average.
  2. Selling part of a holding does not change the average in your app.
  3. For tax, the earliest shares are sold first.
  4. Bonus: same money, more shares, lower average.
  5. Split: same money, more shares, lower price per share, original dates kept.

Try it with your own numbers

Open the Stock average calculator

For education only. This is not investment, trading or tax advice, and StockCalci is not a SEBI-registered adviser.