Finance May 8, 2026

How Does Tax-Loss Harvesting Work?

A 7-minute read

Tax-loss harvesting means selling investments at a loss to reduce taxable gains. Done carefully, it can lower your tax bill without changing your long-term portfolio strategy.

Tax-loss harvesting sounds technical, but the idea is straightforward. If one investment is down, you can realize that loss and use it to reduce tax on gains elsewhere. The goal is not to trade more, it is to keep more of your returns after tax.

The short answer

Tax-loss harvesting is the process of selling investments at a loss to offset taxable capital gains. Many tax systems also allow some unused losses to offset ordinary income or be carried forward to future years. The strategy works best when it is tied to a long-term portfolio plan, not emotional trading.

The full picture

The basic mechanics

Start with two facts. First, taxes are usually owed on realized gains, not on gains that only exist on paper. Second, realized losses can often reduce the tax owed on those realized gains.

That means timing matters. If you sold one fund this year at a gain, and another at a loss, your tax is usually based on the net amount.

The Wikipedia overview of tax-loss harvesting explains this netting logic. The IRS guidance on capital gains and losses lays out how losses can offset gains in the U.S. system.

A concrete example with numbers

Example 1: You sold Stock A for a $12,000 gain. You also hold Stock B at a $7,000 unrealized loss.

If you do nothing, your taxable gain is $12,000.

If you sell Stock B before year-end, your net taxable gain becomes $5,000. You are in the same market overall, but your tax bill is lower.

This is why harvesting often happens near year-end, when investors can see their full gain and loss picture for the year.

The replacement-investment step

Most investors do not want to leave cash sitting uninvested. So after harvesting a loss, they usually buy a similar, not identical, asset to keep market exposure.

If someone sells an S&P 500 ETF at a loss, they might temporarily buy a broader U.S. market ETF. Exposure remains similar, but the trade avoids prohibited immediate repurchase rules in jurisdictions that have them.

This step is where discipline matters. Without a replacement plan, harvesting can accidentally turn into market timing.

Country rules are different, and they matter

Tax-loss harvesting is not one global rulebook. The mechanics differ by country.

In the United States, the wash-sale rule can disallow the loss if you buy the same or substantially identical security within a 30-day window before or after the sale.

In the United Kingdom, the share matching and “bed and breakfast” rules can block same-day and near-term repurchases from generating immediate tax benefits.

In Canada, the superficial loss rule has a similar anti-avoidance purpose around quick repurchases.

In Australia, anti-avoidance principles also apply, and investors need to show transactions are genuine investment decisions, not tax-only circular trades.

The practical takeaway is simple: use local tax rules, not internet summaries from another country.

A second example: turning volatility into tax efficiency

Example 2: A globally diversified portfolio is down in emerging-market equities but up in developed-market equities.

An investor harvests losses in one emerging-market fund, then switches into a different emerging-markets fund with a different index methodology.

They keep broad exposure to the same region, but they also create a realized loss that can offset gains elsewhere.

Market volatility becomes an input for tax management, instead of just a source of stress.

Limits and common mistakes

Three mistakes show up repeatedly.

First, harvesting tiny losses while paying large trading costs or spreads. If friction costs exceed the tax benefit, the strategy backfires.

Second, changing the portfolio too much. A tax move that breaks your risk allocation can cost more than the tax saved.

Third, ignoring future taxes. Deferring tax can be useful, but it is not magic. If a replacement asset later rallies and you sell, tax can return later.

A fourth mistake is forgetting account type boundaries. A strategy that works in a taxable brokerage account usually does not work inside tax-sheltered retirement wrappers. Investors also miss record-keeping details, such as acquisition dates, lot-level cost basis, and partial sales. Those details affect the final gain-loss math at filing time.

The best use case is not heroic optimization. It is steady, boring after-tax improvement over many years.

What good execution looks like

Good tax-loss harvesting is rules-based. Many investors set a minimum loss threshold, define replacement ETFs in advance, and review opportunities on a fixed schedule rather than reacting emotionally to red screens. Advisers often pair this with automatic rebalancing so tax decisions and allocation decisions reinforce each other.

The strategy should feel mechanical, not exciting. If harvesting changes your long-term plan, it is probably being used too aggressively.

Why it matters

The difference between pre-tax and after-tax returns compounds for decades. Even modest annual tax savings can become meaningful in long-horizon portfolios.

For individual investors, this can mean better net outcomes without taking extra market risk. For advisers and wealth platforms, it can be one of the most consistent ways to add measurable value.

In real life, this strategy is most helpful in taxable accounts during volatile years, when some positions are down and others are up. It gives investors a structured way to act rationally when markets feel noisy.

Common misconceptions

“Tax-loss harvesting means I should sell all my losers.” No. The goal is not to clear out every red position. The goal is to harvest losses where tax benefit, portfolio fit, and replacement options all make sense.

“If I harvest losses, I permanently avoid taxes.” Usually not. Many benefits are deferral or netting benefits, not total elimination. Future sales can realize gains later.

“This only works in December.” Not true. Year-end is common, but harvesting can be done throughout the year, especially after market drawdowns.

Key terms

Realized gain/loss: Profit or loss that becomes taxable (or deductible) when an asset is sold.

Unrealized gain/loss: Profit or loss on paper while you still hold the asset.

Wash-sale rule: Rule that can disallow a loss when the same or substantially identical asset is repurchased too quickly.

Cost basis: The value used to calculate gain or loss when selling an investment.

Tax deferral: Delaying tax payments to later years, which can improve compounding if managed carefully.