Federal rules for readers across the U.S.
Tax-Loss Harvesting and the Wash Sale Rule
By Christian Brinkley. Reviewed October 8, 2026.
Educational information only, not personalized tax, legal, or investment advice. Christian is a licensed insurance agent (NC Life & Health), not a CPA or registered investment adviser. Discuss your own situation with a qualified professional.
How the strategy works
Sell a losing investment and use the loss to cancel out gains from winners. Short-term losses first offset short-term gains, which are taxed at higher rates. Net losses beyond your gains can offset up to $3,000 of ordinary income per year. Leftover losses carry forward to future tax years.
The wash sale rule
You cannot claim the loss if you buy the same or a substantially identical security 30 days before or after the sale. That creates a 61-day window around your sale date. Breaking the rule disallows the loss for that year. The disallowed loss adjusts the cost basis of your replacement shares instead.
Limits and gotchas
The $3,000 cap drops to $1,500 if you are married filing separately. The strategy applies to taxable accounts only, not IRAs or 401(k)s. Repurchasing the same fund inside your IRA can still trigger a wash sale. Track trades across every account you own.
Automatic dividend reinvestment counts as buying
If your fund reinvests dividends automatically, each reinvestment is a purchase. One landing inside the 61-day window around your sale can trigger the wash sale rule on that lot. Before you harvest, turn off automatic reinvestment on the security you're selling, in every account including your IRA. You can turn it back on after the window closes.
The rule follows you across accounts, even your spouse's
The IRS doesn't limit the wash sale rule to the account where you sold. Buying substantially identical securities in your IRA, your 401(k), or your spouse's accounts inside the window can still disallow the loss. When you harvest, check every account you and your spouse control for 30 days before and after the sale date.
How the loss actually reaches your tax return
Every sale gets reported on Form 8949, with the totals flowing to Schedule D. Your broker sends Form 1099-B, but its cost-basis numbers can be incomplete, especially for older positions or transferred accounts. Keep your own trade confirmations. If the wash sale rule disallowed part of a loss, that amount gets added to the basis of your replacement shares, which lowers your gain or raises your loss when you eventually sell those.
| Topic | How they compare |
|---|---|
| $5,000 gain with $5,000 loss | Gains cancel out; no tax on them |
| $2,000 net loss | Offsets up to $3,000 of ordinary income |
| $10,000 net loss | $3,000 this year; $7,000 carries forward |
Your records checklist
- Review taxable accounts for losing positions before year-end.
- Sell losers and wait out the 61-day wash sale window.
- Apply losses to gains first, then up to $3,000 of ordinary income.
- Carry forward any leftover losses to next year.
Common questions
- Does tax-loss harvesting work in a 401(k) or IRA?
- No. Trades inside retirement accounts are not taxed, so losses there have no tax value. Harvesting only works in taxable brokerage accounts.
- What counts as substantially identical?
- Selling one S&P 500 index fund to buy another company's S&P 500 fund is risky. The IRS has never drawn a bright line for funds. Many investors switch to a fund tracking a different index to stay safe.
- Does the wash sale rule apply to cryptocurrency?
- Currently no. The IRS treats crypto as property, not a security, so the wash sale rule's stock-and-securities language doesn't reach it. Congress has proposed changing this more than once, so check the current law before you harvest crypto losses.
- Can I harvest losses in December and buy back in January?
- Only if January is more than 30 days after the sale. A December 20 sale means waiting until at least January 20. Count the days on a calendar. The window is 30 days before and after, 61 days total including the sale date.
Sources and current instructions
Check the tax year and any later updates before acting. These are the primary sources used for this guide.
