Tax-loss harvesting without wash-sale regret

Last reviewed July 2026 · 5 min read

Tax-loss harvesting is the practice of selling an investment that has dropped below what you paid for it, capturing the loss for tax purposes, and immediately reinvesting in something similar so you stay in the market. Done right, it converts a paper loss into a real tax deduction without changing your portfolio. Done carelessly, the wash-sale rule quietly deletes the deduction — sometimes forever.

What a harvested loss is worth

Realized capital losses first offset realized capital gains, dollar-for-dollar and without limit. Losses beyond your gains can then offset up to $3,000 of ordinary income per year ($1,500 for married filing separately), and anything left carries forward indefinitely to future years. The best use of a loss is against income taxed at high rates: short-term gains (taxed as ordinary income) and that $3,000 slice of wages or interest. Losses also shrink net investment income, so a harvest can trim the 3.8% NIIT surtax in a high-MAGI year.

The wash-sale rule

Section 1091 disallows a loss if you buy “substantially identical” stock or securities within 30 days before or after the sale — a 61-day window centered on the sale date. The disallowed loss is not usually destroyed: it is added to the cost basis of the replacement shares, and the old holding period tacks on. You get the loss back when you eventually sell the replacement — a deferral, not a confiscation. The classic accidental triggers are automatic dividend reinvestment (a DRIP purchase inside the window washes part of the sale) and dollar-cost-averaging purchases you forgot were scheduled. Purchases in your spouse’s accounts count too.

The IRA trap: the loss that never comes back

One version of the wash sale is genuinely punitive. In Revenue Ruling 2008-5, the IRS held that buying substantially identical securities in your IRA within the window also washes the sale — and because an IRA has no usable cost basis to adjust, the loss is gone permanently, not deferred. If you harvest a fund in your taxable account, make sure no IRA, Roth IRA, or automated retirement contribution is buying the same thing that month. The practical defense is the standard harvesting pair: sell one fund and buy a similar-but-not-identical one — for example, a total-market index fund for an S&P 500 fund. Funds tracking different indexes are generally treated as not substantially identical, though the IRS has never drawn a bright line.

Deferral, not free money

Harvesting resets your basis lower, so the tax you save today is partly a tax you will owe later as a larger gain. The real value comes from three places: rate arbitrage (deduct against ordinary-rate income now, repay at long-term capital gains rates later), compounding the tax savings in the meantime, and the chance the deferred gain is never taxed at all — basis steps up at death, appreciated shares can be donated, and gains realized in a low-income year can land in the 0% bracket. That last point cuts the other way for many retirees: for 2026, long-term gains are taxed at 0% until taxable income exceeds $49,450 (single) or $98,900 (married filing jointly). If your retirement income sits under those lines, harvesting gains at 0% — stepping your basis up for free — usually beats harvesting losses whose deduction is worth little. Loss harvesting is chiefly a high-bracket, working-years and early-retirement tool.

A sane routine

Harvest when losses are meaningful, not weekly. Check the 61-day window in every account in the household, pause dividend reinvestment in the affected fund, pick a replacement you would be happy to hold forever (you might: selling it back has its own tax cost), and record the new basis. The loss shows up on Schedule D; carryforwards persist until used.

Try it in Deorbit Plan

The simulator taxes your taxable account using the Cost basis you enter in the Accounts panel — each withdrawal realizes gains in proportion to the account’s unrealized appreciation. Years of harvesting (or gain harvesting at 0%) show up as a higher basis: raise the Cost basis field and watch the tax bars shrink in the Tax & MAGI chart and the taxes slice thin out in the Spending chart. The Year table’s expandable rows break out exactly how much federal tax, NIIT, and realized-gain income each year generates.

Educational content only — not financial, tax, or investment advice.

References