Skip to content

Tax-Loss Harvesting (TLH)

Tax-loss harvesting (TLH) is selling an investment in a taxable account for less than you paid to capture the loss for tax purposes, then reinvesting in a similar (but not substantially identical) holding so you stay invested.

Reviewed by Steven Fox, CFP®, EA Updated

Quick Summary

  • Realized losses first offset realized capital gains, then up to $3,000 of ordinary income per year, with the rest carried forward indefinitely.
  • The wash sale rule disallows the loss if you buy the same or a substantially identical security within 30 days before or after the sale.
  • You typically swap into a similar-but-different fund immediately, so your market exposure never lapses.
  • Because the replacement holding takes a lower cost basis, TLH usually defers tax rather than erasing it.
  • Only taxable brokerage accounts qualify; losses inside IRAs and 401(k)s cannot be harvested.

Definition

Markets hand every long-term investor stretches where holdings trade below what they paid. Tax-loss harvesting turns those paper losses into something useful: sell the losing position, and the realized loss becomes a deduction that offsets capital gains and a limited amount of ordinary income on your tax return. The sale is paired with an immediate purchase of a similar investment, so the portfolio barely changes--same market exposure, same expected growth, plus a tax asset that would otherwise have evaporated when prices recovered.

Advanced Explanation

The mechanics run through your Form 1040's capital gains netting. Realized losses offset realized gains without limit. If losses exceed gains, up to $3,000 of the excess deducts against ordinary income each year (a long-standing figure set by statute), and anything beyond that carries forward to future years indefinitely. A large harvested loss can therefore shelter gains this year, trim ordinary income, and leave a carryforward working for years.

The guardrail is the wash sale rule: sell at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale, and the loss is disallowed for now, its amount added to the basis of the replacement shares. The rule reaches across your accounts, including IRAs and a spouse's accounts, and dividend reinvestments can trip it by accident. "Substantially identical" is not precisely defined by the IRS, but the common practice is to swap into a fund tracking a different index rather than another fund tracking the same one. Note that the wash sale statute covers securities and does not currently apply to cryptocurrency, though proposals to change that surface regularly.

The caveat that marketing tends to omit: harvesting resets your cost basis lower, so the deferred gain is usually waiting when you eventually sell. TLH is mostly tax deferral, which still has value--money not paid in tax today compounds for you--and it becomes permanent savings when the future sale lands in a lower bracket, in the 0% long-term bracket, is donated, or receives a step-up in basis at death.

Used in a Sentence

“During the spring selloff, Ana sold her total-market fund at a $12,000 loss and immediately bought a large-cap fund tracking a different index, harvesting the loss without spending a day out of the market.”

How It Works

A hypothetical example. Jordan bought $50,000 of an international index fund in his taxable brokerage account; a rough year later it is worth $40,000. He sells, realizing a $10,000 loss, and the same day buys a different international fund tracking a different index, keeping his allocation intact. He also turns off automatic dividend reinvestment in the old fund for the surrounding 30 days so a stray purchase cannot trigger the wash sale rule.

That year Jordan has $4,000 of realized capital gains from rebalancing. The harvested loss wipes those out, deducts $3,000 against his ordinary income, and leaves $3,000 carrying forward to next year. The flip side: his new fund's basis is $40,000 instead of $50,000, so if he sells it years later at $60,000, the taxable gain is $20,000 rather than the $10,000 it would have been. He paid less tax now and will likely pay more later, with years of compounding on the deferred dollars in between.

Pros and Cons

Pros

  • Converts market downturns into a usable tax deduction without changing your investment strategy.
  • Offsets capital gains dollar for dollar, plus up to $3,000 of ordinary income per year, with unlimited carryforward.
  • Deferred tax stays invested and compounds in your favor in the meantime.
  • Can become permanent savings when the deferred gain is eventually taxed at a lower rate, donated, or stepped up at death.

Cons

  • The lower replacement basis means a larger taxable gain later; in many cases you are deferring tax, not eliminating it.
  • The wash sale rule is easy to violate accidentally through dividend reinvestment, automatic contributions, or purchases in a spouse's or retirement account.
  • Useless inside IRAs and 401(k)s, and least valuable for people in low tax brackets today.
  • Chasing losses can degrade a portfolio into a collection of almost-alike funds that are harder to manage.

People Also Asked

Answers to the most frequently asked questions.

What is the wash sale rule?
If you sell a security at a loss and buy the same or a substantially identical one within 30 days before or after the sale, the loss is disallowed and gets added to the basis of the new shares instead. The rule counts purchases in your other accounts, including IRAs, and in a spouse's accounts. The standard workaround is to buy a similar fund that tracks a different index, keeping market exposure without identical holdings.
How much ordinary income can harvested losses offset?
After losses cancel out your realized capital gains, up to $3,000 of remaining losses deducts against ordinary income per year ($1,500 if married filing separately), a figure fixed in the tax code for decades. Losses beyond that carry forward indefinitely, offsetting future gains and generating fresh $3,000 deductions each year until used up.
Does tax-loss harvesting actually save tax or just delay it?
Often it delays it, and that distinction deserves more attention than it gets. Harvesting lowers your basis, so the avoided gain typically resurfaces when you sell the replacement. The deferral still has value because the unpaid tax compounds for you meanwhile, and it becomes a permanent saving if the later sale falls in the 0% long-term bracket, the shares are donated to charity, or they receive a step-up in basis at your death.
Does the wash sale rule apply to cryptocurrency?
Not currently. The wash sale statute applies to stocks and securities, and the IRS treats cryptocurrency as property rather than a security, so crypto sold at a loss and immediately repurchased can still produce a deductible loss today. Congress has repeatedly proposed closing this gap, so check current law before relying on it.
Can I harvest losses in my 401(k) or IRA?
No. Gains and losses inside tax-advantaged accounts are invisible to the annual tax return, so selling a losing fund there produces no deduction. TLH lives entirely in taxable brokerage accounts. Deciding whether it is worth the complexity for your situation is a well-suited question for a fee-only or advice-only planner, particularly one who works on taxes.

Have a question a definition can't answer?

Advice-only advisors answer questions like this for a transparent flat fee — no products, no commissions, no asset management.

Find an Advisor