Skip to content
WealthTicker

Tax-loss harvesting calculator: why set-off order matters

Booking ₹2 lakh of equity losses cut a ₹98,150 tax bill to ₹60,450 in the calculator's default case. How it applies losses, and the ₹11,700 a wrong order costs.

·

A brass balance scale on a wooden desk with a stack of coins in each pan

The question it answers

You have booked some equity gains this financial year and you are sitting on a few holdings below cost. Selling the losers before 31 March lets the losses absorb part of the gains. The tax-loss harvesting calculator shows how much tax that saves, how the losses get applied, and what is left to carry forward.

The reason to calculate rather than guess is an asymmetry in the rules. A short-term loss can be set against short-term or long-term gains. A long-term loss can only touch long-term gains. Which bucket the flexible loss goes into changes the bill.

The four inputs

All four are rupee amounts for equity (listed shares and equity mutual funds), for the current financial year:

Field Default
Short-term equity gains booked (₹) ₹3,00,000
Long-term equity gains booked (₹) ₹4,00,000
Short-term equity losses available (₹) ₹1,50,000
Long-term equity losses available (₹) ₹50,000

"Available" means losses you have booked or could book by selling. The calculator does not know your holdings; it takes the totals you enter. Short-term means held 12 months or less, as in the capital gains tax calculator.

The outputs

Three boxes: Tax after set-off, Saved by harvesting, and Carried forward ("up to 8 years"). Beneath them, "How the losses were applied" walks through the set-off:

  1. Long-term loss against long-term gain, its only option
  2. Short-term loss against short-term gain, taxed at 20%
  3. Short-term loss spilling onto long-term gain, taxed at 12.5%
  4. Net short-term gain, taxed at 20%
  5. Net long-term gain, less the ₹1,25,000 exemption
  6. Health and education cess at 4%

The order of those rows is the order the calculator applies them, and it is the order that saves the most.

Worked example: the defaults

Without any losses, ₹3 lakh of short-term gains at 20% is ₹60,000, and ₹4 lakh of long-term gains less the ₹1.25 lakh exemption leaves ₹2.75 lakh at 12.5%, or ₹34,375. With cess, that is ₹98,150.

With the default losses entered, the calculator returns:

Step Amount
Long-term loss against long-term gain ₹50,000
Short-term loss against short-term gain ₹1,50,000
Short-term loss spilling onto long-term gain ₹0
Net short-term gain, taxed at 20% ₹1,50,000 (tax ₹30,000)
Net long-term gain, less the exemption ₹2,25,000 (tax ₹28,125)
Cess at 4% ₹2,325
Tax after set-off ₹60,450

Saved by harvesting: ₹37,700. Nothing is carried forward, because every rupee of loss found a gain.

Why order matters

A dashed box labelled "Order matters" appears whenever the wrong order would cost more. In the default case it reads: applying the short-term loss to long-term gains first would have cost ₹72,150 instead of ₹60,450, which is ₹11,700 more. The ₹1.5 lakh short-term loss saves 20% when it offsets short-term gains and only 12.5% when it offsets long-term gains, and the long-term side also has the exemption cushioning it.

A second case, with no short-term gains at all: ₹3 lakh of long-term gains and a ₹1 lakh short-term loss. Here the loss has only one place to go. It spills onto the long-term gain, leaving ₹2 lakh, of which ₹75,000 is taxable after the exemption. Tax falls from ₹22,750 to ₹9,750, a saving of ₹13,000.

When losses are bigger than gains

Enter ₹1 lakh of short-term gains, ₹2 lakh of long-term gains, ₹2.5 lakh of short-term losses and ₹3 lakh of long-term losses. Tax drops from ₹30,550 to zero, and ₹2,50,000 is carried forward: ₹1,50,000 short-term and ₹1,00,000 long-term.

Look at what happened to the long-term side. ₹2 lakh of the long-term loss was used up against ₹2 lakh of long-term gains, of which ₹1.25 lakh would have been tax-free anyway. The calculator sets losses off before applying the exemption, so a loss used against gains that sit inside the exemption saves nothing. If you have that choice, booking a smaller long-term loss this year and keeping the rest of the position may be the better trade. Gain harvesting is the mirror move, using the exemption before it lapses.

What the calculator leaves out

  • Trading costs. Selling and buying back costs roughly 0.2% to 0.3% of the position in STT, brokerage, GST, stamp duty and the price gap, according to the note on the page. Harvest only where the tax saved is larger.
  • Dividend and bonus stripping. Sections 94(7) and 94(8) can disallow a loss around a record date or a bonus issue. Neither is modelled.
  • Slab-rate gains. Debt funds bought after 1 April 2023, gold funds and property sit outside the four equity fields.
  • Which lots you sell. Demat holdings and fund units are sold first in, first out, so a partial sale may take your oldest, long-term lots. How SIP redemptions are taxed shows what that does to the gain.
  • Losses never offset salary. Capital losses can only be set against capital gains, now or in the next eight years.

India has no wash-sale rule, so buying the same fund back the next day is allowed; the new lot simply starts a fresh holding period. The rules and the March-end timing are covered in our earlier post on tax-loss harvesting in India and in the guide to tax-loss harvesting. Before you sell anything, put your booked gains into the tax-loss harvesting calculator and check the "Saved by harvesting" figure against the round-trip cost. This is a planning estimate for FY 2026-27, not tax advice.

Frequently asked questions

Can a short-term capital loss be set off against long-term gains?

Yes. A short-term capital loss can be set against short-term or long-term gains, but a long-term loss can only be set against long-term gains. Because short-term equity gains are taxed at 20% and long-term ones at 12.5%, the short-term loss saves more when it goes against short-term gains first.

How much tax does tax-loss harvesting save?

It depends on the gains you have already booked. With ₹3 lakh of short-term and ₹4 lakh of long-term equity gains, booking ₹1.5 lakh of short-term and ₹50,000 of long-term losses cuts the tax from ₹98,150 to ₹60,450 including cess, a saving of ₹37,700, before trading costs.

What happens to capital losses I cannot use this year?

They carry forward for eight assessment years and keep their short-term or long-term character, but only if the return is filed by the due date. A belated return keeps the current year's set-off and loses the carry-forward.

This is commentary on published data, not investment advice. WealthTicker is not a SEBI-registered adviser or distributor. Figures are WealthTicker’s own calculations from public data — AMFI’s fund NAVs and disclosures, NSE’s index and FII/DII files, and the fund houses’ monthly portfolios (how we calculate). They are as of the dates stated and can be revised by their source.