Tax-Loss Harvesting Explained: Rules, Wash-Sale Trap, and How to Do It in 2026

Markets swing in both directions, and a portfolio full of losses isn’t fun to look at. But those losses are worth something — if you know how to use them before December 31. Tax-loss harvesting (TLH) is the IRS-approved technique of deliberately selling investments at a loss to offset capital gains elsewhere, cutting the tax bill you’ll owe next April.

This guide explains how it works, what the rules are, where investors get tripped up (the wash-sale rule is the main culprit), and whether it makes sense for your situation. For the underlying rate structure, see our Capital Gains Tax 2026 brackets guide.

Tax-loss harvesting explained simply

Here’s the core idea: the IRS lets realized losses cancel out realized gains, dollar for dollar. If you sell a fund at a $5,000 gain and a second fund at a $5,000 loss in the same tax year, those two cancel each other out — you owe zero capital gains tax on the pair.

If your losses exceed your gains, you get a bonus: you can deduct up to $3,000 of net capital loss against ordinary income (wages, interest, etc.) per year — $1,500 if you’re married filing separately, per IRS Topic No. 409. Any loss beyond that threshold doesn’t disappear; it carries forward indefinitely to future tax years.

The tax savings depend on which kind of gain you’re offsetting. Long-term gains (assets held more than one year) are taxed at 0%, 15%, or 20% depending on your income. Short-term gains (one year or less) are taxed as ordinary income — up to 37% at the top federal bracket. Offsetting a short-term gain with a harvested loss saves the most money per dollar.

WealthBrief 차트

Tax-loss harvesting rules US: how the IRS orders the netting

The IRS doesn’t let you pick and choose which losses offset which gains. There’s a mandatory netting sequence:

  1. Short-term losses offset short-term gains first.
  2. Long-term losses offset long-term gains first.
  3. Any net short-term loss then offsets net long-term gain (and vice versa).
  4. If you still have a net capital loss, you deduct up to $3,000 against ordinary income, and carry the rest forward.

The practical upshot: harvesting a long-term loss to wipe out a short-term gain is less dollar-efficient than it looks, because the IRS routes the long-term loss against long-term gains first. Run the numbers on your full gain/loss picture, not just the individual transactions.

2026 long-term capital gains tax brackets — what you’re actually saving

Filing status 0% rate (taxable income up to) 15% rate (up to) 20% rate (above)
Single $49,450 $545,500 $545,500
Married filing jointly $98,900 $613,700 $613,700
Head of household $66,750 $579,600 $579,600

Source: IRS Rev. Proc. 2025-32 (2026 tax year). Short-term gains taxed at ordinary income rates — up to 37% at the federal level. High-income earners may also owe the 3.8% Net Investment Income Tax (NIIT) above $200,000 single / $250,000 MFJ.

If you’re in the 15% long-term bracket, every $1,000 of harvested loss saves you $150 in federal tax. In the 20% bracket plus NIIT, the effective rate on long-term gains can reach 23.8% — so the same $1,000 loss shelters $238 in federal tax.

The wash-sale trap: the 30-day rule that wrecks most harvests

This is where investors lose their deduction. Under IRC Section 1091, if you sell a security at a loss and then buy a “substantially identical” security within 30 days before or after that sale, the IRS disallows the loss. It’s called a wash sale.

The window is wider than most people realize: 61 days total — 30 days before the sale, the sale date itself, and 30 days after. Buy back the same fund on day 29 after selling? Loss denied.

The disallowed loss isn’t gone forever. It gets added to the cost basis of the replacement shares, so you’ll eventually get credit when you sell those shares. But you’ve lost the timing benefit — which is the whole point of year-end harvesting.

What counts as “substantially identical”? The IRS hasn’t published a bright-line definition, but in practice:

  • Selling a fund and buying the identical fund in a different account: wash sale.
  • Selling a Vanguard S&P 500 ETF (VOO) and buying the Fidelity S&P 500 ETF (FXAIX): likely a wash sale — same underlying index.
  • Selling a broad US total-market fund and buying a different fund tracking a different index (e.g., Russell 1000): generally safe, but consult a tax professional on specific situations.
  • The rule applies across all accounts you own or control — including a spouse’s account or an IRA. Selling in your taxable brokerage and rebuying in your IRA? Wash sale.

Tax-loss harvesting rules for crypto — the current exception

As of 2026, cryptocurrency is not classified as a “security” under federal law — the IRS treats it as property under Revenue Ruling 2023-14. Section 1091 (the wash-sale rule) applies only to stock and securities. This means you can sell Bitcoin at a loss, rebuy it the same day, and still claim the loss.

Important caveat: Congress has repeatedly proposed legislation to extend wash-sale rules to crypto, and that could change at any time. Check the status at IRS.gov before executing a crypto harvest. Never assume this loophole is permanent.

A worked example: harvesting $8,000 to save real money

Say it’s late October 2026. You’re a single filer with $95,000 of taxable income — solidly in the 15% long-term capital gains bracket.

Your brokerage account has:

  • Fund A: $12,000 gain (held 14 months → long-term)
  • Fund B: $8,000 loss (held 9 months → short-term loss)

Step 1 — Realize the loss first. You sell Fund B, locking in the $8,000 short-term capital loss.

Step 2 — Apply the netting rules. Short-term losses offset short-term gains first. You have no other short-term gains, so the $8,000 short-term loss then offsets your $12,000 long-term gain. Net long-term gain: $12,000 − $8,000 = $4,000.

Step 3 — Calculate the saving. Without harvesting, you’d owe 15% on $12,000 = $1,800. After harvesting, you owe 15% on $4,000 = $600. Tax saved: $1,200.

Step 4 — Replace Fund B without triggering a wash sale. You wait 31 days and buy a comparable (but not substantially identical) fund to maintain your market exposure. Mark that date in your calendar — if you buy back too soon, you lose the deduction.

Arithmetic check: $8,000 loss × 15% LTCG rate = $1,200 in tax sheltered. ($12,000 − $8,000) × 15% = $4,000 × 15% = $600 owed. $1,800 − $600 = $1,200 saved. ✓

Tax-loss harvesting year-end checklist

  • Deadline: December 31. Losses must be realized in the calendar year. For stocks, trades now settle T+1 (next business day), so the practical deadline is December 30 to be safe. If you’re also trying to max your 401(k), our 401(k) year-end sprint guide covers that deadline side by side.
  • Review your full gain/loss picture first. Your brokerage’s realized gain/loss report is the place to start — look at the net by category (short-term vs long-term) before selling anything.
  • Mark wash-sale windows in your calendar. If you sell Fund B on December 3, you cannot rebuy anything substantially identical until January 3.
  • Check all accounts you control. IRAs, spousal accounts, and accounts at other brokerages all count for wash-sale purposes.
  • Beware dividend reinvestment. Automatic dividend reinvestment in the 30-day window can inadvertently trigger a wash sale on shares already sold.
  • Consider tax-bracket positioning. If a harvested loss would push your income into the 0% long-term bracket, you might instead realize gains at 0% — the opposite of harvesting.
  • Keep records. Save trade confirmations and year-end 1099-B statements. You’ll need Form 8949 and Schedule D to report gains, losses, and any carryforward.

In 3 lines

  • Tax-loss harvesting lets you sell investments at a loss to offset capital gains dollar-for-dollar, reducing or eliminating federal capital gains tax for the year.
  • The IRS wash-sale rule (IRC §1091) disallows the loss if you rebuy a substantially identical security within 30 days on either side of the sale — across all your accounts, including IRAs.
  • As of 2026, crypto is not subject to the wash-sale rule, but that could change; any net capital loss beyond your gains reduces ordinary income by up to $3,000 per year, with the rest carrying forward indefinitely.

For information only — not financial or tax advice. Tax rules can change; figures above are based on IRS Rev. Proc. 2025-32 and IRS Topic No. 409, as of 2026. Always verify current rules at IRS.gov or consult a qualified tax professional before executing any strategy.

About the author
Calm Investor
Calm Investor
WealthBrief Research Editor
Analyzes rates, loans, investment products, and real estate finance based on hands-on experience in the financial investment industry.
This article was researched, written, and reviewed by Calm Investor based on publicly available sources. Views are the author's own and do not represent any current or former employer. This is not investment advice.
View author profile →

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *