Tax-Loss Harvesting: Wash Sales, the $3,000 Limit, Lot Selection, and What Deferral Is Worth
How tax-loss harvesting works in 2026: wash-sale traps (IRAs, spouses, dividends), the $3,000 limit, lot selection, crypto rules, and deferral math.

Tax-loss harvesting means selling an investment that is worth less than you paid, claiming the loss on your tax return, and putting the money into something similar so you stay invested. The loss is real for tax purposes, but the replacement starts with a lower cost basis, so the tax you save now usually comes back as a larger gain later. What you gain is time, and occasionally a lower rate. This guide covers the mechanics: the wash-sale rule and where people trip on it, how losses are netted and carried forward, how lot selection changes the result, where crypto stands in 2026, and an illustration of what deferral is worth.
Harvesting is one tool among several. Where to hold funds in the first place is covered in our tax-efficient investing guide, capital gains rates and ways to avoid gains altogether in the capital gains tax guide, and timing income across years in our investment tax planning guide.
How losses are netted and carried forward
Short-term losses (on assets held a year or less) first offset short-term gains, and long-term losses first offset long-term gains. Whatever is left in one group then offsets the other. If you still have a net loss, IRS Topic 409 lets you deduct up to $3,000 of it against wages and other income ($1,500 if married filing separately) and carry the remainder forward. Carryforwards keep their short-term or long-term character and do not expire during your life, but a carryforward can be used only on your own returns, through the final one, and cannot pass to heirs.
The $3,000 limit is fixed in the law and not indexed for inflation. At a 24% rate it saves $720 a year, and at 32%, $960. A large harvested loss with no gains to absorb it can take many years to use: a $50,000 net loss used only against ordinary income lasts 17 years. Harvesting pays most when you have gains to offset now or expect to realize them soon, such as from a business sale, a concentrated stock position, or rebalancing.
The wash-sale rule
Under Section 1091, a loss is disallowed if you buy substantially identical stock or securities, or a contract or option to buy them, within 30 days before or 30 days after the sale. The window is 61 days including the sale date, and it runs in both directions, so buying more shares a week before you sell the losing lot counts too.
IRS Publication 550 spells out who else can trigger it and what happens next:
- A purchase by your spouse, or by a corporation you control, creates a wash sale.
- A purchase in your IRA or Roth IRA creates one too. Rev. Rul. 2008-5 holds that the loss is disallowed and that the IRA's basis is not increased, so the loss is lost permanently. The ruling does not address 401(k) plans, so treat purchases there with the same caution.
- In a normal taxable account, the disallowed loss is added to the cost of the replacement shares, and the replacement's holding period includes the time you held the shares you sold. The loss is postponed, not forfeited.
- Buying back only part of the position disallows only that part. If you sell 1,000 shares at a $10 loss each and your dividend reinvestment buys 12 shares within the window, $120 of the loss is disallowed and $9,880 is allowed.
Two practical traps come from this. Automatic dividend reinvestment and automatic 401(k) or IRA contributions into the same fund can create small wash sales you never intended; turn reinvestment off in the harvested fund for the window. And your broker will not catch everything. Form 1099-B reports wash sales the broker can see within that account; purchases at another firm, in your spouse's account, or in your IRA are yours to track and report on Form 8949.
What "substantially identical" means
The IRS has never defined the term for funds. Selling one company's stock and buying a different company's stock is clearly safe, and selling a stock and buying it back is clearly a wash sale. Between those, practitioners disagree. Swapping one S&P 500 fund for another S&P 500 fund from a different company is widely viewed as risky because the two hold the same stocks in the same weights. Moving from an S&P 500 fund to a total US market or Russell 1000 fund, or between funds tracking different indexes, is the common approach, and robo-advisers and direct indexing services rely on pairs like these. There is no ruling approving any particular pair, so pick replacements you would be comfortable defending and that you would be content to keep.
Lot selection
Most people build a position over time, so each purchase is a separate lot with its own cost and date. The method your broker uses to decide which lots you sold changes the tax result. Many brokers default to first in, first out for stocks and ETFs and to average cost for mutual funds. Specific identification lets you name the lots, but you must choose them by the time the trade settles; setting it afterward is too late.
Illustration: you own 300 shares of a fund now priced at $90.
| Lot | Bought | Cost per share | Gain or loss on 100 shares |
|---|---|---|---|
| 1 | Three years ago | $60 | $3,000 long-term gain |
| 2 | Eight months ago | $95 | $500 short-term loss |
| 3 | Two months ago | $110 | $2,000 short-term loss |
Selling 100 shares under first in, first out sells lot 1 and realizes a $3,000 gain. Selling lot 3 by specific identification realizes a $2,000 loss from the same trade. Short-term losses are the more useful kind when you have short-term gains, which are taxed at ordinary rates, so a highest-cost-first method or a broker's tax-lot optimizer usually works better than the default. The lot you did not sell keeps its low basis, which is the point of the next section.
Deferral, not elimination
When you harvest, the replacement's basis equals its purchase price, which is lower than what you originally paid. The tax you save today is roughly the tax you will owe later on the extra gain, unless something changes the rate or the gain is never taxed.
Illustration: an investor bought a fund for $100,000 that is now worth $80,000, and they have $20,000 of long-term gains from another sale this year. They pay 15% plus the 3.8% net investment income tax, 18.8% in total. Harvesting the $20,000 loss saves $3,760 now. They reinvest the saving in the same kind of fund. Everything grows 7% a year and is sold at the end, and gains are taxed at the rates shown. Without harvesting, they pay the $3,760 from other money now and keep the original $100,000 basis.
| Scenario | Tax saved now | Advantage at the end |
|---|---|---|
| Same 18.8% rate now and later, sold after 10 years | $3,760 | $2,953 |
| Same 18.8% rate, sold after 20 years | $3,760 | $8,761 |
| Held until death, so heirs get a stepped-up basis | $3,760 | $7,396 |
| Loss offsets a short-term gain taxed at 38.8% now; later gain taxed at 18.8% | $7,760 | $10,094 |
| Loss offsets gains taxed at 15% now; later gain taxed at 23.8% | $3,000 | $451 |
The first row is the pure deferral benefit: the $3,760 stays invested for ten years, but the extra $20,000 of gain is still taxed at the end. The benefit grows with time and becomes permanent if the shares are held until death or given to charity. It is largest when a loss offsets short-term gains taxed at ordinary rates and the later gain is long-term. It nearly vanishes after ten years, and is negative over one to five years in the same model, when you harvest at a low rate and sell later at a high one, for example before and after a large income year. The illustration also ignores trading costs and any difference in returns between the fund sold and its replacement, both of which reduce the gain.
Research on automated harvesting across the whole market points to benefits well under the headline claims. A 2020 Financial Analysts Journal study by Chaudhuri, Burnham, and Lo estimated average annual tax alpha of 1.08% over July 1926 to June 2018 for a portfolio of the 500 largest US stocks, assuming a 35% rate on short-term gains, 15% on long-term gains, negligible trading costs, and no wash-sale rule; the benefit fell once the authors added costs and the wash-sale rule. Such figures assume a steady supply of gains to offset, and they shrink as a portfolio ages and most lots sit at gains.

Crypto in 2026
For crypto held directly, the wash-sale rule does not apply as of September 2026. Section 1091 covers "stock or securities," and the IRS has treated virtual currency as property since Notice 2014-21. An investor can sell bitcoin at a loss and buy it back the same day, and the loss is allowed under the current wording.
That may change. H.R. 9172, the Applying Existing Tax Anti-Abuse Rules to Digital Assets Act, was introduced by Rep. Jodey Arrington on June 8, 2026 and referred to the Ways and Means Committee. It would replace "stock or securities" in Section 1091 with "specified assets," covering digital assets other than qualified US dollar stablecoins, and it would apply to dispositions after the date the bill was introduced. It has not passed either chamber. CNBC reported in July 2026 that a Treasury estimate from 2024 put the revenue from such a change at nearly $24 billion over a decade. If the bill is enacted with that effective date, same-day crypto repurchases made after June 8, 2026 could lose their losses, so keep complete records of dates, prices, and lots.
Two further cautions. Spot crypto ETFs are shares of a fund, and many are grantor trusts treated for tax purposes as owning the coins directly; whether Section 1091 reaches them is unsettled, so the conservative approach is to treat them as covered. And a sale and immediate repurchase with no change in your position may be challenged under the economic substance doctrine even where no wash-sale rule applies.
Doing it in practice
Harvesting by hand works for a handful of funds. Check for losses after large market drops rather than only in December, because losses that appear in March may be gone by year end. Before selling, list every account in the household, including your spouse's and all IRAs, and note any purchases of the same or similar funds in the previous 30 days. Turn off dividend reinvestment in the fund you are selling. Buy the replacement the same day to avoid being out of the market, and decide in advance whether you will switch back after 31 days or keep the replacement; switching back can realize a gain if the replacement has risen.
Automated services do this daily. Our robo-advisor guide compares their fees and account minimums for harvesting as of September 2026, and our direct indexing guide explains how owning individual stocks creates more losses to harvest than a single fund does. Rebalancing and harvesting can share trades; our rebalancing guide shows how.

Harvesting is not worth the effort if you are in the 0% long-term capital gains bracket (up to $98,900 of taxable income for joint filers in 2026), where realizing gains may be the better move, or if nearly all your investments sit in retirement accounts. A CPA or fee-only adviser can check the wash-sale exposure across accounts you cannot see from one broker; our guide to choosing a financial advisor covers how to find one.
This guide is for informational purposes only and does not constitute investment, tax, or legal advice. Tax rules and pending legislation are described as of September 2026 and can change. The illustrations use assumed returns and tax rates, not forecasts. Consult a qualified tax professional before selling investments for tax purposes.



