How the buy average is calculated on Zerodha Console
The buy average is the single most important number on your holdings screen, because it decides whether a position shows a profit or a loss and how much capital gains tax you eventually pay. On Zerodha Console the figure is not a simple arithmetic mean of every price you ever paid. It follows a specific accounting method, it deliberately ignores certain trades, and it behaves differently for trade-to-trade scrips. This article explains exactly how Console arrives at your buy average, works through a numerical example, and clears up the two situations that confuse investors most: intraday round-trips and trade-to-trade stocks.
Conflict-of-interest disclosure. This guide is published by the WebNotes Editorial Team for informational purposes and is written independently. WebNotes operates a Zerodha account-opening referral programme, disclosed on the pages that carry the referral link; this guide does not carry it and earns no referral commission from anything described here.
The method: First In, First Out (FIFO)
Your buy average price follows the First In, First Out method, where the shares you bought first are treated as the shares you sell first. When you place a sell order against a holding, Console does not average the sale across all your lots. Instead, it removes the quantity from your oldest purchases, working forward in date order, and the buy average is recalculated on whatever quantity remains.
Zerodha does not choose FIFO arbitrarily. The Income Tax Department (ITD) mandates the use of FIFO to report profit and loss (P&L) when filing income tax returns. Because your broker has to generate a tax P&L statement that matches the method the tax authority expects, the same FIFO logic that drives your realised gains also drives the buy average shown against your remaining holdings . This keeps your on-screen cost basis consistent with the numbers you will actually report in your ITR .
FIFO matters most when you have built a position across several purchases at different prices and then sell only part of it. The shares that leave your account are the earliest, usually cheapest, lots, so the buy average of the shares that remain can move noticeably after a partial sale even though you did not buy anything.
A worked example
Suppose you accumulate shares of a company across a few sessions and then trim the position. The sequence of trades is:
- Buy 50 shares at ₹260.
- Buy 30 shares at ₹256.
- Sell 20 shares.
- Buy 20 shares at ₹270.
When you sell the 20 shares in step 3, FIFO removes them from your earliest lot, the 50 shares bought at ₹260. That lot now holds 30 shares, and the 30 shares bought at ₹256 are untouched. After the fresh purchase in step 4 you are left with three lots that are still held:
- 30 shares at ₹260
- 30 shares at ₹256
- 20 shares at ₹270
Console then takes the quantity-weighted average of these surviving lots:
[(30 x 260) + (30 x 256) + (20 x 270)] / (50 + 30 - 20 + 20)
The numerator works out to 7,800 + 7,680 + 5,400 = 20,880, and the denominator is 80 shares, so the buy average is ₹261. Notice that the sale of 20 shares in step 3 raised the average slightly, because the shares removed were from the ₹260 lot while the untouched ₹256 lot and the newer ₹270 lot now carry more weight. This is the FIFO effect in action: a partial sale changes the buy average of what you keep, even though the market prices of your purchases never changed.
Why intraday trades are excluded
A common surprise is that buying and selling the same scrip within a single session does not change your holdings buy average at all. The buy average calculation of your holdings does not include intraday trades.
The reason is physical. Your holdings are the shares actually sitting in your demat account at CDSL . When you sell shares from your holdings and buy the same quantity back on the same day, the shares do not physically move in or out of your demat account. The exchange nets the two legs into an intraday transaction, so the difference between your sell price and your rebuy price is booked as intraday profit or loss, and the buy average of your holdings remains unaffected.
This has a practical consequence worth remembering. If you own 100 shares at a buy average of ₹500 and you sell all 100 at ₹520 in the morning, then repurchase 100 at ₹505 in the afternoon, your holdings still show a buy average of ₹500. You have simply pocketed an intraday gain on the round-trip; you have not reset your cost basis to ₹505. To actually change the holdings buy average you must let the sold shares settle out of your demat account and buy back on a later day as a fresh delivery trade. For more on how same-day activity is treated, see how the P&L report separates intraday from delivery.
Trade-to-trade (T2T) stocks: the latest price becomes the average
Trade-to-trade stocks behave differently, and this catches many investors out. A T2T scrip is one the exchange has placed in a settlement category where every trade must be taken to delivery; you cannot square off a position intraday. Because of this, the way the buy average resets is more abrupt.
For a T2T stock your new buy average will be the price of your latest purchase after you have fully sold out your existing position. T2T stocks still use the FIFO method, where your oldest holdings are sold first and new purchases create a fresh buy average. Since T2T stocks cannot be traded intraday, your transactions count as separate delivery trades rather than intraday trades, so each leg fully affects your demat holdings.
Consider a T2T scrip where you:
- Buy 100 shares at ₹600.
- Sell 100 shares at ₹700.
- Buy 100 shares at ₹690.
Under FIFO the sale of 100 clears out your entire original lot, so there is nothing left to average against. The subsequent purchase of 100 at ₹690 is a brand-new position, and your new buy average becomes ₹690, the price of that latest purchase. There is no blending with the earlier ₹600 lot, because that lot was sold in full and settled as a delivery trade before the new purchase.
Corporate actions change the average automatically
Corporate actions are the other force that moves your buy average without a trade on your part. When a company declares a bonus issue , a stock split , a rights issue, a de-merger or a merger, your quantity and your per-share cost both change, so the buy average has to be adjusted to keep your total invested value consistent.
Zerodha applies these adjustments for you. Once the corporate action is completed, Zerodha updates the buy average, and this process typically takes around two weeks from the date of the corporate action. During that window the figure on Console may temporarily look wrong or even show as N/A while the adjustment is pending. This is expected, and in most cases you should not try to correct it manually. The full set of causes and the fix is covered in why your buy average shows N/A or looks wrong .
When you may need to set the average yourself
FIFO and automatic corporate-action adjustment cover the vast majority of cases, but there are situations Console cannot compute on its own. The clearest is shares that arrive by transfer from another demat account . When shares move in from another broker, only the units are transferred; the original purchase price and date of acquisition do not come with them. Console therefore has no cost to average, and the position may show a discrepancy until you supply the missing purchase details.
In these cases you add the missing trade yourself so that FIFO has the data it needs. The full procedure, including the one-entry-per-ISIN-per-date rule and the date restrictions, is in how to update or correct your buy average on Console . If the discrepancy cannot be resolved because the stock is inactive or a corporate action is still processing, follow the escalation path in how to fix a holdings discrepancy .
A note on futures and options
The buy average logic described here is for your equity delivery holdings. Zerodha maintains a separate explanation of how the buy average is arrived at for futures and options positions , which sit in your positions book rather than your demat holdings and follow their own averaging conventions. Do not apply the equity FIFO example above to F&O positions; treat them separately.
Kite versus Console
Both Kite and Console show an average cost against the same underlying demat holdings, so in normal conditions they agree. Console is the more authoritative view for long-term cost basis: it is where corporate-action adjustments and any manual corrections are reflected, and it is the source for your holdings report and tax P&L . If the two ever disagree, it is usually a temporary synchronisation lag or a pending corporate-action adjustment, and Console is the figure to trust once processing completes. To see both side by side, read how to view holdings on Kite versus Console .
Frequently asked questions
How is the buy average calculated on Zerodha Console?
Does the buy average include intraday trades?
Why is my trade-to-trade (T2T) buy average just my last purchase price?
Why did my buy average change after a bonus or split?
Is the buy average the same on Kite and Console?
See also
- How to update or correct your buy average on Console
- Why your buy average shows N/A or looks wrong
- How to view holdings on Kite vs Console
- Understanding the Console holdings report
- Trade-to-trade (T2T) stocks on Zerodha
- Dirty vs clean price and the buy average
- How to fix a holdings discrepancy
- Corporate actions on Zerodha Console
- Console tax P&L statement
References
- Zerodha Support, How is the buy average calculated in Console?, support.zerodha.com.
- Zerodha Support, Trade-to-trade (T2T) buy average, support.zerodha.com.
- Zerodha Support, Buy average of holdings and intraday trades, support.zerodha.com.
- Income Tax Department, FIFO method for computing capital gains, incometax.gov.in.