Skip to content
Tax-efficient investing (global + India)

How Does Tax-Loss Harvesting Work?

Updated 27 November 2026 · 7 min read · Reviewed against our editorial policy

In brief

Tax-loss harvesting is the practice of selling an investment at a loss so that the realised loss can offset capital gains, reducing the tax bill in the current or later years. It does not create wealth by itself; it mainly defers tax, and anti-avoidance rules such as the US wash-sale rule can disallow losses if you rebuy the same or a very similar asset too soon. Rules differ by country, so check the current official source before acting.

  • Tax-loss harvesting turns an unrealised loss into a realised one so it can offset capital gains and lower tax.
  • In most cases it defers tax rather than eliminating it, because selling at a loss lowers your cost basis for the replacement holding.
  • Wash-sale and similar rules can disallow a loss if you rebuy the same or a substantially identical asset within a short window.
  • Trading costs, tax rules, and the risk of drifting from your target allocation can outweigh the benefit, especially on small losses.

What tax-loss harvesting actually is

Tax-loss harvesting means deliberately selling an investment that is worth less than you paid for it, so that the loss becomes realised for tax purposes. That realised loss can then be set against capital gains you have made elsewhere, reducing the tax you owe.

A loss on paper has no tax effect in most countries. Only when you sell does it count. Harvesting is simply the act of choosing to sell, usually near the end of a tax year, and then reinvesting the proceeds so you stay invested.

This guide is general education. Tax rules differ by country and change often, so confirm the current position with your tax authority or a qualified adviser.

Why it can help: the basic mechanics

Capital gains tax is charged on the profit when you sell. If you have gains in one holding and losses in another, many systems let you net them against each other. You pay tax only on the net figure.

A worked example with round numbers

Assume a tax rate of 20% on capital gains. This is an illustrative rate, not a statement of any country's current rule.

  • Investment A: bought for 10,000, now worth 15,000. Selling realises a gain of 5,000.
  • Investment B: bought for 10,000, now worth 7,000. Selling realises a loss of 3,000.

Without harvesting: you sell A only. Tax is 20% of 5,000 = 1,000.

With harvesting: you sell both. Net gain is 5,000 − 3,000 = 2,000. Tax is 20% of 2,000 = 400.

The immediate saving is 600. The same logic works in ₹ or $; for instance, ₹5,00,000 of gains offset by ₹3,00,000 of losses leaves ₹2,00,000 taxable.

The catch: it is usually a deferral

After selling B at 7,000, suppose you reinvest the 7,000 in a similar but not identical holding. Your new cost basis is 7,000, not the original 10,000.

If that replacement later recovers to 10,000 and you sell, you realise a 3,000 gain, which is taxable. The 3,000 loss you used earlier is, in effect, clawed back.

So what did you gain?

  • You paid less tax now and more later.
  • The money you did not hand over in the meantime stayed invested and could grow. This is the real benefit: a deferral, similar in spirit to tax-deferred growth.
  • If your future tax rate is lower, or you never sell, or you hold until death in a system that resets basis, the benefit can be larger. Those outcomes depend on specific rules and your circumstances, and are not guaranteed.

If your rate is the same later, the benefit is the growth on the deferred tax, which is often modest.

Step by step: how harvesting is usually done

  1. Check your realised gains for the year. Harvesting is most useful when you already have gains to offset, or when your rules allow losses to be carried forward.
  2. List holdings with unrealised losses. Look at each tax lot (purchase batch) separately, because gains and losses are calculated per lot.
  3. Estimate the net benefit. Multiply the loss by your relevant tax rate, then subtract trading costs and any spread.
  4. Sell the losing holding. Record the date, proceeds and cost basis.
  5. Reinvest sensibly. Either hold cash briefly, or buy a different but broadly similar exposure (for example, a different broad index fund tracking a different index) to keep your market exposure.
  6. Respect the anti-avoidance window. Avoid rebuying the same or a substantially identical asset inside the restricted period.
  7. Keep records. You will need them for your tax return.

Anti-avoidance rules: wash sales and similar

Tax authorities dislike losses that exist only on paper to cut a tax bill while the investor economically stays put. Many countries have rules to stop this.

  • United States: the wash-sale rule generally disallows a loss if you buy the same or a "substantially identical" security within a window of 30 days before or after the sale. The disallowed loss is typically added to the cost basis of the new purchase rather than vanishing. The window can also be triggered by purchases in other accounts, including some retirement accounts. Check the current IRS guidance.
  • United Kingdom: the "bed and breakfasting" rules match disposals with repurchases of the same shares within 30 days, so the loss is calculated against the repurchase cost. Holdings inside an ISA or pension are outside capital gains tax altogether, so there is nothing to harvest there. Check current HMRC guidance.
  • Other countries: some have general anti-avoidance principles that can apply to transactions with no purpose except tax saving, even without a specific day-count rule.

What counts as "substantially identical" is not always clear. Two funds tracking the same index from different providers sit in a grey area in some systems, while funds tracking different indices are generally viewed as safer. This is a judgement for a tax professional.

India: set-off and carry-forward at a high level

The following describes the general structure at the time of writing. Rates, holding periods and thresholds change, so check the current Income Tax Department source.

  • Short-term capital losses can generally be set off against both short-term and long-term capital gains.
  • Long-term capital losses can generally be set off only against long-term capital gains.
  • Carry-forward: unabsorbed capital losses can generally be carried forward for up to eight assessment years, provided the return is filed on time.
  • Capital losses cannot usually be set off against salary or other ordinary income in the way some other losses can.

Because long-term gains on listed equity have an annual exemption threshold at the time of writing, some Indian investors realise gains up to that threshold and rebuy, which resets the cost basis upward. This is sometimes called gain harvesting. It is a separate idea from loss harvesting but uses the same mechanics.

India has no wash-sale rule in the US sense, but general anti-avoidance provisions exist, and transactions that look purely artificial can attract scrutiny. Also be aware of transaction costs such as brokerage and securities transaction tax when buying and selling, which reduce the benefit.

Costs and trade-offs to weigh

Harvesting is not free. Consider:

  • Trading costs and spreads. Selling and rebuying incurs commissions, bid-ask spreads and, in some places, transaction taxes. On a small loss, costs can exceed the tax saved.
  • Tracking difference. The replacement may not perform the same as what you sold. You could miss a rebound, or the replacement could lag.
  • Complexity and record-keeping. Tax lots, dates and rules add admin, and mistakes can lead to disallowed losses.
  • Lower basis, larger future gain. As shown above, the tax is usually deferred, not removed.
  • Limited use in tax-sheltered accounts. Losses inside accounts such as ISAs or most retirement accounts generally have no tax value.
  • Small gains may already be covered. Many countries have annual exempt amounts or low rates for modest gains, leaving little to offset.

Harvesting tends to matter most for investors with sizeable taxable portfolios, large realised gains, and a high tax rate.

Common mistakes

  • Letting tax drive the strategy. Selling a sound holding only for a tax benefit can change your risk profile. Your asset allocation should come first.
  • Buying back too soon. Rebuying the same asset inside the restricted window can erase the benefit.
  • Forgetting other accounts. Purchases by a spouse or in another account may count under some rules.
  • Ignoring costs. Always compare the tax saved to the full round-trip cost.
  • Assuming the loss is a permanent gain. It is usually a timing benefit.
  • Missing filing requirements. In some places, such as India, losses may only be carried forward if the return is filed within the deadline.

When it may make sense, and when it may not

It may be worth considering when you have realised gains this year, a meaningful unrealised loss, low trading costs, and a sensible replacement that keeps your allocation intact.

It is probably not worth the effort when the loss is small, the account is tax-sheltered, you expect your tax rate to rise significantly, or the rules around identical assets are unclear to you.

A simple habit helps: review your portfolio once a year before the tax year ends, note realised gains and losses, and decide whether any harvest is worth the cost. For related context, see how capital gains tax and holding periods work, and how asset location can reduce tax drag.

Continue learning

Educational content only — not investment, tax or legal advice. See our disclaimer.