What Is Tax Loss Harvesting? The Complete Guide
March 30, 2026 · 8 min read

What Is Tax Loss Harvesting? The Complete Guide

There is a strange asymmetry buried in the tax code that most investors never notice. When your investments go up, the government claims a share of the gain. When they go down, the government lets you keep the loss — and use it. Not just absorb it, but actually deploy it, like a financial instrument, to reduce the taxes you would otherwise owe on your winners.

This is the core idea behind tax loss harvesting. It is not a loophole or a workaround. It is a deliberate feature of how capital gains taxation works in the United States — and understanding it is one of the highest-return things a taxable investor can do. The strategy does not require picking better stocks, timing the market, or taking on extra risk. It just requires paying closer attention to the tax consequences of what you already own.

What is tax loss harvesting?

Tax loss harvesting is the practice of selling an investment that has declined in value in order to realize a capital loss, and then using that loss to offset capital gains realized elsewhere in your portfolio. The result is a lower net taxable gain — and therefore a lower tax bill — without necessarily changing your overall investment exposure.

The key phrase is "without necessarily changing your investment exposure." After selling the losing position, most investors immediately reinvest the proceeds into a similar but not identical security. This keeps them invested in the same sector, the same asset class, or the same market — just through a different instrument. The economic position stays roughly intact. The tax benefit is real.

To put it plainly: tax loss harvesting turns a paper loss into a tax asset. Instead of watching a declining position and hoping it recovers, you crystallize the loss, put it to work immediately, and then reestablish the exposure after a short waiting period. The loss is not wasted — it is converted into after-tax value.

How does tax loss harvesting work?

Imagine you bought 100 shares of a technology ETF at $180 per share — an $18,000 position. Over the same period, you also own a healthcare ETF that has risen from $12,000 to $19,000. You want to sell the healthcare ETF to rebalance. Under normal circumstances, that $7,000 gain would be taxable. At the 15% long-term capital gains rate, you would owe $1,050. At the top federal rate of 23.8% (including the 3.8% net investment income tax), the bill reaches $1,666.

Now suppose the technology ETF has fallen to $140 per share. Your $18,000 position is now worth $14,000 — a $4,000 unrealized loss. If you sell it before selling the healthcare ETF, you realize that $4,000 loss. It can be applied directly against the $7,000 gain from healthcare, reducing your net taxable gain to $3,000. At the top federal rate, you have just cut your tax bill from $1,666 to $714 — saving $952 — simply by selling in the right order.

After selling the technology ETF, you immediately buy a similar fund — perhaps a broader market ETF or a tech-adjacent fund — to maintain your market exposure. You have not abandoned your investment thesis. You have simply traded one instrument for a nearly equivalent one, pocketed a tax benefit in the process, and stayed invested throughout.

Alpine night sky over mountain peaks — stillness and patience, like the long-game of tax-efficient investing

Short-term vs. long-term capital gains: why the distinction matters

Not all gains — and not all losses — are treated equally. The tax code distinguishes between short-term and long-term capital gains based on how long you held the asset before selling. Assets held for one year or less generate short-term gains, which are taxed as ordinary income — up to 37% at the federal level. Assets held for more than one year generate long-term gains, taxed at the more favorable rates of 0%, 15%, or 20%, depending on your income.

Capital losses follow the same classification. A short-term loss first offsets short-term gains; a long-term loss first offsets long-term gains. When losses exceed gains within a category, they spill over. If total capital losses exceed total capital gains, the excess can offset up to $3,000 of ordinary income per year — and any remaining balance carries forward indefinitely into future tax years.

This hierarchy matters for strategy. Harvesting a short-term loss to offset a short-term gain is particularly valuable, because short-term gains are taxed at the highest rates. An investor at the 37% federal income tax bracket who can convert a $10,000 short-term gain into a $0 net gain has saved $3,700 in federal taxes alone, in a single transaction.

The wash sale rule: the one constraint that changes everything

The IRS is aware that investors might try to sell a losing position just to capture the tax benefit and then immediately buy it back, as if nothing happened. To prevent this, Congress created the wash sale rule. Under this rule, if you sell a security at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale — in any account you own — the loss is disallowed for tax purposes.

The disallowed loss is not gone forever — it is added to the cost basis of the repurchased shares, deferring the tax benefit rather than eliminating it. But the timing consequence is immediate: if you trigger a wash sale, you lose the tax benefit in the current year, which is often the most valuable time to have it. This is why tax loss harvesting requires buying a similar but not identical replacement security during the 30-day window.

The wash sale rule applies across all your accounts simultaneously. Selling a losing stock in your taxable account and buying it back in your IRA within the 30-day window triggers a wash sale just as surely as repurchasing in the same account. This is one of the most commonly overlooked traps — and one of the strongest arguments for tracking tax lot and wash sale exposure across your entire household, not just account by account.

When should you use tax loss harvesting?

Tax loss harvesting is most valuable when three conditions align: you have realized or expected capital gains to offset, you own positions with unrealized losses, and your marginal tax rate on those gains is meaningfully positive. For the practical decision tree, use is tax loss harvesting worth it. An investor in the 0% long-term capital gains bracket — which in 2026 applies to married joint filers with taxable income up to $98,900 and single filers up to $49,450 — gains relatively little from harvesting long-term losses, since there is no gain tax to offset.

The most valuable harvesting opportunities arise during periods of market volatility. When broad markets decline, or when individual holdings move against you despite an overall portfolio gain, you have the chance to realize losses without meaningfully changing your economic position. A 10% correction in a single sector position might generate a harvestable loss even in a year when your overall portfolio is up — and that loss is just as real and useful as any other.

The conventional wisdom is to review your portfolio for harvesting opportunities once a year, typically in November or December. That can work, but markets produce temporary losses throughout the year. A position below basis in March may have recovered by December. More frequent monitoring can detect those lots; whether acting on them adds value depends on taxes, trading costs, the replacement investment, and future sale plans.

The compounding effect: why this matters more than most investors realize

Tax loss harvesting is often described as a tax deferral strategy rather than a tax elimination strategy, and that description is technically accurate. When you harvest a loss and reset your cost basis lower, you will eventually pay tax on a larger gain when you finally sell the replacement position. The benefit is that the tax is deferred — and deferred taxes are worth real money.

Suppose a harvest defers $10,000 of tax and that entire amount remains invested for 20 years at a hypothetical 7% annual return. Before fees and future tax, it would grow to about $38,700. That illustration is not a forecast: the eventual benefit depends on the future tax bill created by the lower replacement basis, investment returns, fees, state rules, and how long the deferral lasts. Harvesting is most useful when the value of deferral and any rate difference exceeds those costs.

Under current federal law, many taxable assets included in an estate receive a basis adjustment at death. That can prevent a deferred gain from being taxed to heirs, but estate structure, ownership, state law, legislative changes, and exceptions matter. Treat this as an estate-planning possibility, not a guaranteed reason to harvest.

If you are trying to put numbers around that benefit, start with how much tax loss harvesting can save, then move to a tax-loss harvesting annual savings estimate once you know the actual lots and gains in the portfolio.

Tax lot selection: the hidden variable inside every harvest

When you own multiple purchases of the same security at different prices and dates, you hold multiple "tax lots" — each with its own cost basis, holding period, and tax character. If shares are not adequately identified at sale, FIFO generally determines which stock lots were sold. FIFO may be useful or costly depending on the lots; compare basis and holding period before placing the order.

Using the specific identification method — allowed by the IRS — you can designate exactly which shares to sell. You might choose the highest-cost lots to minimize your realized gain. You might choose lots that are 11 months old and wait 31 days before selling, converting what would have been a short-term gain into a long-term gain taxed at a lower rate. Or you might choose lots already at a loss to harvest them while leaving your winning lots intact to continue compounding.

Tax lot selection is where the real precision of tax management lives. It is also where the complexity becomes genuinely difficult to manage manually. A portfolio of 30 positions, each with three or four lots purchased at different times, creates over a hundred individual decisions — and the optimal choice in any given moment depends on your total income, your other gains and losses that year, the holding period of each lot, and your expected future tax rates. Start with what is tax lot optimization for the hub explanation, then use optimal tax lot selection for the sale-by-sale calculation. This is exactly the kind of problem that scales poorly for humans and scales perfectly for software.

Why most investors still don't do this

Tax loss harvesting has been understood by wealth managers and tax professionals for decades. It is not a new idea. And yet the majority of individual investors — including many sophisticated ones — do not practice it systematically. The reason is not ignorance. It is friction. Done properly, tax loss harvesting requires monitoring your portfolio continuously, understanding the wash sale implications of every transaction, tracking cost basis across multiple accounts, and executing trades quickly when opportunities emerge. Most people simply do not have the time or the systems to do this consistently.

The investors who have historically captured most of the available value from tax loss harvesting are those with access to institutional-grade tax management — the clients of large family offices and quantitative wealth managers who run automated tax overlay strategies on portfolios worth tens of millions of dollars. For everyone else, the strategy was either done manually and imperfectly, or not done at all.

Software can now organize tax lots, monitor thresholds, and flag cross-account conflicts for individual investors. Coverage, permissions, fees, and execution models vary, so automation should be evaluated as a workflow aid rather than a promise of institutional results or a fixed amount of tax alpha.

Build the Tax-Loss Harvesting Foundation

If the mechanics are still unfamiliar, use tax basis explained before comparing tax-loss harvesting with a 401(k). The strategy becomes easier to evaluate through concrete cases: how tax-loss harvesting changes the portfolio, the investor who held but still overpaid tax, and the portfolio-rebalancing pitfalls that create unnecessary gains.

More advanced approaches introduce additional risk and complexity. Read machine-learning-assisted harvesting before considering leverage with tax-loss harvesting.

Apply the Strategy to Your Situation

Life stage and account type determine whether the strategy is useful. Younger investors can start with a young investor's tax-loss harvesting guide, building a tax-aware portfolio, and using harvesting to compound wealth earlier. Investors comparing account types should read ETFs versus individual stocks and why retirement accounts do not benefit from tax-loss harvesting.

For household and career-specific planning, continue with tax-loss harvesting for busy professionals, tax planning for self-employed investors, tax moves for investors in their thirties, why married couples should coordinate harvesting, and using trusts and tax planning for children.

Frequently asked questions

What is tax-loss harvesting in simple terms?
Tax-loss harvesting is the practice of selling investments that have lost value to realize the loss for tax purposes, then reinvesting in similar — but not identical — assets. The harvested loss offsets capital gains and up to $3,000 of ordinary income annually. A replacement can preserve similar exposure, but it may still create tracking error and different risks.
How does tax-loss harvesting work?
You sell a position trading below your purchase price, generating a realized capital loss. That loss directly offsets capital gains from other sales — long-term losses match long-term gains first, short-term against short-term. Excess losses up to $3,000 reduce ordinary income each year; remaining losses carry forward to future years.
Is tax-loss harvesting legal?
Yes. It is an IRS-sanctioned tax strategy used by virtually every wealth manager and robo-advisor. The only restriction is the wash-sale rule, which prevents you from claiming a loss if you re-buy the same or substantially identical security within 30 days before or after the sale.
When should you tax-loss harvest?
The ideal time is whenever a meaningful loss appears in a taxable account — not just at year-end. Many investors miss harvesting opportunities by waiting for December because losses can recover before then. Monthly or quarterly review captures more opportunities than annual harvesting.
What's the difference between tax-loss harvesting and tax-gain harvesting?
Tax-loss harvesting realizes losses; tax-gain harvesting intentionally realizes long-term gains during a year with favorable bracket room. A gain may fall in the 0% federal band after a full taxable-income projection, but state tax and other income-based rules can still apply.
Do you need a financial advisor for tax-loss harvesting?
No, though many investors use one. The mechanics are straightforward, and modern tools can identify opportunities and flag wash-sale risks automatically. Where advisors add value is coordinating tax-loss harvesting with broader financial planning — estate strategy, retirement contributions, AMT exposure, and similar.
Can tax-loss harvesting reduce your tax bill to zero?
A realized capital loss can offset capital gains and, if net losses remain, up to $3,000 of ordinary income under current federal rules. It may reduce current capital-gains tax to zero when usable losses equal or exceed gains, but replacement basis, future tax, wash sales, and state rules still matter.
Stop overpaying — get started free →