Fallen leaves on the ground in low light, with a large speckled maple leaf in the center.
Photo: Eva Bronzini ยท Pexels
๐Ÿ“ˆ Investing ยท Taxes

Tax-Loss Harvesting: How It Works, the Wash Sale Rule and a 2026 Example

Selling a loser can cut this year's tax bill, but the wash sale rule reaches your IRA and your spouse's accounts, and the saving is usually a deferral. Here are the IRS rules, the 2026 brackets and a full example.

โœ๏ธ Written by DigitalWealthSource
๐Ÿ” Reviewed by Derek Giordano
๐Ÿ“… Updated Nov 15, 2026
โฑ๏ธ 8 min read
๐Ÿ“‘ On this page โ–ผ
What It Is What a Loss Is Worth The Wash Sale Rule Step by Step Worked Example When to Harvest Decision Rules FAQ

๐Ÿ“ Rules verified Nov 15, 2026 against IRS Topic 409 (capital gains and losses), IRS Publication 550 (wash sales), 26 U.S.C. 1091, IRS Topic 559 (net investment income tax) and the 2026 capital gains brackets in Rev. Proc. 2025-32. The example is illustrative. How we check numbers โ†’

The short answer

Tax-loss harvesting means selling an investment below what you paid to realize a loss that offsets capital gains, plus up to $3,000 a year of other income ($1,500 if married filing separately); unused losses carry forward. Don't buy substantially identical securities within 30 days before or after the sale, including in an IRA, or the loss is disallowed.

Numbers That Matter

RuleWhat it saysSourceVerified
Losses against other incomeUp to $3,000 a year of net capital loss ($1,500 if married filing separately); the rest carries forwardIRS Topic 409Nov 15, 2026
Long-term vs short-termHeld more than one year: long-term; one year or less: short-term, taxed like ordinary incomeIRS Topic 409Nov 15, 2026
2026 long-term rates0% up to $49,450 of taxable income (single) or $98,900 (joint); 15% up to $545,500 / $613,700; 20% aboveIRS Rev. Proc. 2025-32Nov 15, 2026
Net investment income tax3.8% above modified AGI of $200,000 (single) or $250,000 (joint)IRS Topic 559Nov 15, 2026
Wash sale window30 days before or after the saleIRS Pub. 550; 26 U.S.C. 1091Nov 15, 2026
Purchases that countSubstantially identical stock or securities you buy, get in a taxable trade, get an option on, or buy in your IRA or Roth IRA; your spouse buying counts tooIRS Pub. 550Nov 15, 2026
A disallowed lossIs added to the new shares' basis, and your holding period carries over (except IRA purchases)IRS Pub. 550Nov 15, 2026
Substantially identicalDecided on all the facts and circumstances; one company's stock is ordinarily not substantially identical to another'sIRS Pub. 550Nov 15, 2026
ReportingForm 8949, summarized on Schedule D (Form 1040)IRS Topic 409Nov 15, 2026

What Tax-Loss Harvesting Is

You sell an investment in a taxable account for less than you paid, realize the capital loss, and use it on your return. Losses first reduce your capital gains; if losses are larger, up to $3,000 of the net loss ($1,500 if married filing separately) reduces your other income, and anything beyond that carries forward to later years (IRS). If you want to stay invested, you can buy a different investment, which is where the wash sale rule comes in.

Harvesting works only in taxable accounts. Gains and losses inside IRAs and 401(k)s aren't reported each year, so there is nothing to harvest there.

What a Loss Is Worth

A loss is worth the tax on whatever it offsets. Short-term gains (assets held one year or less) are taxed at ordinary income rates; long-term gains get lower rates (IRS). For 2026, the long-term rate is 0% up to $49,450 of taxable income for a single filer ($98,900 joint), 15% up to $545,500 ($613,700 joint) and 20% above (IRS). Higher earners may also owe the 3.8% net investment income tax above $200,000 of modified AGI ($250,000 joint) (IRS). If your gains would be taxed at 0% anyway, harvesting losses against them saves nothing now.

The Wash Sale Rule

You can't deduct a loss if, within 30 days before or after the sale, you buy substantially identical stock or securities, acquire them in a fully taxable trade, acquire a contract or option to buy them, or buy them for your IRA or Roth IRA. If your spouse or a corporation you control buys substantially identical stock, that counts as a wash sale too (IRS Pub. 550; 26 U.S.C. 1091).

  • The loss isn't always gone. A disallowed loss is added to the basis of the new shares, and your holding period carries over, so the deduction is postponed until you sell them. The exception is a purchase inside an IRA or Roth IRA, where the IRS doesn't allow that basis adjustment (IRS).
  • "Substantially identical" is a facts-and-circumstances test. The IRS says stock of one corporation is ordinarily not substantially identical to stock of another, and Pub. 550 sets no specific rule for funds that track the same index (IRS). If you're unsure, choose a replacement that is clearly different, or wait out the window.
  • Watch automatic purchases such as reinvested dividends or scheduled buys in any account you control during the 61-day period.

How to Harvest, Step by Step

  1. Find lots below cost in your taxable account, and note whether each is short-term or long-term.
  2. Check the window: no purchases of the same or substantially identical securities in the 30 days before the sale, in any of your accounts or your spouse's.
  3. Sell the lot and record the date and loss.
  4. Reinvest in something that isn't substantially identical, if you want to stay invested.
  5. Avoid repurchasing the original for 30 days after the sale, including through automatic investments.
  6. Report it on Form 8949 and Schedule D; keep the carryforward amount for next year (IRS).

Worked Example: Harvesting a $20,000 Loss in 2026

๐Ÿงฎ Worked Example: Single Filer, 2026 (illustrative)

$90,000 of ordinary taxable income (22% bracket) and $12,000 of long-term gains already taken this year. A fund bought for $100,000 more than a year ago is now worth $80,000.

Use of the $20,000 lossAmountTax saved
Offsets long-term gains (15%)$12,000$1,800
Offsets ordinary income (22%)$3,000$660
Carries forward to 2027$5,000later
Total 2026 saving$2,460
  • Deferral, not erasure: if the $80,000 goes into a replacement fund that later grows to $100,000, that sale shows a $20,000 gain the original fund wouldn't have had.
  • No gains to offset? The same loss against ordinary income alone, $3,000 a year, takes 7 years to use up.
  • The window: a sale on December 15, 2026 is a wash sale if substantially identical shares are bought from November 15, 2026 through January 14, 2027; January 15, 2027 is the first clean day to buy back.
  • Pub. 550's own example: buy 100 shares for $1,000, sell them for $750 and buy them back within 30 days for $800: the $250 loss is disallowed and the new basis is $1,050 (IRS).

Brackets from Rev. Proc. 2025-32; the $3,000 limit and carryforward from IRS Topic 409. State taxes not included.

When to Harvest, and When Not To

  • Good fits: you've realized gains this year, especially short-term gains taxed at ordinary rates, or your income is high enough that the losses offset 15% or 20% gains.
  • Weak fits: your gains would fall in the 0% bracket anyway, the loss is small next to the effort, or you can't stay out of substantially identical holdings for the window.
  • Remember the trade-off: buying a replacement at the lower price lowers your basis, so you're usually postponing tax rather than eliminating it.

Decision Rules

If this, then that

  • If you have realized gains this year โ†’ check your taxable account for lots below cost before December 31.
  • If a loss is short-term and you have short-term gains โ†’ it offsets income taxed at your ordinary rate.
  • If your taxable income keeps gains in the 0% bracket โ†’ harvesting now saves little.
  • If you or your spouse bought the same fund in the last 30 days, in any account โ†’ wait, or the loss is disallowed.
  • If a purchase lands in your IRA during the window โ†’ expect the loss to be lost, not deferred.
  • If losses exceed gains plus $3,000 โ†’ carry the rest forward and track it.

Mistakes to avoid

  • Buying the same fund back within 30 days in another account, an IRA or a spouse's account.
  • Forgetting automatic dividend reinvestment or scheduled purchases during the window.
  • Harvesting losses against gains that would have been taxed at 0%.
  • Losing track of the carryforward from one year to the next.
  • Treating harvesting as tax-free money instead of a deferral.
  • Trying to harvest inside an IRA or 401(k), where there is no deduction.
๐Ÿงฎ See the Tax on Your Gains
The Capital Gains Tax Calculator shows federal tax on a sale for 2026 and 2027, including the 3.8% NIIT and your state.
Open the Capital Gains Tax Calculator โ†’

Related: capital gains tax, index funds vs ETFs, dividend investing and crypto taxes. More in the Investing hub.

Frequently Asked Questions

How much of a capital loss can I deduct?
+
Losses first offset your capital gains without limit. If losses are larger, you can deduct up to $3,000 of the net loss against other income each year ($1,500 if married filing separately) and carry the rest forward to later years.
What is the wash sale rule?
+
You can't deduct a loss if, within 30 days before or after the sale, you buy substantially identical stock or securities, acquire them in a taxable trade, acquire an option to buy them, or buy them for your IRA or Roth IRA. A purchase by your spouse or a corporation you control also counts.
Is a wash sale loss gone forever?
+
Usually not. The disallowed loss is added to the basis of the new shares and your holding period carries over, so you get the benefit when you sell them. The exception is a repurchase inside an IRA or Roth IRA, where that basis adjustment isn't allowed.
Are two funds that track the same index substantially identical?
+
Publication 550 sets no specific rule for funds. It says you must consider all the facts and circumstances, and that stock of one corporation is ordinarily not substantially identical to another's. If you're unsure, pick a clearly different replacement or wait 31 days.
How much can tax-loss harvesting save?
+
It depends on what the loss offsets. In the worked example, a $20,000 loss offsets $12,000 of long-term gains at 15% and $3,000 of income at 22%, saving $2,460 in 2026 with $5,000 carried forward. Buying a replacement at the lower price usually defers tax rather than eliminating it.
Should I harvest losses if I'm in the 0% capital gains bracket?
+
Usually there is little point in using losses against gains that would be taxed at 0% anyway; for 2026 that bracket runs up to $49,450 of taxable income for single filers and $98,900 for joint filers. Losses can still reduce up to $3,000 of other income.
โš ๏ธ Important Disclosure
DigitalWealthSource publishes educational financial content. Nothing on this site constitutes personalized financial, tax, legal, or investment advice. Every person's financial situation is unique. We strongly encourage consulting with a qualified financial advisor, CPA, or attorney before making significant financial decisions. Content is provided for informational and educational purposes only.
Sources: IRS: Topic no. 409, Capital gains and losses (updated Nov 9, 2026); Publication 550 (wash sales); Topic no. 559, Net investment income tax; Rev. Proc. 2025-32 (2026 brackets). 26 U.S.C. 1091 (govinfo). Verified November 15, 2026.
๐Ÿ‘ค
Written & reviewed by Derek Giordano
Derek reviews all content on DigitalWealthSource. Background in business marketing with hands-on experience in debt payoff, homebuying, tax strategy, and long-term investing. Our methodology โ†’
✓
Independent & Ad-Free
No ads, no affiliate links, no sponsored content. Sources are listed on this page. Spot an error or an outdated figure? Tell us and weโ€™ll fix it.
📖 Sources & References
  1. Topic no. 409: Capital gains and losses. Internal Revenue Service. https://www.irs.gov/taxtopics/tc409
  2. Publication 550: Investment Income and Expenses (wash sales). Internal Revenue Service. https://www.irs.gov/publications/p550
  3. 26 U.S.C. 1091: Loss from wash sales of stock or securities. U.S. Government Publishing Office. https://www.govinfo.gov/content/pkg/USCODE-2024-title26/html/USCODE-2024-title26-subtitleA-chap1-subchapO-partVII-sec1091.htm
  4. Topic no. 559: Net investment income tax. Internal Revenue Service. https://www.irs.gov/taxtopics/tc559
  5. Rev. Proc. 2025-32: 2026 inflation adjustments. Internal Revenue Service. https://www.irs.gov/pub/irs-drop/rp-25-32.pdf