Tax Loss Harvesting in India: Why I Sold 597 Shares Instead of 800
I sold 597 shares instead of 800 and booked ₹1,804 more loss. The FIFO maths behind a real harvest, and why 31 March is the wrong deadline.
Five Things Nobody Tells You About Tax Loss Harvesting
By the end of this guide, you'll understand:
- Why selling more units can book you a smaller loss, and where the optimum sits
- Why the tax loss harvesting deadline is not 31 March, and never was
- How FIFO decides your loss for you, whether you like it or not
- What your portfolio looks like the day after a harvest, which almost nobody writes about
- Whether the saving is real or merely postponed
Reading Time: 18 minutes
I Sold ₹1.65 Lakh of NIFTYBEES and Bought It Back Ten Minutes Later
On 20 August 2026 at 12:11 in the afternoon, I sold 597 units of NIFTYBEES at ₹276.42. Ten minutes and twenty four seconds later I bought back the same 597 units at ₹276.48.
I ended the day owning exactly what I had owned that morning. Same 1,596 units, same market value, no meaningful cash movement. What changed was a number that had not existed before lunch: a realised short term capital loss of ₹7,059.86, which will reduce my tax bill by ₹1,411.97.
The whole thing cost ₹89.53.
This article is about the reasoning behind that trade, and specifically about three things I got wrong on the first pass. My instinct was to sell 800 units. That would have booked ₹1,804 less loss while liquidating 203 more units. I had also assumed, as most people do, that this was a March job. It was not, and waiting would have destroyed ninety percent of the benefit.
Most Indian writing on this topic says the same four things: losses offset gains, you can buy back immediately, do it before March, here is a calculator. All true, all shallow. The interesting part of tax loss harvesting is not whether to do it. It is how much to sell, when the real deadline falls, and what your holding looks like afterwards. Those three questions have precise answers, and none of them is the answer you would guess.
The Whole Strategy Fits in One Sentence
The tax department only notices gains and losses you have realised, meaning actually sold. A loss sitting unrealised in your portfolio is invisible to it and worth nothing to you.
Tax loss harvesting is the act of selling a losing position to make the loss visible, then immediately buying it back so your portfolio is unchanged. You end the day owning what you owned that morning, holding a deduction you did not have before.
You want the tax event without the investment event.Everything difficult about this strategy follows from that sentence. The tax event is what you are trying to create. The investment event is what you are trying to avoid. Every decision below is about maximising the first while eliminating the second.
You Can Buy It Back the Same Second. That Is Legal.
The entire strategy rests on one permission, and most people never check whether they actually have it.
The Income-tax Act contains no provision that disallows a capital loss because you repurchased the same security. Not after a day, not after an hour, not after ten seconds. Sell at a loss, buy back immediately, and the loss is fully allowable against your gains.
That permission is the entire reason this strategy is practical. If the law required you to genuinely stay out of the market for a month before repurchasing, the maths would collapse. A month of market risk on a 1.65 lakh position is worth several thousand rupees of variance. The tax saving was ₹1,412. You would be betting the house to win the doorknob.
Indian brokers treat this as routine. Zerodha publishes a tax loss harvesting report inside Console and writes about it every year, which tells you how uncontroversial the mechanic is.
One honest caveat. A minority of chartered accountants are uncomfortable with a literally same second buy back, on general anti avoidance principles. There is no rule prohibiting it, and no case law targeting retail harvesting. But if you want belt and braces comfort, two options cost you almost nothing: rebuy after a few hours, or buy a different ETF tracking the same index. The exposure is identical and the question of "same security" never arises.
I split the difference and waited ten minutes. That compromise cost me six paise per unit, or ₹35.82 in total. I consider that a reasonable price for not having to think about it again.
The Four Capital Gains Rules That Decide Everything Below
Before the interesting parts, the framework. These are the FY 2026-27 numbers, under the Income-tax Act, 2025, which replaced the 1961 Act from 1 April 2026 and renumbered everything.
| Item | Treatment | Where it lives now |
|---|---|---|
| Holding period, listed equity and equity ETFs | 12 months separates short term from long term | |
| Short term capital gains, STT paid equity | 20% | Section 196 (was 111A) |
| Long term capital gains | 12.5%, on gains above ₹1.25 lakh a year | Section 198 (was 112A) |
| Carry forward of unused losses | 8 tax years | Section 111 (was 74) |
If you have read about capital gains before, those section numbers will look wrong. They are not. The Income-tax Act, 2025 renumbered the provisions without changing the rules, in the same way sections 234A, 234B and 234C became 423, 424 and 425, which I covered in the advance tax guide. Most articles still published online cite 111A and 112A.
Now the part that drives every decision in this article:
- Can be set off against both short term and long term gains
- Shelters income taxed at 20%
- Carries forward 8 tax years
- Strictly more flexible and more valuable
- Can be set off only against long term gains
- Shelters income taxed at 12.5%
- Carries forward 8 tax years
- Worth nothing at all if you have no long term gains
- Can be set off against both short term and long term gains
- Shelters income taxed at 20%
- Carries forward 8 tax years
- Strictly more flexible and more valuable
- Can be set off only against long term gains
- Shelters income taxed at 12.5%
- Carries forward 8 tax years
- Worth nothing at all if you have no long term gains
A short term loss is better on both axes. It is more flexible, and the income it shelters is taxed at a higher rate. That asymmetry is not a footnote. It is the reason the conventional March advice is wrong, which I will come to.
One more condition, easy to miss and expensive to forget: carry forward of unused losses depends on filing your return by the due date. File late and the loss you carefully harvested simply evaporates if you could not use it this year.
FIFO Picks Which Shares You Sell. You Do Not.
This is the mechanic most retail investors get wrong, and it deserves real space, because everything counter intuitive later follows from it.
For shares held in demat form, Indian tax law applies First In, First Out. When you sell, the cost basis used is that of your oldest remaining purchase. You have no say in the matter. Your broker will happily let you click "sell". It will not let you pick which units.
The useful mental model is a queue:
FRONT (sold first) ─────────────────────────► BACK (sold last)
oldest purchase newest purchase
Whatever sits at the front of that queue determines whether a sale produces a profit or a loss, regardless of what the rest of your holding looks like. Your average cost tells you nothing useful here. Two investors with identical average costs and identical market values can have completely different harvests available, purely because of the order in which they bought.
Here is what my queue looked like on the morning of the trade:
Jan '26 @ ~₹290 Feb @ ~₹287 Mar @ ~₹265 Apr @ ~₹268 ... Jul @ ~₹274
└──── bought HIGH, now worth 276 = LOSS ────┘ └─── bought LOW = gain ───┘
▲ front of queue
I had been accumulating NIFTYBEES through a falling market. I bought in January near ₹290, kept buying as it fell to ₹253 in April, and bought again on the recovery to ₹276. The consequence is that my loss making lots happened to be first in line. FIFO, normally a constraint that investors complain about, was in this case doing exactly what I wanted.
Whether FIFO helps or hurts you depends entirely on the shape of your accumulation history, and you do not get to change it. An investor who bought low and has been riding gains has no harvest available at all, no matter how many recent losing purchases sit at the back of their queue. Before you plan a harvest, pull your lot wise holdings. Not the average price. The lots.
Zerodha exposes this in Console under Holdings, with the breakdown by purchase date. Most brokers have an equivalent. If yours does not show lot level detail, your contract notes do.
#1 Selling More Shares Books You Less Loss
My instinct was to sell 800 of my 1,596 units. Round number, roughly half the position, felt sensible. Here is what FIFO actually produces at a market price of ₹276.42:
| Units sold | Realised loss |
|---|---|
| 400 | −₹5,791 |
| 500 | −₹6,809 |
| 597 | −₹7,060 ← maximum |
| 600 | −₹7,039 |
| 800 | −₹5,256 |
| 1,000 | −₹3,416 |
| 1,200 | −₹2,150 |
Why this happens. FIFO consumes the queue front to back. As long as it is eating lots priced above the current market, each additional unit adds to the loss. The moment it reaches lots priced below the market, each further unit starts adding a profit that nets against the loss you were trying to accumulate. Sell far enough and you wipe out the entire benefit.
The realised loss is not monotonic in quantity. It rises, peaks, and falls away. Sell 1,200 units and you have liquidated three quarters of your position to book less than a third of the available loss.
The curve peaks at 597 units and falls away on both sides. Selling more units past the turning point starts netting profits against the loss you are trying to book.
The rule is simple to state. Sell exactly up to, and not one unit past, the last lot priced above the current market price. In my queue that turning point sat at 597 units. The very next lot had been bought below ₹276.42 and was carrying a profit, so every unit past 597 started working against me.
Here is the fine grained view around the optimum, so you can watch the curve turn:
| Units sold | What FIFO was consuming at that point | Realised |
|---|---|---|
| 512 | lots bought above the market price | −₹6,907 |
| 537 | lots bought above the market price | −₹7,047 |
| 587 | a lot bought a few paise below the market | −₹7,033 |
| 597 | the last lot above the market | −₹7,060 ← peak |
| 689 | lots bought below the market price | −₹6,423 |
| 796 | lots bought below the market price | −₹5,334 |
Notice that even the approach to the optimum is not smooth. One lot in that sequence had been bought a few paise below the market price of ₹276.42, so it added a small profit and dented the running total, before the next loss making lot pushed it back down to the peak. This is exactly why the answer cannot be eyeballed from a chart of your average cost.
The optimum is almost never a round number, and it changes every time the price moves. At ₹276.42 the answer was 597 units. At ₹270 it would be a different quantity, because a different set of lots sits above the market. There is no shortcut here. It has to be computed lot by lot, on the day, at the price you are actually going to trade at.
#2 Your Real Deadline Is January, Not 31 March
Every article published in February tells you to harvest before the financial year closes. For my portfolio, following that advice would have destroyed most of the benefit.
Every loss making lot in my position was purchased between January and March 2026. They cross the 12 month mark, and convert from short term to long term, starting 9 January 2027.
Here is my ₹7,060 harvest broken down by the month each contributing lot turns long term:
| Turns long term | Loss affected | Share of the harvest |
|---|---|---|
| January 2027 | ₹6,348 | 90% |
| February 2027 | ₹538 | 8% |
| March 2027 | ₹175 | 2% |
An investor who waited until "tax season" in March 2027 would open their console and find that ninety percent of this loss had quietly become a long term capital loss. Usable only against long term gains. Worth 12.5 percent instead of 20 percent. And against a short term gain, which is what I actually need to shelter, worth exactly nothing.
Harvest a short term loss before the lot's first anniversary, not before the year end. Every lot has its own private deadline, and the financial year is irrelevant to this decision. A lot bought on 9 January 2026 has to be harvested by 8 January 2027. A lot bought on 20 August 2026 has until 19 August 2027, which is in a different financial year entirely.
This is worth sitting with, because it inverts the usual advice completely. The conventional calendar says "review your portfolio in February". The correct calendar says "review the age of your loss making lots continuously, and act when the oldest ones approach twelve months". For a portfolio built through steady monthly buying, that means a rolling deadline every single month.
There is a second reason the March habit is bad, and it is subtler. Everyone harvests in March. That is when the advice columns run, when the reminders go out, and when the tax nudges appear in broker apps. Waiting until then means you are making a decision under a deadline, on whatever price the market happens to be showing, rather than acting when your lot structure and the price were actually favourable.
The ₹3,300 Bet Hiding Inside a ₹1,412 Tax Saving
If you sell and do not repurchase, you have accidentally placed a directional bet.
The block I sold was worth ₹1.65 lakh. The tax saving was ₹1,412. A two percent move in the index over the days I was out of the market is ₹3,300, which is more than double the prize. The buy back exists for exactly one reason: to cancel market risk. Every hour out of the market is unpaid exposure.
While I was sitting on the sell order I asked myself a question that sounds prudent, and is not. What if I buy back gradually, one tenth on each of the next ten sessions?
Working it out properly is the most useful thing I did all day.
Buying one tenth on each of the next ten sessions leaves you, weighted by units, 5.5 full trading days out of the market. Here is what that gap is worth on ₹1.65 lakh, assuming roughly 13 percent annualised volatility and 11 percent long run drift:
The noise is more than double the prize, and the coin is weighted against you, because equities drift upward. You would be laying a ±₹3,000 bet on top of a ₹1,400 certainty.
The honest version of this argument, and I do not want to strawman it: staggering the rebuy is the correct move if you are genuinely bearish over the following fortnight. Being out of the market during a fall is worth far more than any tax saving. The problem is not the bet. The problem is letting a ₹1,412 tax decision become the unexamined cover story for a ₹1,65,000 directional call you never explicitly made. If you want to reduce exposure, decide that separately, size it deliberately, and do not smuggle it in through the back door of a tax trade.
There is a better answer for anyone tempted by "but what if it drops". Rebuy immediately, and if the price then falls, harvest again. A fall creates fresh losses in lots that are currently profitable. That decouples the two decisions completely: the tax play stays riskless, and a drop becomes an opportunity rather than a regret. You get the option value without paying for it with market exposure.
What ₹7,060 of Booked Loss Actually Cost Me
Zerodha, 20 August 2026, both legs CNC delivery:
| Time | Type | Qty | Price |
|---|---|---|---|
| 12:11:31 | SELL | 597 | ₹276.42 |
| 12:21:55 | BUY | 597 | ₹276.48 |
| Sale proceeds | ₹1,65,022.74 |
| Repurchase cost | ₹1,65,058.56 |
| Realised short term capital loss | −₹7,059.86 |
| Tax saved at 20% | +₹1,411.97 |
| Charges (STT ₹1.65, stamp ₹24.76, exchange ₹9.80, SEBI ₹0.33, GST ₹1.82, DP ₹15.34) | −₹53.71 |
| Slippage, 6 paise × 597 | −₹35.82 |
| Net benefit | ₹1,322.45 |
Total friction: ₹89.53, or 1.3 percent of the loss harvested. At zero brokerage delivery, the cost of doing this is close to noise. The two largest components were the DP charge, roughly ₹15 per scrip per debit day regardless of size, and stamp duty on the buy leg. Both trivial.
Harvesting an ETF is far cheaper than harvesting a stock, and the reason is STT. Equity ETFs pay securities transaction tax of 0.001 percent on the sell side only, and nothing on the buy. Ordinary equity delivery pays 0.1 percent on both legs. The same 1.65 lakh round trip in a single stock would have cost about ₹330 in STT instead of ₹1.65, taking total friction from ₹89.53 to roughly ₹418, from 1.3 percent of the loss to about 5.9 percent. Still worth doing on a loss this size, but it flips the answer for small harvests. Below roughly ₹2,000 of loss on an individual stock, check the maths before you trade.
Same Shares. Same Money. One New Deduction.
| Before | After | |
|---|---|---|
| Units held | 1,596 | 1,596 |
| Market value | ₹4,41,166 | ₹4,41,166 |
| Net cash movement | ~₹0 | |
| Cost basis, FIFO average | ₹276.86 | ₹272.44 |
| Unrealised loss available to harvest | −₹7,060 | ₹0 |
| Realised loss available for set off | ₹0 | −₹7,060 |
The top three rows are identical. Only the bottom three moved. That is the entire trade.
Read the fifth row carefully. It is the harvestable unrealised loss that went to zero, not my portfolio's total unrealised P&L. The 999 units I did not sell were bought during the April dip and are sitting on a gain of roughly ₹6,360. Netted against the harvested lots, my whole position was only about ₹700 underwater to begin with. The harvest extracted ₹7,060 of deductible loss from a portfolio showing a ₹700 loss overall, which is precisely the point of thinking in lots rather than averages.
There is a neat way to make the mechanism click. My average cost fell by exactly ₹4.42 per unit, from ₹276.86 to ₹272.44. Multiply that by all 1,596 units and you get ₹7,059, the same number as the loss booked.
The loss did not disappear. It moved out of the unrealised column and onto the tax return, where it is worth 20 percent.#3 You Can Only Spend This Once
This section barely exists in published writing, and for a repeat harvester it is the most useful thing here.
Harvesting eats your FIFO queue from the loss end. It is not a renewable action.
Having consumed all 597 loss making units, the front of my queue moved forward to the lots I bought during the April dip:
Mar '26 @ ~₹269 Apr @ ~₹270 May-Jul @ ~₹272 │ Aug 20 @ ₹276.48
└──────── bought CHEAP, now worth 276.48 = GAIN ──┘ │ └── the rebuy ──┘
▲ front of queue
The 999 surviving older units now average ₹270.05, all of them below the market. Any further sale realises gains, not losses:
| If I sell | FIFO realises |
|---|---|
| 100 units | +₹754 gain |
| 250 units | +₹2,643 gain |
| 633 units | +₹5,138 gain |
The scrip is exhausted as a harvest source until the price falls below roughly ₹269, about 2.7 percent lower than where it trades today. That is not a problem, but it is a fact you need in your head, because the intuitive assumption after a successful harvest is that you can do it again next month. You cannot.
Your Best Future Loss Is Now Out of Reach
Here is the awkward second order effect, and the one I had not anticipated at all.
The 597 units I repurchased at ₹276.48 went to the back of the queue. If NIFTYBEES falls to ₹265, that block becomes the single largest loss in my portfolio, roughly ₹6,860 of it. But FIFO will not let me touch it until I have sold all 999 units sitting in front.
Your most harvestable lot is the one buried deepest.Which is why, at lower prices, the optimal harvest stops being a partial sale and becomes all or nothing:
| If price falls to | Best available harvest | Units that must be sold |
|---|---|---|
| ₹269 | −₹5,517 | all 1,596 |
| ₹265 | −₹11,901 | all 1,596 |
| ₹260 | −₹19,881 | all 1,596 |
The transaction cost of a full round trip is still only about ₹200, so cost is not the obstacle. The real cost is different and easy to miss:
Liquidating everything resets the 12 month clock on all 999 dip bought units, several of which are already five months into their journey toward long term treatment. You would be trading LTCG progress for STCL. On the units bought in March and April, you would be surrendering a 12.5 percent rate that is nearly earned in order to book a loss at 20 percent. Whether that is worth it depends on the size of the loss and how long you intend to hold. It is a genuine trade off, not a free action.
This is the part that turns tax loss harvesting from a one off trick into something you have to actually think about. Every harvest reshapes the queue for every future harvest. If you plan to do this regularly, keep a note of what your queue looks like after each one.
Is This a Real Saving, or a Tax Bill You Just Postponed?
Lowering my cost basis from ₹276.86 to ₹272.44 means a larger taxable gain whenever I eventually sell for real. I have deducted ₹7,060 today and added ₹7,060 to some future gain. On its own, that is a deferral, not a deduction.
It becomes a genuine, permanent saving through rate arbitrage:
Stated as a principle: you are converting a 20 percent short term gain into a 12.5 percent or zero long term gain, and collecting the cash a year early either way. That is the actual mechanism. The headline loss figure of ₹7,060 is not the benefit, it is just the lever.
The corollary matters more than the arithmetic. Harvesting is most valuable when you have short term gains to shelter and you intend to hold the repurchased units long term. Both conditions. If you are going to sell everything again in three months, you have converted a short term gain into a short term gain at the same rate, paid the friction, and achieved nothing but a busier contract note. The strategy rewards patient holders specifically, which is a pleasant thing for a tax trick to do.
Harvesting a Loss You Cannot Use Is Expensive Busywork
Harvesting a loss you cannot use is pointless friction. Before doing any of this, confirm you have something to shelter.
I did. I was carrying more than ₹30,000 of short term capital gains on other holdings this year:
| STCG on other stocks | ₹30,000 |
| Harvested loss from NIFTYBEES | −₹7,060 |
| Taxable STCG after set off | ₹22,940 |
| Tax saved | ₹1,412 |
| Offset capacity still unused | ₹22,940 |
NIFTYBEES supplied only ₹7,060 of shelter, so the remaining ₹22,940 has to come from other scrips. This is the thing to internalise: a complete harvest is a portfolio wide sweep, not a single stock action. Find every holding sitting on an unrealised loss that you would happily re-enter, and round trip each one. Same day rebuys mean no position actually changes. You are only rewriting cost bases.
If you have no gains this year, the loss still carries forward eight tax years, but the benefit is deferred and uncertain while the friction is immediate. That is a much weaker case, and for small losses it is often not worth the trouble.
Booking gains and losses has a knock on effect people forget. No TDS is deducted on capital gains from listed shares, so the tax on your net gain is yours to pay on schedule during the year, not at filing time. If your harvest meaningfully changes your net capital gains position, it changes your advance tax instalments too. The advance tax guide covers the four deadlines and what missing one costs, and the advance tax calculator will work the revised schedule out for you.
Eight Checks Before You Place the Order
Eight Things Worth Remembering
-
The loss is not monotonic in quantity. Selling more units can book less loss, because FIFO eventually reaches lots priced below the market and starts netting profits against you. I booked ₹1,804 more loss by selling 597 units instead of 800.
-
Sell up to the last lot priced above the market, and not one unit further. That is the optimum, it is almost never a round number, and it moves every time the price does.
-
Your deadline is each lot's first anniversary, not 31 March. Ninety percent of my harvest turns long term in January 2027. Waiting for tax season would have converted a 20 percent deduction into a 12.5 percent one, or into nothing at all.
-
Nothing stops you buying back immediately, which is the only reason this works. You never have to leave the market, so the tax event costs you no investment risk. A minority of accountants prefer a gap of a few hours, which is cheap comfort.
-
Do not stagger the rebuy. On ₹1.65 lakh, ten sessions of staggering puts ±₹3,174 of noise against a ₹1,412 prize, with the drift working against you. If you want to be out of the market, decide that separately.
-
The saving is rate arbitrage, not magic. You are deducting at 20 percent today and repaying at 12.5 percent or zero later. Real, permanent, and worth roughly ₹530 to ₹1,412 here, but only if you hold the repurchased units long term.
-
Harvesting is a depleting resource. It eats your queue from the loss end, and the units you rebuy go to the back where FIFO cannot reach them. After a harvest, the same scrip is usually a gain generator, not a loss source.
-
ETFs are much cheaper to harvest than stocks. 0.001 percent STT on the sell side only, against 0.1 percent on both legs for equity delivery. Total friction here was 1.3 percent of the loss booked.
If you want the wider context on why I hold a broad market ETF at all rather than picking individual names, the portfolio diversification guide and how to build a non-correlated portfolio both cover the reasoning. For what NIFTYBEES actually holds, understanding the NIFTY 50 breaks down the index. And if you find the mechanics of ETF trading interesting in their own right, the ETF ki Dukan strategy looks at a very different approach to the same instruments.
This article is general information, not tax or investment advice. The worked example is my own specific situation on one specific day, with one specific lot structure, and the optimal quantity for your holding will be different. Rates, section numbers and charges are as they stood for FY 2026-27 at the time of writing. Confirm the treatment of your own transactions with a qualified chartered accountant before acting.
Disclaimer
Nothing on this site is investment advice. All content is for educational and informational purposes only. Do your own research and consult a registered financial adviser before making any investment decisions.
Finished reading? Mark this article to track your learning progress.
Software Engineer, Self-Taught Investor
Software engineer who started learning about money in 2016 after a layoff coincided with a new home loan. Went from bank deposits to mutual funds to picking stocks in India and the US, learning through YouTube, screener.in, TradingView, and the hard way. Still learning. This site is her notes made public — for education and sharing only, not financial advice.
