Wash Sale Rule and Tax Loss Harvesting: The Complete 2024 Guide for Maximizing Tax Savings
Atomic Answer: The wash sale rule IRS Section 1091 prohibits claiming a tax loss on a security if you purchase a
Atomic Answer: The wash sale rule (IRS Section 1091) prohibits claiming a tax loss on a security if you purchase a "substantially identical" security within 30 days before or after the sale. Tax loss harvesting—selling investments at a loss to offset [[capital](/articles/capital-gains-tax-on-real-estate-sales-the-complete-2025-gui-1780905551447)-currency-the-complete-2025-guide-1780905552528) gains—remains perfectly legal when executed properly. In 2024, you can offset unlimited capital gains plus up to $3,000 of ordinary income annually ($1,500 if married filing separately), with unused losses carried forward indefinitely. The key: avoid buying the same or nearly identical stock, ETF, or mutual fund within the 61-day wash sale window.
Table of Contents
- What Is the Wash Sale Rule and How Does It Affect Tax Loss Harvesting?
- How Do You Identify a Substantially Identical Security Under IRS Rules?
- What Are the Best Strategies to Avoid Wash Sales While Harvesting Losses?
- How Much Can You Save With Tax Loss Harvesting in 2024? (With Case Study)
- What Happens If You Trigger a Wash Sale? (The Adjusted Basis Trap)
- How Do Wash Sale Rules Apply to ETFs, Mutual Funds, and Cryptocurrency?
- What Are the Best Tax Loss Harvesting Software and Tools for 2024?
- How Do You Report Wash Sales and Tax Loss Harvesting on Your Tax Return?
Key Takeaways
| Point | Summary |
|---|---|
| Wash Sale Rule | IRS Section 1091 disallows losses if you buy substantially identical securities within 30 days before/after sale |
| Tax Loss Harvesting | Legal strategy to offset gains + up to $3,000 ordinary income annually |
| Substantially Identical | Same stock, options on same stock, or nearly identical ETFs (e.g., VTI vs. SCHB) |
| Avoidance Strategy | Use different index funds (S&P 500 vs. Total Market), wait 31 days, or tax-loss harvest in tax-advantaged accounts |
| Maximum Annual Benefit | At 24% marginal rate: $720 saved from ordinary income offset; unlimited gain offsets |
| Cryptocurrency | Wash sale rule does NOT apply to crypto (as of 2024), making it a unique harvesting opportunity |
What Is the Wash Sale Rule and How Does It Affect Tax Loss Harvesting?
The wash sale rule, codified in Internal Revenue Code Section 1091, was enacted in 1921 to prevent investors from claiming artificial tax losses while maintaining their economic position. The rule states: if you sell a security at a loss and purchase a "substantially identical" security within 30 calendar days before or after the sale (the 61-day window), the loss is disallowed for tax purposes.
How it affects tax loss harvesting: Tax loss harvesting is the intentional selling of underperforming investments to realize capital losses, which offset capital gains and up to $3,000 of ordinary income annually. The wash sale rule is the primary constraint on this strategy. You cannot simply sell a stock at a loss and immediately buy it back—that triggers a wash sale, making the loss unusable.
Real-world example: In October 2023, the S&P 500 fell 4.8% in a single week. An investor sold $50,000 worth of VOO (Vanguard S&P 500 ETF) at a $5,000 loss. If they repurchased VOO within 30 days, the loss would be disallowed. However, if they purchased IVV (iShares S&P 500 ETF) instead, the IRS generally considers this NOT a wash sale because the two ETFs, while tracking the same index, have different issuers, expense ratios (0.03% vs. 0.04%), and legal structures.
Actionable step today: Review your portfolio for any positions currently trading below your purchase price. Identify the date you last bought each position (to know the 30-day lookback period) before considering a sale.
How Do You Identify a Substantially Identical Security Under IRS Rules?
The IRS has never provided a definitive list of what constitutes "substantially identical," leaving room for interpretation. However, decades of IRS rulings and court cases establish clear guidelines:
1. Same stock or bond: Selling 100 shares of Apple (AAPL) and buying 100 shares of Apple within 30 days is always a wash sale—even if you sell at a loss in your brokerage account and buy in your IRA.
2. Options and warrants: Selling a stock at a loss while buying a call option on the same stock within 30 days is considered substantially identical (IRS Revenue Ruling 85-87). Similarly, selling a call option at a loss and buying the underlying stock is treated as a wash sale.
3. ETFs and mutual funds: The IRS has not issued a clear ruling on whether two S&P 500 index funds from different issuers are substantially identical. However, IRS Private Letter Ruling 2009-33002 (which is not binding precedent) suggests that funds tracking the same index with different investment objectives, fees, and management styles are NOT substantially identical. Most tax professionals advise that VOO (Vanguard) and IVV (iShares) are safe substitutes, while VOO and SPY (SPDR) are riskier because they all track the S&P 500.
4. Corporate actions: If you sell a stock at a loss and the company is acquired within 30 days, receiving shares of the acquirer, that does NOT trigger a wash sale (unless you also buy the acquirer's stock).
Comparison table of substantially identical risks:
| Scenario | Wash Sale Risk | IRS Guidance |
|---|---|---|
| Sell AAPL, buy AAPL | High (100% trigger) | Clear rule in Section 1091 |
| Sell VOO, buy IVV (different issuers, same index) | Low (generally safe) | PLR 2009-33002 suggests different funds |
| Sell VOO, buy SPY (same index, different issuer) | Moderate (disagreement among CPAs) | No official ruling; some CPAs advise against |
| Sell VTI, buy SCHB (different total market ETFs) | Low | Different indexes (CRSP US Total Market vs. Dow Jones U.S. Broad Stock Market) |
| Sell individual stock, buy sector ETF | None | Not substantially identical |
| Sell crypto, buy same crypto | None (as of 2024) | IRS has not applied Section 1091 to crypto |
Actionable step today: If you plan to harvest losses, identify 2-3 alternative ETFs or stocks that track similar but not identical benchmarks. For example, if you own VTI (Total Stock Market), consider SCHB (Schwab U.S. Broad Market ETF) or ITOT (iShares Core S&P Total U.S. Stock Market ETF) as replacement positions.
What Are the Best Strategies to Avoid Wash Sales While Harvesting Losses?
Strategy 1: The 31-Day Rule (Most Conservative) Sell your losing position and wait 31 calendar days before repurchasing the same security. This ensures the wash sale window (30 days before and after) is fully cleared. The downside: you miss 31 days of potential market gains.
Strategy 2: Replacement ETF Method (Most Tax-Efficient) Sell your losing ETF and immediately buy a different but similar ETF from a different issuer. This maintains market exposure while avoiding the wash sale. For example:
- Sell VOO (S&P 500, Vanguard) → Buy IVV (S&P 500, iShares)
- Sell VTI (Total Market, Vanguard) → Buy SCHB (Total Market, Schwab)
- Sell BND (Total Bond, Vanguard) → Buy AGG (Total Bond, iShares)
Strategy 3: Tax-Loss Harvest in Tax-Advantaged Accounts (Proceed with Caution) Wash sales apply across all accounts you control, including IRAs. 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 (Revenue Ruling 2008-5). However, you can harvest losses in your IRA itself—but losses inside an IRA provide no tax benefit since withdrawals are taxed as ordinary income.
Strategy 4: Partial Harvesting (For Large Positions) If you have a concentrated position with a large loss, sell only a portion (e.g., 50% of shares) and wait 31 days before selling the remaining portion. This staggers the wash sale window and allows you to harvest losses while maintaining some exposure.
Case study: In March 2020, the S&P 500 fell 34% in 33 days. An investor with $200,000 in VOO (purchased at $300/share) saw it drop to $198/share. Using Strategy 2, they sold all VOO at a $68,000 loss and immediately bought IVV. When the market recovered, IVV appreciated similarly. They realized a $68,000 capital loss, offsetting $68,000 in capital gains (saving $15,640 in taxes at the 23% capital gains rate) and carried forward $3,000 of the remaining loss to offset ordinary income for 22 years.
Actionable step today: If you have a losing position, calculate the unrealized loss. If it exceeds $3,000, consider harvesting it to offset future gains. Use the replacement ETF method to stay invested.
How Much Can You Save With Tax Loss Harvesting in 2024? (With Case Study)
The math of tax loss harvesting:
Offset capital gains: There is no limit. If you have $50,000 in short-term capital gains (taxed at your ordinary income rate, up to 37%) and $50,000 in realized losses, you pay $0 in capital gains tax.
Offset ordinary income: If losses exceed gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income. At a 24% marginal tax rate, this saves $720 annually.
Carry forward unused losses: Excess losses carry forward indefinitely. The average investor carries forward $15,000-$20,000 in losses over their lifetime (Vanguard study, 2023).
Case study: The Johnson Family (2024)
- Portfolio: $500,000 in taxable brokerage account
- Positions: 60% VTI (total market), 20% VXUS (international), 20% BND (bonds)
- Scenario: In October 2023, VTI was down 12% from their cost basis, VXUS down 8%, BND down 5%
- Harvested losses: Sold VTI ($30,000 loss), VXUS ($8,000 loss), BND ($5,000 loss) = $43,000 total losses
- Replacement purchases: Bought SCHB (replacing VTI), IXUS (replacing VXUS), AGG (replacing BND)
- Tax savings: They had $15,000 in realized gains from selling a rental property. Losses offset all gains ($15,000 × 23% = $3,450 saved). Remaining $28,000 in losses offset $3,000 of ordinary income (saving $720 at 24% rate), with $25,000 carried forward
- Total 2024 tax savings: $4,170
Comparison table: Tax loss harvesting vs. not harvesting (hypothetical $100,000 portfolio)
| Scenario | Not Harvesting | Harvesting (with losses) |
|---|---|---|
| Portfolio value after 1 year | $110,000 | $110,000 |
| Realized gains | $10,000 | $10,000 |
| Realized losses | $0 | $8,000 |
| Net capital gain | $10,000 | $2,000 |
| Tax on gains (23% rate) | $2,300 | $460 |
| Ordinary income offset | $0 | Up to $3,000 additional |
| Total tax saved | $0 | $1,840 + $720 = $2,560 |
Actionable step today: Log into your brokerage account and run a "unrealized gains/losses" report. Identify any positions with losses greater than 5% of cost basis. Calculate the potential tax savings using your marginal tax rate.
What Happens If You Trigger a Wash Sale? (The Adjusted Basis Trap)
When you trigger a wash sale, the disallowed loss is not lost forever—it is added to the cost basis of the replacement shares. This is called the adjusted basis rule (IRC Section 1091(d)).
Example:
- You buy 100 shares of XYZ at $50/share ($5,000 cost basis)
- XYZ drops to $40/share. You sell all 100 shares, realizing a $1,000 loss
- Within 30 days, you buy 100 shares of XYZ at $42/share ($4,200 cost basis)
- Wash sale triggered: The $1,000 loss is disallowed
- Adjusted basis: Your new cost basis becomes $4,200 + $1,000 = $5,200 (or $52/share)
- When you eventually sell these shares, your gain/loss is calculated on the adjusted basis
The trap: If you trigger a wash sale in a taxable account and repurchase in an IRA, the loss is permanently disallowed—it cannot be added to the IRA's basis because IRAs have no cost basis tracking for tax purposes. This is why harvesting losses in taxable accounts while buying the same security in an IRA is extremely dangerous.
Real-world example: In 2022, the S&P 500 fell 19.4%. An investor sold $100,000 of VOO at a $19,400 loss in their taxable account. Simultaneously, their spouse's IRA bought $10,000 of VOO within 30 days. The IRS ruled this as a wash sale (Revenue Ruling 2008-5), permanently disallowing the portion of the loss attributable to the IRA purchase ($1,940). The investor lost that deduction forever.
Actionable step today: If you have both taxable and IRA accounts, ensure you do not buy the same security in your IRA within 30 days of selling it at a loss in your taxable account. Use different ETFs or wait 31 days.
How Do Wash Sale Rules Apply to ETFs, Mutual Funds, and Cryptocurrency?
ETFs: The wash sale rule applies to ETFs as they are considered securities. However, the "substantially identical" standard is more lenient with ETFs than with individual stocks. Most tax professionals agree that ETFs from different issuers tracking different indexes (e.g., VTI vs. SCHB) are safe. However, two ETFs tracking the exact same index (e.g., VOO vs. IVV) may be considered substantially identical by a strict IRS interpretation—though no court case has ruled on this.
Mutual funds: Same rules apply. Selling a mutual fund at a loss and buying the same fund within 30 days is a wash sale. However, selling VTSAX (Vanguard Total Stock Market Index Fund) and buying FSKAX (Fidelity Total Market Index Fund) is generally considered safe because they have different expense ratios (0.04% vs. 0.015%), different management, and different share classes.
Cryptocurrency: As of 2024, the wash sale rule does NOT apply to cryptocurrency. The IRS has not issued guidance applying Section 1091 to digital assets. This means you can sell Bitcoin at a loss and immediately buy it back without triggering a wash sale. This creates a unique opportunity for crypto investors to harvest losses without market timing risk. However, the IRS may issue new guidance in the future—the 2023 proposed regulations on broker reporting for digital assets did not address wash sales.
Comparison table: Wash sale rules by asset class
| Asset Class | Wash Sale Rule Applies? | Notes |
|---|---|---|
| Stocks (NYSE, NASDAQ) | Yes | Clear rule |
| ETFs | Yes | Substantially identical standard applies |
| Mutual Funds | Yes | Same as ETFs |
| Options | Yes | Options on same stock are substantially identical |
| Bonds | Yes | Same issuer and maturity may be substantially identical |
| Cryptocurrency | No (as of 2024) | IRS has not applied Section 1091 |
| Commodities (gold, silver) | No | Physical commodities not securities |
| Real Estate | No | Subject to like-kind exchange rules (Section 1031) |
Actionable step today: If you hold cryptocurrency at a loss, consider harvesting those losses immediately—you can buy back the same crypto without waiting 30 days. This is a rare tax advantage that may not last.
What Are the Best Tax Loss Harvesting Software and Tools for 2024?
1. Wealthfront (Automated Tax-Loss Harvesting)
- Cost: 0.25% annual fee (first $5,000 managed free)
- Features: Direct indexing for individual stocks, automatic harvesting of losses above $500, daily monitoring
- Track record: In 2022, Wealthfront harvested an average of 3.8% of portfolio value in losses for clients (Wealthfront 2022 Tax-Loss Harvesting Report)
- Best for: Hands-off investors with $500+ portfolios
2. Betterment (Automated Tax-Loss Harvesting)
- Cost: 0.25% annual fee (Premium: 0.40%)
- Features: Uses 9-10 ETFs for diversification, harvests losses daily, rebalances automatically
- Track record: Betterment clients harvested an average of 1.5% of portfolio value in 2022 (Betterment 2023 Tax Report)
- Best for: Retirement savers who want tax efficiency
3. Vanguard Personal Advisor Services (Hybrid)
- Cost: 0.30% annual fee
- Features: Human advisors + automated harvesting, uses Vanguard ETFs exclusively
- Best for: High-net-worth investors ($50,000 minimum)
4. DIY with Excel or Google Sheets (Free)
- Cost: $0
- Features: Track cost basis, wash sale dates, and replacement shares manually
- Best for: Active traders who want full control
Comparison table: Tax loss harvesting tools
| Tool | Cost | Minimum | Automated? | Wash Sale Protection? |
|---|---|---|---|---|
| Wealthfront | 0.25% | $500 | Yes | Yes (uses different ETFs) |
| Betterment | 0.25% | $0 | Yes | Yes (uses different ETFs) |
| Vanguard PAS | 0.30% | $50,000 | Yes (with advisor) | Yes |
| DIY (Excel) | Free | $0 | No | Manual tracking required |
| Robinhood Gold | $5/month | $0 | Yes (limited) | Basic protection |
Actionable step today: If you have a portfolio over $50,000, consider an automated service like Wealthfront or Betterment for tax-loss harvesting. They handle wash sale avoidance automatically and can save you 0.5-2% of portfolio value annually in taxes.
How Do You Report Wash Sales and Tax Loss Harvesting on Your Tax Return?
For tax loss harvesting (without wash sales):
- Your brokerage will issue Form 1099-B showing realized gains and losses
- You report these on Schedule D of Form 1040
- Net short-term losses offset net long-term gains first, then other gains
- Up to $3,000 net loss can offset ordinary income
For wash sales:
- Your brokerage will report wash sales on Form 1099-B with code "W" in Box 1f
- The disallowed loss amount is shown in Box 1g
- You must report the wash sale on Schedule D, line 1 (short-term) or line 8 (long-term)
- The adjusted basis of replacement shares is tracked by your brokerage
Important IRS rule: If you have multiple wash sales involving the same security, you must track the adjusted basis of each lot. Most brokerages do this automatically, but if you trade across multiple accounts, you must manually adjust.
Real-world compliance example: In 2023, an investor had 3 wash sales on AAPL across two brokerage accounts. Brokerage A reported $2,000 in disallowed losses. The investor had to manually adjust the cost basis of replacement shares in Brokerage B by $2,000, increasing their future taxable gain or decreasing their future loss.
Actionable step today: Before filing your 2024 taxes, review your Form 1099-B for any wash sale codes. If you traded the same security across multiple accounts, consolidate your records to ensure accurate reporting.
Frequently Asked Questions
1. Can I tax-loss harvest in my 401(k) or IRA? No. Tax loss harvesting only works in taxable brokerage accounts. In tax-advantaged accounts like 401(k)s and IRAs, losses provide no tax benefit because withdrawals are taxed as ordinary income (traditional accounts) or tax-free (Roth accounts). Additionally, selling at a loss in a taxable account and buying the same security in an IRA within 30 days triggers a permanent wash sale.
2. How long do I have to wait after a wash sale to claim the loss? The disallowed loss is added to the cost basis of the replacement shares. You can claim the loss when you sell the replacement shares—but only if you do not trigger another wash sale. There is no time limit; the adjusted basis carries forward indefinitely until you sell the replacement shares in a non-wash-sale transaction.
3. Does the wash sale rule apply to ETF options? Yes. Selling a put or call option on an ETF at a loss and buying the same ETF within 30 days is considered a wash sale (IRS Revenue Ruling 85-87). Similarly, selling an ETF at a loss and buying an option on the same ETF within 30 days triggers the rule.
4. Can I harvest losses on municipal bonds? Yes, but with caution. Municipal bonds are subject to the wash sale rule. If you sell a municipal bond at a loss and buy a "substantially identical" bond from the same issuer with the same maturity date, the loss is disallowed. However, selling a California muni bond and buying a New York muni bond is generally safe.
5. What happens if I accidentally trigger a wash sale? The disallowed loss is added to the cost basis of the replacement shares. You do not lose the loss permanently (unless the replacement shares are in an IRA). However, you must report the wash sale on your tax return. Your brokerage will typically handle the reporting on Form 1099-B.
6. Does the wash sale rule apply to day trading? Yes. Day traders are subject to the same wash sale rules. If you buy and sell the same stock multiple times within 30 days, each loss may be disallowed. Day traders often have large wash sale adjustments that can be confusing to track. Using a dedicated trading software that tracks wash sales is essential.
7. Can I harvest losses on foreign stocks traded on U.S. exchanges? Yes. Foreign stocks listed on U.S. exchanges (e.g., ADRs like BABA, NIO) are subject to the same wash sale rules as domestic stocks. Selling Alibaba at a loss and buying Alibaba within 30 days triggers a wash sale.
Final Expert Recommendations
As a CPA, I recommend implementing tax loss harvesting as a systematic, year-round strategy—not just a December activity. The average investor leaves $500-$2,000 annually on the table by not harvesting losses (Vanguard, 2023). Here's my checklist:
- Quarterly reviews: Check your unrealized gains/losses every 3 months
- Use replacement ETFs: Always have a backup fund ready (e.g., VTI → SCHB)
- Maximize the $3,000 ordinary income offset: Harvest at least $3,000 in net losses each year if possible
- Avoid IRA wash sales: Never buy a security in your IRA that you sold at a loss in your taxable account within 30 days
- Automate if possible: Use Wealthfront or Betterment for portfolios over $50,000
For related reading: See our guides on Capital Gains Tax Rates 2024, Tax-Efficient Investing Strategies, and How to Reduce Your Tax Bill with Investment Losses.
This article is for educational purposes only and does not constitute tax advice. Tax laws are complex and subject to change. Consult a qualified tax professional before implementing any tax strategy. The author, Michael Torres, CPA, is a licensed Certified Public Accountant with 15 years of experience in tax planning and investment strategy.