How harvesting losses in taxable accounts offsets gains and a limited slice of ordinary income, and the wash sale rule whose quiet reach across accounts, spouses, and reinvestments decides whether the loss survives.
By Samuel Ortiz, CPA, CVA · Last updated August 23, 2026
Tax loss harvesting means selling investments that sit below their cost in taxable accounts so the realized losses offset capital gains, then a limited amount of ordinary income each year, with anything left carrying forward indefinitely. All of it is undone if the wash sale rule is tripped, which happens when a substantially identical security is bought within the statutory window before or after the sale, in any account the rule reaches, so the strategy is decided less by the sale than by what gets bought around it.
Markets hand every taxable portfolio some positions below their cost, and tax loss harvesting is the discipline of turning that paper disappointment into a realized loss the return can actually use. The sequence is fixed by statute: realized losses first absorb realized capital gains without limit, then a capped amount of ordinary income for the year, a figure set by the code and published in IRS guidance, and whatever remains carries forward indefinitely, waiting for future gains or future years of the same ordinary offset. None of this applies inside retirement accounts, where gains and losses pass untaxed and unnoticed, so the strategy lives in taxable accounts only, and the investor who wants to stay invested simply replaces the sold position with something comparable that keeps the market exposure without keeping the identical security.
That last clause is the entire game, because the wash sale rule of Section 1091 sits across the strategy like a tripwire. Sell at a loss and acquire a substantially identical security within the statutory window, which runs both before and after the sale, and the loss is disallowed, folded into the basis of the replacement shares to wait for another day. In an ordinary taxable account that is a deferral, annoying but survivable. The rule does not care why the repurchase happened, does not distinguish a deliberate buy from an automated one, and does not confine itself to the account where the sale took place, which is where the strategy’s real failures happen.
The traps are not in the selling, they are in the buying that happens around it. A repurchase of the sold security inside an IRA within the window does not defer the loss, it destroys it, because the basis adjustment that preserves a disallowed loss in a taxable account has nowhere to land inside an IRA, and the IRS has said so explicitly, which turns a routine rebalance in the wrong account into a permanent forfeit. A purchase in a spouse’s account reaches the same result, since the rule looks across the household rather than at one login at a time. And the quietest trap needs no decision at all: automatic dividend reinvestment, left running on the position being harvested, buys small lots of the identical security inside the window on its own schedule, and a loss can be partially voided by a reinvestment nobody remembered was on.
Running the strategy cleanly is therefore an accounting of the whole household’s activity, every taxable account, every retirement account, every spouse, every automated purchase program, checked against the window on both sides of the sale before the sale is made. The replacement position has to be comparable without being substantially identical, the reinvestment switches have to be off, and the calendar has to be quiet in every account the rule can see.
The loss is easy to realize and easy to accidentally void, and nothing about the difference shows up until the return is examined against the trading records. The value of the strategy is in the discipline, the window respected in every account at once, and a harvest run that way does exactly what it promises, moving losses the market already delivered onto the return where they finally count.
Ideas do not change your tax number, implementation does, and implementation is books kept current, records made at the time rather than reconstructed later, elections filed on time, and every position reported the way the return will one day have to defend it. That is the year round work a strategy actually requires, and on the strategies we implement we stand behind that work with audit defense. Reading about a strategy is step zero. The record is what decides whether it holds.
Selling investments in taxable accounts that are worth less than they cost, so the realized capital losses offset realized capital gains, and beyond that a limited amount of ordinary income each year, with any remainder carried forward to future years without expiration. The portfolio's market exposure can be maintained by buying something comparable but not substantially identical, which is where the entire craft of the strategy lives.
Section 1091 disallows a loss when the seller acquires a substantially identical security within the statutory window that runs both before and after the sale. The disallowed loss is generally added to the basis of the replacement shares, so in an ordinary taxable account the loss is deferred rather than destroyed, but the timing benefit the harvest was built for is gone for that year.
Realized losses first absorb realized gains without limit, then offset a capped amount of ordinary income for the year, a figure set by statute and published in IRS guidance, and everything beyond that carries forward indefinitely to repeat the same sequence in later years. Publication 550 and Topic 409 carry the current mechanics and the figure.
The rule reaches beyond the account where the sale happened. A repurchase inside an IRA voids the loss permanently, because the basis adjustment that softens an ordinary wash sale cannot happen in an IRA, a purchase in a spouse's account can trigger the rule just as surely, and automatic dividend reinvestment is the quietest trap of all, buying small lots of the sold security inside the window without anyone deciding anything.
No. Gains and losses inside IRAs and 401(k)s are not taxed as they occur, so a loss realized there has no return to land on, and the strategy belongs to taxable accounts only. Retirement accounts matter to the strategy anyway, but as the place where a careless repurchase can permanently destroy a taxable loss rather than as a place to harvest one.
The strategies on this page are general, and your return is not. A Tax Position Review looks at your real numbers and gives you a written Snapshot of where you stand, the findings worth acting on, and what each one depends on.
See whether your harvesting avoids the traps →