LTCG & Gain Harvesting

LTCG Gain Harvesting – Book Profits Tax-Free Before March 31

12 min read · Updated 22 February 2026

What Is Gain Harvesting and Why Should You Do It?

Gain harvesting is a tax planning strategy where you deliberately sell long-term holdings at a profit to realize gains within the annual Rs 1,25,000 LTCG exemption, then immediately repurchase the same shares. The result is that you book profits completely tax-free while resetting your cost basis to the current market price.

The logic is simple but powerful. Under Section 112A, the first Rs 1,25,000 of LTCG from listed equity and equity mutual funds is exempt from tax every financial year. If you have unrealized gains sitting in your portfolio, those gains are not taxed until you sell. But the exemption is available only when you actually realize the gains. By selling just enough to use the exemption, you extract tax-free profits from your portfolio every year.

The immediate rebuy is the critical part. Since India has no wash sale rule, you can sell and rebuy the exact same stock on the same day. Your investment position does not change. You still own the same number of shares in the same company. The only thing that changes is your cost basis, which is now higher (equal to the current market price), and your holding period, which restarts.

Over a multi-year investment horizon, this strategy compounds significantly. Each year, you extract Rs 1,25,000 in tax-free gains and reset the cost basis upward. When you eventually sell the shares for real (perhaps decades later), your taxable gain is dramatically smaller because your cost basis has been ratcheted up through years of gain harvesting. The total tax saved over a 20 or 30-year investment career can easily run into several lakhs of rupees.

Step-by-Step: How to Execute a Gain Harvest

Executing a gain harvest requires careful planning and precise calculations. Here is the detailed process:

Step 1: Calculate your year-to-date realized LTCG. Review all equity and equity mutual fund sales you have made during the current financial year. Add up the long-term capital gains using the FIFO method. If you have already booked Rs 30,000 in LTCG from earlier sales, note this number.

Step 2: Determine the remaining exemption. Subtract your realized LTCG from Rs 1,25,000. In our example, Rs 1,25,000 minus Rs 30,000 = Rs 95,000 of exemption remaining.

Step 3: Identify harvest candidates. Go through your portfolio and find holdings that satisfy two conditions: (a) the holding period exceeds 12 months (so the gain qualifies as LTCG), and (b) there is an unrealized gain (current market price exceeds the FIFO cost basis). Sort these by the gain amount to find the best candidates.

Step 4: Calculate the exact number of shares to sell. If a stock has a per-share LTCG of Rs 500 and you need to harvest Rs 95,000, you need to sell 190 shares. Be precise to avoid exceeding the exemption significantly.

Step 5: Place the sell order. Use a market order or a limit order close to the current market price. Ensure you sell during market hours with sufficient liquidity.

Step 6: Place the rebuy order immediately. Once the sell order is executed, place a buy order for the same quantity. The rebuy price will be very close to the sell price, typically within the bid-ask spread.

Step 7: Document the transactions. Record the sell price, buy price, transaction costs, and the LTCG booked for your tax filing.

A Complete Gain Harvesting Example

Let us walk through a realistic scenario with exact numbers.

Meera has the following long-term holdings as of March 2026: - 200 shares of HDFC Bank, bought at Rs 1,400 in January 2025, current price Rs 1,750. Unrealized LTCG: Rs 70,000 (200 x Rs 350) - 150 shares of Infosys, bought at Rs 1,300 in November 2024, current price Rs 1,900. Unrealized LTCG: Rs 90,000 (150 x Rs 600) - 100 shares of TCS, bought at Rs 3,500 in December 2024, current price Rs 4,100. Unrealized LTCG: Rs 60,000 (100 x Rs 600)

Meera has not sold any equity this financial year, so her realized LTCG is Rs 0 and her full Rs 1,25,000 exemption is available.

Total unrealized LTCG across all holdings: Rs 2,20,000

Meera wants to harvest exactly Rs 1,25,000. She decides to sell all 200 HDFC Bank shares (Rs 70,000 LTCG) and 92 Infosys shares (92 x Rs 600 = Rs 55,200 LTCG). Total harvested LTCG: Rs 1,25,200.

She sells on March 25, 2026, and immediately rebuys: - Sells 200 HDFC Bank at Rs 1,750. Rebuys 200 at Rs 1,751. Round-trip cost: approximately Rs 280. - Sells 92 Infosys at Rs 1,900. Rebuys 92 at Rs 1,901. Round-trip cost: approximately Rs 200.

Total transaction costs: Rs 480 LTCG booked: Rs 1,25,200 (within exemption, so tax = Rs 0 on Rs 1,25,000; tax on Rs 200 excess = Rs 25) New cost basis: HDFC Bank at Rs 1,751, Infosys at Rs 1,901

Net benefit: Meera has permanently eliminated Rs 1,25,200 in future taxable gains by resetting her cost basis, at a cost of only Rs 505 (Rs 480 transaction costs + Rs 25 tax on the Rs 200 excess). When she eventually sells these shares, her taxable gain will be Rs 1,25,200 less.

Gain Harvesting vs Tax Loss Harvesting: When to Use Each

AspectGain HarvestingTax Loss Harvesting
What you sellWinning investments (at a profit)Losing investments (at a loss)
Tax effectBook gains within Rs 1.25L exemption (tax-free)Book losses to offset realized gains
When to do itBefore March 31, when you have unused LTCG exemptionBefore March 31, when you have realized gains to offset
Holding periodMust be >12 months (for LTCG classification)Can be short-term or long-term
Rebuy needed?Yes, immediately to maintain positionOptional (India has no wash sale rule)
Cost basis effectIncreases cost basis (reduces future tax)Decreases cost basis (may increase future tax)
Tax savings per Rs 1LRs 12,500 (avoids 12.5% on future gains)Rs 20,000 (offsets STCG) or Rs 12,500 (offsets LTCG)
Both strategies are complementary and should be used together. In an ideal year-end tax plan, you first harvest losses to offset any realized gains and reduce your tax liability. Then, if your net LTCG after loss offsets is below Rs 1,25,000, you harvest additional gains to bring it up to the exemption limit. For example, if you have Rs 2,00,000 in realized LTCG and Rs 1,00,000 in harvestable LTCL, you first harvest the LTCL to reduce your LTCG to Rs 1,00,000. This is within the Rs 1,25,000 exemption, so your LTCG tax is zero. You have effectively converted Rs 2,00,000 in gains into zero tax liability through a combination of loss harvesting and the exemption.

The Cost Basis Reset: Your Long-Term Advantage

The cost basis reset is the most underappreciated benefit of gain harvesting. When you sell and rebuy at the current market price, your new cost of acquisition is the rebuy price. This permanently reduces the taxable gain when you eventually sell the shares for real.

Consider this multi-year scenario:

Vikram buys 1,000 shares of a stock at Rs 100 per share in 2023. By March 2026, the price is Rs 250. Without gain harvesting, his unrealized LTCG is Rs 1,50,000 (1,000 x Rs 150).

Year 1 (March 2026): Vikram harvests Rs 1,25,000 in LTCG by selling 834 shares (834 x Rs 150 = Rs 1,25,100). He rebuys at Rs 250. His new cost basis for 834 shares is Rs 250, and the remaining 166 shares still have a cost of Rs 100.

Year 2 (March 2027): The stock price is now Rs 350. The 834 shares have an unrealized LTCG of Rs 100 per share. Vikram harvests another Rs 1,25,000 by selling and rebuying at Rs 350. His cost basis is now Rs 350 for those shares.

Year 3 (March 2028): Stock price is Rs 450. He harvests again, resetting to Rs 450.

After 3 years of gain harvesting: Vikram has booked Rs 3,75,000 in LTCG tax-free. His cost basis across most shares is Rs 450. If the stock reaches Rs 600 and he sells everything, his LTCG is only Rs 1,50,000 (from the Rs 450 basis), not Rs 5,00,000 (from the original Rs 100 basis).

Without gain harvesting, selling at Rs 600 would create Rs 5,00,000 in LTCG. After exemption, he would owe tax on Rs 3,75,000 at 12.5% = Rs 46,875 plus cess. With gain harvesting, the tax is only on Rs 25,000 (Rs 1,50,000 minus Rs 1,25,000 exemption) = Rs 3,125 plus cess. Savings: over Rs 43,000.

Common Pitfalls and How to Avoid Them

Gain harvesting is straightforward but there are pitfalls that can reduce or eliminate the benefit.

Pitfall 1: Harvesting short-term gains by mistake. If you sell shares held for less than 12 months, the gain is short-term and taxed at 20%, not covered by the LTCG exemption. Always verify the holding period before selling. FIFO can make this tricky when you have multiple purchase lots of the same stock, with some being long-term and others short-term. The oldest lot (which FIFO sells first) may be long-term, but check carefully.

Pitfall 2: Overshooting the exemption. If you harvest Rs 2,00,000 instead of Rs 1,25,000, the excess Rs 75,000 is taxed at 12.5% = Rs 9,375 plus cess. The tax on the excess is real money. Calculate the exact quantity of shares to sell to stay as close to Rs 1,25,000 as possible.

Pitfall 3: Ignoring already-realized LTCG. If you sold some long-term holdings earlier in the year and already booked Rs 80,000 in LTCG, you only need to harvest an additional Rs 45,000 to use the full exemption. Forgetting about earlier sales can lead to overshooting.

Pitfall 4: Transaction costs on small gains. If a stock has only Rs 2,000 in unrealized LTCG and the round-trip transaction cost is Rs 300, the net benefit of harvesting that stock is minimal. Focus on stocks with meaningful gains relative to transaction costs.

Pitfall 5: Selling near ex-dates. If a stock goes ex-dividend or ex-bonus around the time you plan to harvest, the price drop on the ex-date can reduce your gain or create unexpected outcomes. Plan around corporate actions.

Using TaxHarvestLab to Automate Gain Harvesting

Manually calculating FIFO-based gains across dozens of stocks and multiple purchase lots is time-consuming and error-prone. TaxHarvestLab automates the entire gain harvesting process.

When you upload your broker data to TaxHarvestLab, the tool immediately calculates the unrealized LTCG for every holding using the FIFO method. It separates short-term and long-term lots, applies the grandfathering clause for pre-2018 purchases, and shows you the exact gain per share for each lot.

The gain harvesting recommendation engine then does the heavy lifting. It calculates how much of your Rs 1,25,000 exemption has been used (from previous sales in the current financial year) and how much remains. It then identifies the optimal combination of stocks and quantities to sell to harvest gains up to the remaining exemption, while minimizing transaction costs.

The tool provides a one-click action plan showing: - Which stocks to sell and how many shares - The expected LTCG from each sale - The total LTCG after all sales (targeting Rs 1,25,000) - The estimated transaction costs (brokerage, STT, stamp duty) - The net tax saved after accounting for costs - The new cost basis after rebuy

For investors who also want to do tax loss harvesting, TaxHarvestLab integrates both strategies. It first recommends loss harvesting to offset any existing gains, then recommends gain harvesting to use up the remaining exemption. The combined strategy ensures you pay the minimum possible capital gains tax for the year.

The tool updates in real-time with current market prices, so your gain harvesting plan is always based on the latest data.

See how this applies to your portfolio

Upload your Zerodha or Groww reports and get personalized recommendations in under 2 minutes.

Analyze My Portfolio Free

Frequently Asked Questions

Can I sell and rebuy the same stock on the same day for gain harvesting?

Yes. India has no wash sale rule, so you can sell and repurchase the same stock immediately, even on the same day. The sale books the LTCG (which is tax-free up to Rs 1,25,000), and the rebuy resets your cost basis to the current price. Your portfolio position remains unchanged.

Does gain harvesting work with mutual funds?

Yes. Equity-oriented mutual fund units held for over 12 months qualify for the Rs 1,25,000 LTCG exemption under Section 112A. You can redeem units to book LTCG within the exemption and reinvest. Note that mutual fund transactions take longer to settle (T+3 for equity funds), so plan accordingly before March 31.

What if I have both gains and losses in my portfolio?

Use both strategies together. First, harvest losses to offset any already-realized gains. Then, harvest gains to use up the Rs 1,25,000 LTCG exemption. The combination minimizes your total tax liability. TaxHarvestLab recommends the optimal sequence automatically.

Is there a risk that the stock price moves between sell and rebuy?

There is a small risk of price movement, but in practice it is minimal. If you sell and rebuy within seconds or minutes, the price difference is usually limited to the bid-ask spread, which for liquid large-cap stocks is a few paise. For illiquid stocks, the risk is slightly higher, so use limit orders.

🤝

Support Our Mission

TaxHarvestLab is free and always will be. Help us keep it that way for 10,000+ Indian investors.

10K+
Active Users
₹0
Ads • Ever
Contribute Now

One-time or monthly, your choice

Ready to optimize your capital gains tax?

TaxHarvestLab analyzes your actual broker data and shows you exactly what to sell — and what to hold — before March 31.

Analyze My Portfolio Free

Free forever. Works with Zerodha and Groww. Takes under 2 minutes.