Investment Education

Tax-Loss Harvesting and Wash Sale Rules: IRS Guidance

By Editorial Team — reviewed for accuracy Published
Last reviewed:

Data Notice: Tax rules cited in this article reflect IRS guidance as of 2026. Tax law can change. Verify current rules with the IRS or a qualified tax professional before executing any tax-loss harvesting strategy.

This article is for informational and educational purposes only. It does not constitute personalized financial, investment, or tax advice. Consult a qualified professional before making tax-related decisions.

Tax-Loss Harvesting and Wash Sale Rules: IRS Guidance

Tax-loss harvesting can save you hundreds or thousands of dollars annually by converting investment losses into tax deductions. But the IRS wash sale rule creates a trap that disqualifies the deduction if you repurchase the same or a “substantially identical” security within 30 days. This guide explains exactly how the wash sale rule works, what triggers it, and how to harvest losses without running afoul of the IRS.

For a broader overview of tax-loss harvesting strategy, see our complete tax-loss harvesting guide.

How Tax-Loss Harvesting Works

Tax-loss harvesting is straightforward in concept:

  1. Identify investments with unrealized losses in your taxable brokerage account (not retirement accounts — losses inside IRAs and 401(k)s provide no tax benefit)
  2. Sell the losing position to realize the loss
  3. Use the realized loss to offset capital gains, and up to $3,000 per year of ordinary income
  4. Buy a replacement investment that provides similar market exposure to maintain your portfolio allocation

The tax savings are real. A $10,000 harvested loss for someone in the 24% federal bracket offsets $2,400 in taxes if applied against ordinary income, or $1,500 if offsetting long-term capital gains taxed at 15%.

The Wash Sale Rule: 26 USC Section 1091

The IRS wash sale rule exists to prevent investors from claiming a tax loss while maintaining an economically identical position. Under 26 USC 1091, a loss on the sale of stock or securities is disallowed if, within a 61-day window (30 days before the sale through 30 days after), you acquire:

  • The same stock or security you sold
  • A contract or option to buy substantially identical stock or securities
  • Substantially identical stock or securities

Source: Fidelity — Wash-Sale Rules

The 61-Day Window Explained

The window is broader than many investors realize. It covers 30 calendar days before the sale and 30 calendar days after, plus the sale date itself — totaling 61 days.

Example: You sell 100 shares of Fund A at a loss on March 15. You cannot purchase Fund A (or a substantially identical fund) from February 13 through April 14 without triggering a wash sale.

This means you must also be careful about purchases you made before the sale. If you bought additional shares of Fund A on March 1 and then sold your original shares at a loss on March 15, the March 1 purchase falls within the 30-day pre-sale window and triggers a wash sale.

What Happens When You Trigger a Wash Sale

The disallowed loss is not gone forever — it is added to the cost basis of the replacement shares. This defers the tax benefit rather than eliminating it. You will eventually realize the loss when you sell the replacement shares (assuming you do not trigger another wash sale at that point).

Example: You sell 100 shares of VOO at $400 per share (cost basis $450), realizing a $5,000 loss. Within 30 days, you buy 100 shares of VOO at $405. The wash sale rule:

  • Disallows the $5,000 loss
  • Adds $5,000 to the cost basis of the new shares ($405 + $50 = $455 per share adjusted basis)
  • When you eventually sell the replacement shares, the higher cost basis produces a larger deductible loss or smaller taxable gain

”Substantially Identical”: The Gray Area

The IRS has never published a precise definition of “substantially identical.” This deliberate ambiguity creates both risk and opportunity.

What Is Clearly Substantially Identical

  • Selling shares of Vanguard S&P 500 ETF (VOO) and buying more VOO within 30 days
  • Selling a stock and buying a call option on the same stock
  • Selling shares in one account and buying the same security in another account (including your spouse’s account)

What Is Generally Considered Safe (Not Substantially Identical)

  • Selling Vanguard S&P 500 ETF (VOO) and buying Schwab U.S. Broad Market ETF (SCHB) — different index, different fund company
  • Selling Vanguard Total International (VXUS) and buying iShares Core MSCI International (IXUS) — similar but different index methodology
  • Selling an individual stock and buying a sector ETF that includes the stock
  • Selling one bond fund and buying a different bond fund with different duration or credit quality

The Uncertain Middle Ground

  • Selling VOO (S&P 500) and buying IVV (also S&P 500) — same index, different fund company. The IRS has not ruled explicitly on this. Many tax advisers consider this risky because the holdings are essentially identical. The safest approach is to switch to a different index (e.g., total stock market instead of S&P 500).
  • Selling a mutual fund and buying the ETF share class of the same fund — likely a wash sale since the underlying portfolio is identical

Source: Charles Schwab — Primer on Wash Sales

Cross-Account Rules

The wash sale rule applies across all your accounts, including:

  • Multiple brokerage accounts at different firms
  • Your IRA or 401(k) — if you sell a stock at a loss in your taxable account and buy the same stock in your IRA within 30 days, the loss is permanently disallowed (not even added to your IRA basis)
  • Your spouse’s accounts

The IRA interaction is particularly dangerous because the disallowed loss does not get added to any cost basis — it simply vanishes. This is the one scenario where a wash sale creates a permanent loss of the tax benefit.

Source: Investor.gov — Wash Sales

Practical Tax-Loss Harvesting Strategy

Step 1: Review Your Taxable Accounts

At minimum, review positions quarterly and after significant market declines. Look for positions with unrealized losses greater than $500 — smaller amounts may not justify the tracking effort.

Step 2: Choose a Replacement Fund

Before selling, identify your replacement investment. You want similar but not substantially identical exposure:

If You Sell…Safe Replacement Options
S&P 500 fund (VOO, SPY)Total stock market fund (VTI, SCHB, ITOT)
Total stock market fund (VTI)S&P 500 + small-cap value (VOO + VBR)
Total international (VXUS)International developed + emerging (VEA + VWO)
U.S. bond market (BND)Intermediate Treasury (VGIT) or corporate bond (VCIT)
Individual stockSector ETF containing the stock

Step 3: Execute the Swap

Sell the losing position and buy the replacement on the same day. You want to minimize the time out of the market — even one day can mean missing a significant move.

Step 4: Track the 30-Day Window

Set a calendar reminder for 31 days after the sale. After that date, you can switch back to your original fund if desired (though this creates a new cost basis and potential future complexity).

Step 5: Maintain Records

Track the sale date, loss amount, replacement purchase, and adjusted cost basis. Your brokerage reports wash sales on Form 1099-B, but cross-account wash sales may not be automatically reported — the burden is on you.

Automated Tax-Loss Harvesting

Robo-advisers like Wealthfront and Betterment offer automated tax-loss harvesting that monitors your portfolio daily and executes swaps when losses exceed a threshold. For a comparison of these platforms, see our robo-adviser vs human adviser guide.

Automated platforms typically:

  • Monitor portfolios daily (more frequently than most DIY investors)
  • Use pre-approved replacement pairs that avoid substantially identical issues
  • Track the 30-day window across all taxable accounts on their platform
  • Cannot track purchases in external accounts or your spouse’s accounts — you must manage that risk

Special Cases

Cryptocurrency and Wash Sales

As of 2026, cryptocurrency is not subject to the wash sale rule. The IRS classifies crypto as property under IRC 1091, which applies specifically to “stock or securities.” You can sell Bitcoin at a loss and immediately repurchase Bitcoin without triggering a wash sale.

However, proposed legislation may extend the wash sale rule to crypto in future years. Monitor IRS guidance if you use crypto tax-loss harvesting.

Dividend Reinvestment Plans (DRIPs)

Automatic dividend reinvestment can trigger a wash sale if it occurs within 30 days of selling the same security at a loss. Before harvesting a loss, turn off DRIP for the affected security and keep it off for 30 days after the sale.

Year-End Harvesting

The most common time for tax-loss harvesting is October through December, when investors review the year’s gains and losses. But opportunities exist throughout the year, particularly during market corrections. Harvesting losses in February after a January decline gives you more flexibility than waiting until December.

How Much Can Tax-Loss Harvesting Save?

The value depends on your tax bracket, the size of losses available, and whether you offset gains or ordinary income:

ScenarioAnnual Tax Savings
$5,000 loss offsetting long-term gains (15% rate)$750
$5,000 loss offsetting short-term gains (32% rate)$1,600
$3,000 loss deducted against ordinary income (32% rate)$960
$20,000 loss offsetting long-term gains (20% + 3.8% NIIT)$4,760

Research from Wealthfront and academic studies suggests systematic tax-loss harvesting adds approximately 0.5-1.5% in after-tax return annually for investors in higher tax brackets, depending on market volatility and portfolio size.

Key Takeaways

  • The wash sale rule disallows losses if you buy the same or “substantially identical” security within 30 days before or after the sale — a 61-day total window
  • “Substantially identical” is not precisely defined by the IRS, but switching from an S&P 500 fund to a total market fund is generally considered safe
  • The rule applies across all accounts, including your spouse’s — and losses from IRA wash sales are permanently lost
  • Disallowed losses are not eliminated — they add to the cost basis of replacement shares (except in IRAs)
  • Automated platforms handle the mechanics but cannot track external or spousal accounts
  • Crypto is currently exempt from wash sale rules, but this may change

Next Steps


Sources:

This article is for informational and educational purposes only. It does not constitute personalized financial, investment, or tax advice. Consult a qualified financial professional before making any financial decisions.

About This Article

Researched and written by the iAdviser editorial team using official sources. This article is for informational purposes only and does not constitute professional advice.

Last reviewed: · Editorial policy · Report an error