CPAFIRE

Tax-Loss Harvesting: The Wash Sale Rule Without Tears

By · Updated

TL;DR: Tax-loss harvesting means selling an investment below its cost basis to realize a capital loss, then buying something similar but not substantially identical. Losses offset gains, then up to $3,000 of ordinary income a year ($1,500 married filing separately), with the rest carried forward.

Educational only, not tax, legal, or investment advice. Examples are illustrations, not predictions. Rules and limits change; verify current figures and talk to a qualified professional about your situation.

Turning market pain into tax paper: Wall Street's version of composting. When an investment in a taxable account drops below what you paid, selling it locks in a capital loss that can reduce your tax bill now and in future years. Done right, your portfolio barely changes. Done wrong, the wash sale rule erases the loss and you get nothing but a trade confirmation.

This guide explains what a harvested loss is actually worth (often less than people think for early retirees), how the wash sale rule works, and how harvesting interacts with its sunnier cousin, gain harvesting.

CPA Warning Label: Buying the same fund in your IRA within 30 days can wipe out the loss permanently. Automatic dividend reinvestment counts as a purchase too.

What a harvested loss is worth

A capital loss first offsets capital gains of the same type, then the other type, then up to $3,000 of ordinary income per year ($1,500 if married filing separately). Any remaining loss carries forward indefinitely (IRS Topic 409).

The value of a loss is the tax rate it saves:

  • Against short-term gains or ordinary income: your ordinary rate, from 10% to 37%.
  • Against long-term gains: 15% or 20%, plus 3.8% net investment income tax if you are above the threshold.
  • Against long-term gains that would have been taxed at 0%: nothing. Worse, the loss gets used up anyway, because losses offset gains automatically.

That last point matters for early retirees. If your income is low enough that your gains fall in the 0% band, harvested losses may provide little or no current benefit. They are still valuable as carryforwards if you expect higher-income years later, such as a year with a business sale or big RMDs.

Harvesting also lowers your basis. If you sell a fund at $80,000 that cost $100,000 and buy a similar fund for $80,000, your new basis is $80,000. You defer tax rather than eliminate it, unless the new shares are held until death or donated.

Wash sale rule and 30-day window

Under the wash sale rule, a loss is disallowed if, within 30 days before or after the sale, you buy substantially identical stock or securities, acquire them in a fully taxable trade, or acquire a contract or option to buy them (IRS Publication 550). That is a 61-day window centered on the sale date.

A disallowed loss is not gone forever in a normal taxable account. It is added to the basis of the replacement shares, and the holding period of the old shares carries over. So the deduction is postponed until you sell the replacement. The rule also applies to purchases by your spouse.

Common accidental wash sales:

  • Dividend reinvestment buying a few shares of the fund you just sold at a loss.
  • Buying the same fund in a different taxable account.
  • Buying a lot 20 days before the sale, then selling an older, losing lot.

Substantially identical funds

The IRS has not issued a bright-line definition for mutual funds and ETFs. Shares of the same fund are clearly identical. Two funds that track different indexes, for example a total U.S. market fund and an S&P 500 fund, are commonly treated as not substantially identical, but there is no published IRS ruling that says so. Funds from different providers tracking the exact same index are a gray area.

A conservative approach is to swap into a fund that tracks a different index with similar exposure, hold it for at least 31 days, then switch back if you want. Moving between share classes of the same fund is riskier.

$3,000 ordinary offset and carryforward

Net capital losses beyond your gains can offset up to $3,000 of ordinary income ($1,500 married filing separately) each year. The excess carries forward to the next year and keeps its character as short-term or long-term (IRS Topic 409). There is no expiration date during your lifetime.

Carryforwards are tracked on the Capital Loss Carryover Worksheet in the Schedule D instructions. Tax software does this automatically if you keep using it; switching software or preparers is where carryforwards go missing. See the carryforward guide for details.

The $3,000 figure has not been adjusted since the 1970s. Inflation has turned it from a meaningful deduction into a polite gesture.

IRA purchase trap

Buying substantially identical securities in your IRA or Roth IRA within the 30-day window can also trigger a wash sale. The IRS took this position in Revenue Ruling 2008-5. The problem is worse than a normal wash sale: because the replacement shares sit in a retirement account, the disallowed loss cannot be added to their basis in any useful way. The loss is effectively lost.

The fix: coordinate across accounts. Turn off automatic reinvestment of the same fund in IRAs during the window, and avoid scheduled 401(k) or IRA purchases of the same fund right after a harvest.

Harvesting vs gain harvesting

Tax-loss harvesting lowers basis and defers tax. Tax-gain harvesting raises basis at a 0% rate. Early retirees may want to do both, in different years: harvest losses in a working year or a high-income year when they save 15% to 37%, and harvest gains in low-income years when the rate is zero.

Doing both in the same year is usually counterproductive. If you realize a $20,000 loss and a $20,000 gain, the loss cancels the gain that would have been taxed at 0%, and you are left with lower basis on one position and higher basis on another, for no tax saving.

Illustration: one loss, three households

Illustration. Assumptions: each household harvests a $20,000 long-term loss in 2026 and has no other capital gains.

  • Working couple, 24% bracket. $3,000 offsets ordinary income, saving $720 this year. $17,000 carries forward to offset future gains or more ordinary income.
  • Early retired couple, taxable income $60,000. $3,000 offsets ordinary income taxed at 12%, saving $360. The carryforward will offset future gains that would likely have been taxed at 0%, so its value depends on future income.
  • Single retiree with $25,000 of long-term gains, taxable income $80,000. The loss offsets $20,000 of gains that would have been taxed at 15%, saving $3,000.

Same loss, very different value. Lavish Larry, who trades so often he cannot remember what he owns, mostly produces wash sales. Frugal Fran harvests once a year with a checklist.

A harvesting checklist

  1. Identify lots trading below basis in taxable accounts only.
  2. Check purchases of the same fund in all accounts, including spouse and IRAs, for the prior 30 days.
  3. Turn off dividend reinvestment of that fund for the next 31 days.
  4. Sell using specific lot identification.
  5. Buy a replacement tracking a different index.
  6. Calendar day 31 if you want to switch back.
  7. Record the loss and verify the 1099-B, which may flag wash sales your broker detected (but not ones across brokers or accounts).

How harvesting fits a FIRE timeline

The best harvesting years are usually your last working years, when your marginal rate is high and you still have gains to offset or ordinary income at 22% or more. The value drops after you retire. Early retirees with large carryforwards sometimes find they never use them efficiently: they offset gains that would have been taxed at 0% anyway.

One way to use carryforwards well is to time them against unavoidable high-gain events, such as selling a rental, a concentrated stock position or a business. Another is simply to take the $3,000 ordinary deduction each year, which is worth something at any bracket above zero.

FAQ

How long is the wash sale window?

Thirty days before and thirty days after the sale, for a 61-day window including the sale date. Buying substantially identical securities in that period disallows the loss.

How much capital loss can I deduct each year?

Losses offset all capital gains first, then up to $3,000 of ordinary income per year, or $1,500 if married filing separately. The rest carries forward.

Does buying in my IRA cause a wash sale?

The IRS says it can, in Revenue Ruling 2008-5. Because the replacement is in an IRA, the disallowed loss generally cannot be recovered through basis.

Is tax-loss harvesting worth it in early retirement?

Sometimes less than expected. If your gains would be taxed at 0% anyway, losses that offset them save nothing. The $3,000 ordinary offset still has value.

Sources & fact-check notes

Figures checked October 25, 2026. Rules and limits change; verify with the official source before acting.