Advanced Tax Planning19 min read

Tax-Loss Harvesting and the Wash Sale Rule: What the Brokerage Button Doesn’t Tell You

Jim Crider
Jim Crider, CFP®

August 22, 2026

Every brokerage platform now offers tax-loss harvesting as a feature, often automated, often marketed as free money. It is a real strategy with real value. It is also one of the most misunderstood tools in personal tax planning, because the part everyone remembers (sell the loser, take the deduction) is the easy half, and the part that determines whether the harvest actually worked (what you buy next, in which account, and what that does to your basis) is the half that rarely gets explained.

This article covers the mechanics: how capital losses flow through the return, what the wash sale rule actually disallows and how it disallows it, the traps that turn a harvest into a permanent loss of the deduction, and the honest accounting of what a harvest is worth once you account for the lower basis you carry forward. The short version is that tax-loss harvesting is primarily a deferral strategy with a modest rate-arbitrage bonus, and the people who treat it as a tax elimination strategy tend to be the ones who eventually harvest themselves into a corner.

How a Capital Loss Flows Through the Return

A realized loss does not reduce your tax bill directly. It enters a netting process on Schedule D, and the order matters.

Short-term losses net first against short-term gains. Long-term losses net against long-term gains. If one category ends up net negative and the other net positive, they net against each other. Whatever survives is your net capital gain or loss for the year.

If the result is a net loss, up to $3,000 of it ($1,500 for married filing separately) can be deducted against ordinary income: wages, interest, IRA withdrawals, anything. The rest carries forward indefinitely, keeping its character, and runs through the same netting process next year. The $3,000 figure is statutory, not indexed for inflation, and has not changed since 1978.

That netting order produces the first useful insight. A harvested loss is worth the most when it offsets income that would otherwise be taxed at a high rate: short-term gains (taxed as ordinary income), or the $3,000 slice of ordinary income. It is worth the least when it offsets long-term gains that would have been taxed at 15%, or, worst of all, long-term gains that would have been taxed at 0%. In a year when a household sits in the 0% capital gains bracket, harvesting a loss can be genuinely wasted: the loss offsets gains that were never going to be taxed anyway, and the only thing the household keeps is a lower basis. We wrote about that bracket in our piece on the 0% capital gains bracket, and the harvest-versus-hold decision in a low-income year belongs in the same annual projection.

What the Wash Sale Rule Actually Says

Section 1091 of the tax code disallows a loss on the sale of stock or securities if, within 30 days before or 30 days after the sale, you acquire substantially identical stock or securities. That creates a 61-day window: the 30 days before the sale, the sale date itself, and the 30 days after.

Three details in that sentence do most of the work.

“Before or after.” The rule is symmetric. Buying shares on March 1, selling different shares of the same stock at a loss on March 15, and never buying again still triggers a wash sale, because the March 1 purchase fell within 30 days before the loss sale. Dividend reinvestment is the classic version of this trap: a reinvested dividend that lands 20 days before you sell at a loss is an acquisition of substantially identical stock, and it washes a proportional slice of the loss.

“Acquire.” Not “buy.” Any acquisition counts. An RSU vest is an acquisition of substantially identical stock, which is why selling company shares at a loss within 30 days of a vest date washes the loss. So is an ESPP purchase, a share received as compensation, or an option exercise. For anyone holding employer stock, the vest calendar and the harvest calendar have to be read together, a point we made in our overview of stock compensation.

“Substantially identical.” The code does not define it, and the IRS has declined to draw bright lines. The same stock, the same mutual fund, or the same ETF is obviously identical. An option or contract to buy the same stock is identical by statute. Two index funds from different sponsors tracking the same index are a gray area the IRS has never ruled on, which is why most practitioners treat them as a risk to avoid rather than a loophole to exploit. Two funds tracking different but correlated indexes, or an individual stock replaced by a sector fund, are generally accepted as not substantially identical. The replacement security question is the heart of practical harvesting, and it deserves more thought than most automated tools give it.

The 61-day wash sale window A timeline showing the 30 days before a loss sale, the sale date, and the 30 days after. Any acquisition of substantially identical securities inside the full 61-day span disallows the loss. Day 31 after the sale is the first safe repurchase date. Loss sale 30 days before 30 days after Day −30 Day +30 Any acquisition inside the 61-day span disallows the loss Day +31: clear
The wash sale window runs 30 days before and 30 days after the loss sale, 61 days in total. An acquisition of substantially identical securities anywhere in that span disallows the loss. The first clear repurchase date is day 31 after the sale.

What “Disallowed” Means: The Basis Adjustment

Here is the part that separates the rule from the folklore. A wash sale does not destroy the loss. It defers it.

When a loss is disallowed, the disallowed amount is added to the cost basis of the replacement shares, and the holding period of the sold shares tacks onto the replacement shares. The loss reappears when the replacement shares are eventually sold.

A worked example. You bought 500 shares at $100, a $50,000 position. The price falls to $80 and you sell all 500 for $40,000, realizing a $10,000 loss. Twelve days later the stock is at $82 and you buy 500 shares back for $41,000.

The $10,000 loss is disallowed in full. Your basis in the new 500 shares is not $41,000; it is $41,000 plus the $10,000 disallowed loss, or $51,000. Sell those shares later at $95 and your gain is $47,500 minus $51,000, a $3,500 loss, not a $6,500 gain. The original loss was not lost. It was parked in the basis and came out later.

The rule is also proportional. Same facts, but you only buy back 200 shares. Only 200 of the 500 sold shares are matched to a replacement, so only 200/500 of the loss, $4,000, is disallowed. The other $6,000 is a recognized loss this year. The 200 replacement shares carry a basis of $16,400 paid plus the $4,000 disallowed, or $20,400.

So in the ordinary case, a wash sale is a timing problem, not a permanent penalty. That changes completely in one account type.

The IRA Trap: Where the Loss Actually Dies

The basis adjustment works because the replacement shares sit in a taxable account with a basis that matters. Buy the replacement shares inside an IRA or Roth IRA and there is nowhere for the disallowed loss to go. The IRS addressed this directly in Revenue Ruling 2008-5: a loss sale in a taxable account followed by a purchase of substantially identical securities in an IRA within the window is a wash sale, the loss is disallowed, and the basis of the IRA shares is not increased. The loss is gone permanently.

This is the single most expensive harvesting mistake we see, and it is easy to make, because the rule applies across all of your accounts, not just the one where the sale happened. Your brokerage’s 1099-B will not catch it. Brokers are required to track wash sales only within the same account and for the identical security (same CUSIP). A sale in your taxable account and a purchase in your IRA, or a purchase in your spouse’s account, or a purchase in a 401(k) through an automatic contribution that buys the same fund, is your job to track. The IRS position, supported by case law going back decades, is that purchases by a spouse or by an entity you control count as your acquisitions for wash sale purposes.

The practical rule we lean toward, and one that connects to how we think about asset location across account types: before harvesting any position, list every account in the household that holds or automatically buys that security or its near-twin, including retirement plans on payroll autopilot. If any of them will acquire it inside the 61-day window, either pause that acquisition or pick a different security to harvest.

What a Harvest Is Actually Worth

A harvested loss has two components of value, and it helps to separate them. The deferral-versus-arbitrage way of valuing a harvest draws on Michael Kitces’s and Ben Henry-Moreland’s work at Kitces.com, which we’d recommend reading in full.

The deferral. Harvesting a loss and buying a replacement security means you hold the replacement at a lower basis than the original. When you eventually sell, the gain is larger by exactly the amount you harvested. The tax was not eliminated; it was pushed into the future. The value of that deferral is the time value of the tax money: you keep the tax savings invested and compounding until the later sale. Over long horizons at reasonable returns, that is meaningful, but it is not the headline savings the brokerage app shows you.

The rate arbitrage. This is where harvesting can create permanent value rather than timing value. A loss that offsets short-term gains, or the $3,000 of ordinary income, is deducted at ordinary rates. The larger gain it creates on the replacement shares, if held more than a year, is taxed at long-term rates. Deduct at 32% today, pay at 15% later, and the 17-point spread is real money you keep. The ordinary-income path has a ceiling, though: at $3,000 per year, even a 37% bracket taxpayer who later sells at 0% captures at most $3,000 × 37% = $1,110 of arbitrage per year from it. The larger arbitrage opportunities come from offsetting short-term gains, which have no cap, or from bracket changes on the gain side.

Worked numbers. A household in the 32% bracket harvests a $10,000 loss in a year with $7,000 of long-term gains. The loss offsets the $7,000 of gains (saving $1,050 at 15%) and $3,000 of ordinary income (saving $960 at 32%), for $2,010 of current-year tax savings. The replacement shares now carry $10,000 less basis. Sold years later as long-term gain at 15%, that extra $10,000 of gain costs $1,500. Net permanent benefit: $510, plus the time value of holding $2,010 for those intervening years. Valuable, and worth doing. Not $2,010 of free money. Households above the net investment income tax threshold add 3.8% to both the deduction and the later gain, which widens the deferral value slightly without changing the conclusion.

Two situations convert the deferral into genuine elimination. Replacement shares held until death receive a basis step-up, which erases the deferred gain entirely; for a position the household never intends to sell, the harvest is nearly pure gain. And replacement shares donated to charity or a donor-advised fund carry their gain out of the tax system, since the donor deducts fair market value and no one pays the gain. Households that give appreciated stock anyway are unusually well positioned to harvest aggressively, because the lower basis never comes home to roost. Where a concentrated position is involved, the sequencing of harvests, charitable gifts, and planned sales is a coordinated decision, which we covered in our article on concentrated stock positions.

When Harvesting Costs More Than It Saves

The strategy has real costs that the automated pitch omits.

The wasted harvest. A loss realized in a year when the household’s gains would have been taxed at 0% offsets income that owed nothing. The household gets the lower basis and none of the savings. This happens routinely to early retirees in the gap years before Social Security, which are exactly the years when the 0% bracket is available.

Tracking error. The replacement security is, by definition, not the original. A sector fund standing in for an individual stock, or a total-market fund standing in for an S&P 500 fund, will behave differently for 31 days. Most of the time the difference is noise. Some of the time a sharp recovery happens in the original and not the replacement, and the household’s tracking error exceeds the tax it saved.

The carryover trap. Carryover losses are mandatory, not optional. Once a loss is on the books, it must offset the next capital gains you realize, whether you want it to or not. Harvest a large loss in a working year with no gains to absorb it, and most of it carries forward, burning off at $3,000 per year. Then retire into a low-income gap year where you planned to harvest gains at 0%, and the carryover gets in the way: it offsets the gains first, consuming a loss that was worth something to protect gains that were never going to be taxed. A household that banks $100,000 of losses at 55 and then retires at 60 with $85,000 still carrying forward has to realize $85,000 of gains just to get back to zero before a single dollar of 0% room does any work. The loss is not wasted in the sense of disappearing; it is wasted in the sense that it was spent on the cheapest possible gains. Large carryovers deserve a plan, not just a line on Schedule D.

Short-term recapture on the switch back. The replacement shares inherit the holding period of the sold shares only if the loss was disallowed. In an ordinary, successful harvest, the replacement shares start a fresh holding period. The trap appears when the household wants to get back into the original security after day 31 and the replacement has risen in the meantime. Selling the replacement at a gain within a year produces a short-term gain, and short-term gains net separately from long-term ones. Suppose a $20,000 long-term loss was harvested in April, the replacement rises $10,000 by June, and the household switches back, then realizes $20,000 of long-term gains on ordinary withdrawals later in the year. The long-term loss and long-term gains cancel, leaving a $10,000 short-term gain taxed at ordinary rates. At 32%, that is $3,200 of tax against $3,000 of savings from the harvest, and the basis is still $10,000 lower than before. Unless there are short-term losses to absorb it, the cleaner path is to keep the replacement past the one-year mark or treat it as a permanent holding.

Income thresholds. A harvest reduces adjusted gross income, which sounds helpful until the household realizes that the modest reduction did nothing for them and the eventual larger gain lands in a year when it pushes MAGI across an IRMAA tier or an ACA subsidy cliff. The gain that was deferred out of a harmless year can resurface in a year where every dollar carries a threshold penalty, a dynamic we walked through in our IRMAA article.

Transaction and spread costs. Small in liquid funds, not small in thinly traded positions or in the municipal bond market, where the bid-ask spread on a harvest-and-replace can eat the tax benefit.

What Happens to Losses at Death (and Why Your State Matters)

Unused capital loss carryovers do not survive the taxpayer. Whatever is left on the last return is gone; it does not pass to the estate, the heirs, or, in most cases, the surviving spouse. On a joint return, carryovers are treated as belonging to the spouse whose property generated them, so the deceased spouse’s share dies and only the survivor’s share carries forward. Losses from jointly owned assets are generally split between the spouses, so half of a joint account’s carryover typically dies with the first spouse. This is the strongest reason to treat a large carryover as a liability with a clock on it.

The second half of the picture is what happens to unrealized losses still sitting in the portfolio at death, and here the answer depends on where you live.

In the nine community property states (Texas, Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Washington, and Wisconsin), and for couples who opt in through a community property trust in Alaska, Florida, Kentucky, South Dakota, or Tennessee, assets the couple holds as community property get a full basis adjustment on both halves when the first spouse dies. That is a famous benefit when the assets have appreciated: the entire position steps up, and decades of gain vanish. It cuts the other way when the assets are underwater. The entire position steps down to date-of-death value, and every dollar of unrealized loss is erased, including the surviving spouse’s half. A Texas couple sitting on a $60,000 unrealized loss in a community brokerage account loses all $60,000 of deductible loss at the first death. The losses either get harvested while both spouses are alive, or they disappear.

In the other 41 states, the ones that follow common-law (separate) property rules, the adjustment at death is narrower. Property titled in the deceased spouse’s name alone adjusts fully. Property held jointly between spouses adjusts only on the deceased spouse’s half; the survivor’s half keeps its original basis. So the same $60,000 unrealized loss in a joint account in Illinois or Georgia loses $30,000 of deductible loss at the first death, and the survivor retains a $30,000 loss that can still be harvested later. Assets titled solely in the surviving spouse’s name are untouched.

The planning consequences run in opposite directions. In a community property state, a couple with meaningful unrealized losses and a spouse in declining health has a reason to harvest before the first death, or to partition the loss assets into the healthier spouse’s separate property (in Texas, this takes a written partition agreement, not just a change of title), since a gift between spouses carries over basis and preserves the loss. In a common-law state, the same couple can retitle loss assets into the healthier spouse’s name with the same effect, and the urgency is lower because joint property only loses half. In either regime, gifting loss assets to anyone other than a spouse is usually a mistake: under the gift basis rules, the recipient cannot deduct the loss that existed on the date of the gift, so the loss is simply forfeited. What works in one state can be exactly wrong in another, which is one reason titling is a tax question and not just an estate one.

Bitcoin and Other Digital Assets

The wash sale rule, by its text, applies to “stock or securities.” The IRS currently treats Bitcoin and other cryptocurrency as property, not securities, and as of this writing the wash sale rule does not apply to it. A Bitcoin position can be sold at a loss and repurchased immediately with the loss recognized. This has been the subject of repeated legislative proposals, and as of this writing at least two remain pending in Congress, one of which was drafted to apply to tax years beginning after 2025. We continue to expect the exemption to close eventually; anyone relying on it should treat it as a current-law fact with a short shelf life rather than a permanent feature, and should be aware that a retroactive effective date could reach harvests already completed this year. One boundary worth stating plainly: the exemption covers directly held digital assets only. Shares of a spot Bitcoin ETF are generally treated as securities, and selling them at a loss and repurchasing within the window is a wash sale like any other. We cover the tax treatment more fully in our piece on Bitcoin in a financial plan.

How We Think About It

We lean toward treating loss harvesting as an opportunistic tool inside a year-round tax projection, not as a standing automated process. The question each time is not “is there a loss available” but “what will this loss offset, at what rate, and what does the lower basis cost later.” Harvesting in a 32% year to offset short-term gains is an easy yes. Harvesting in a 0% gap year is usually a no. Harvesting a position the household plans to hold until death or give to charity is a yes at nearly any time. And every harvest gets checked against the household’s full account list, including retirement plans on autopilot and a spouse’s accounts, before the sale ticket is entered, because the only way to permanently lose a loss is to buy it back somewhere the basis adjustment cannot follow.

Where the analysis gets interesting is in years with competing claims on the same bracket space: a Roth conversion that wants the low brackets, a gain harvest that wants the 0% room, and a loss harvest that wants high-rate income to offset. Those cannot all be right in the same year, and deciding among them is exactly the kind of modeling our year-end projection exists to do.

Common Questions

If I sell at a loss and buy the same fund 31 days later, am I clear?

Yes, as long as you also did not buy it in the 30 days before the sale, including through dividend reinvestment, and no other account in your household (IRA, spouse’s account, 401(k) contribution) acquired it inside the 61-day window. Day 31 after the sale is the first clear repurchase date.

Does the wash sale rule apply to gains?

No. It applies only to losses. You can sell an appreciated position and repurchase it the same minute; the gain is recognized and the basis resets. That is the mechanism behind tax-gain harvesting in the 0% bracket.

My broker’s 1099-B shows wash sales. Is that the complete list?

No. Brokers report wash sales only within the same account and only for the identical security. Purchases in other accounts, in a spouse’s account, in an IRA, or of a substantially identical but differently numbered security are not tracked by the broker and remain your responsibility to report on Form 8949.

Is a wash sale illegal?

No. It is not a penalty or a prohibited transaction. It is a rule that defers (or, in the IRA case, denies) a loss deduction. The replacement shares absorb the disallowed loss in their basis, and the loss is recognized when they are eventually sold.

How long can I carry forward unused losses?

Indefinitely, for an individual. Each year the carryforward runs through the netting process, offsets that year’s gains, and up to $3,000 of the remainder offsets ordinary income. Unused losses do not survive death; a carryforward that has not been used by the time the taxpayer dies is lost, and on a joint return the deceased spouse’s share is lost even though the survivor keeps filing. Whether the unrealized losses still in the portfolio survive depends on how the assets are titled and whether you live in a community property or common-law state, as covered above. Either way, very large loss carryforwards deserve an active plan to use them.

Can I harvest a loss in my IRA?

Not in any useful sense. Gains and losses inside an IRA are not recognized, so there is nothing to harvest. Selling a loser inside an IRA changes the investment, not the tax picture.

Jim Crider

About the Author

Jim Crider, CFP®

Jim Crider, CFP® is the founder of Intentional Living FP, a fee-only fiduciary wealth management firm in New Braunfels, Texas, serving clients across Texas and nationwide. Learn more at intentionallivingfp.com or read more about Jim.

This information is for educational purposes only and should not be considered specific financial, tax, or legal advice. Tax figures reflect 2026 rules and are subject to change. Wash sale and basis determinations are fact-specific, and the digital asset treatment described here is the subject of pending legislation. The examples here are illustrations, not projections of any actual household. Consult with a qualified professional before making financial decisions.

Want the harvest-or-hold question answered inside a real projection?

If you have losses on the books, a carryover with a clock on it, or an automated harvesting feature you have never audited, we’d be glad to run the numbers: what each loss would offset, at what rate, and what the lower basis costs later.

Fee-only fiduciary · No commissions · Always on your side of the table.