Login Create Free Account

The Wash Sale Rule: When You Cannot Claim a Capital Loss

By Eric Etu, Founder, AlwaysOnTax.com · Last updated

What is the Wash Sale Rule?

The wash sale rule is a tax regulation that disallows a capital loss if you buy a “substantially identical” security within a specific window around the sale. The rule exists to prevent tax avoidance: the IRS doesn’t want you to sell a losing stock, immediately buy it back (maintaining full exposure), and deduct the loss. That would let you harvest the tax benefit while keeping the investment.

The wash sale rule enforces a trade-off: if you want the tax deduction, you have to actually change your portfolio.

The 61-Day Window: When You Can’t Buy

The window is precise: 61 calendar days total.

  • 30 calendar days before the sale
  • The day of the sale
  • 30 calendar days after the sale

If you sell a security at a loss on June 15, you would trigger a wash sale if you buy a substantially identical security between May 16 and July 15, inclusive (61 calendar days total). Buy on July 16 and you’re safe. Buy on July 15 and the capital loss is disallowed.

The 61-day count is unforgiving. If you’re off by one day, the rule applies.

“Substantially Identical”: The Gray Area

Here’s where wash sale rules get tricky. The IRS doesn’t give a precise definition of “substantially identical.” It’s a facts-and-circumstances test, which means different interpretations can apply.

What the IRS clearly disallows:

  • Buying the same stock you just sold
  • Buying a call option on the same stock
  • Your spouse or dependent buying the same security during the wash sale window (yes, family members count)

What’s less clear — and this is where tax practitioners disagree:

The IRS has indicated that mutual funds or ETFs holding substantially similar securities to the ones you sold are likely “substantially identical.” But the agency hasn’t given bright-line rules. Here’s what authoritative sources (Fidelity, Vanguard, tax professionals) generally accept as NOT substantially identical:

  • Selling Vanguard Total Stock Market ETF (VTI), buying iShares Core U.S. Total Stock Market ETF (ITOT) — track different indices and are different funds from different providers. Generally considered safe by tax practitioners.
  • Selling a broad-market index fund, buying a sector-specific ETF or international fund — genuinely different holdings and exposure, clearly not substantially identical.

What’s risky:

  • Selling one total market fund and buying another total market fund from the same provider (arguably the same fund with a different ticker)
  • Selling a large-cap growth fund and buying another large-cap growth fund with similar holdings

The practical test: if you’re rotating out of one position into a genuinely different one — different holdings, different sector, different geography — you’re likely safe. If you’re buying something that feels like the same exposure under a different name, you’re at risk.

What Happens If You Violate the Wash Sale Rule

If you buy a substantially identical security within the 61-day window, your loss isn’t permanently lost. Instead, the loss is added to your cost basis in the new security.

Example. You buy Stock A for $10,000. It falls to $8,000 and you sell, realizing a $2,000 loss. But you immediately buy Stock A again (or a substantially identical security) for $8,000 within the 61-day window. The $2,000 loss is disallowed, but it adds to your cost basis. Your new cost basis is $10,000 ($8,000 purchase price + $2,000 disallowed loss), not $8,000.

Later, when you sell the new position for, say, $9,500, you calculate your gain/loss using the $10,000 cost basis. You’d have a $500 loss instead of breaking even. The original $2,000 loss is still there — it’s just deferred until you sell the new position.

This matters only if you eventually sell the replacement security. If you hold it forever, the loss is effectively trapped.

Wash Sales and Tax-Loss Harvesting: Why Tracking Matters

The wash sale rule is why tax-loss harvesting requires careful tracking. If you harvest losses throughout the year without a system to track your sales and purchases, you can easily violate wash sale rules without realizing it.

Real-world scenario. You sell Stock A at a loss on March 15. You buy Stock B as your replacement. In early April (on or before the 61-day window closes on April 14), you decide to rebalance and accidentally buy Stock A again. You’ve violated the wash sale rule on the original March sale.

This is why investors who harvest losses actively often maintain a “spec list” — a list of alternative securities for each position they might harvest from. Before selling, they know exactly what they can buy as a replacement. This eliminates guesswork and reduces violations.

A reverse scenario. A wash sale can also occur when the purchase happens before the sale. Assume you hold 100 shares of Stock A that you’ve been holding for a long time. You buy 50 more shares of Stock A on March 15. Then you sell the 100 shares from the original holding at a loss, on April 1. This triggers a wash sale, because remember: the 61-day window for wash sales begins 30 days before the sale date.

A Note on State Taxes

Some states do not recognize the federal wash sale rule. If you live in a state with state capital gains tax or state income tax, you may be able to claim the loss for state tax purposes even if it’s disallowed federally. This can create a mismatch: federal disallowance, but state deduction. The details vary by state, so if you’re a resident of a high-tax state and considering significant tax-loss harvesting, consulting a tax professional about state treatment is worthwhile.

The Takeaway

The wash sale rule prevents you from selling a security at a loss and immediately buying it back (or a substantially identical security) within 61 days while claiming the loss. The rule exists to prevent tax avoidance without changing your portfolio. The 61-day window is precise and unforgiving — 30 days before the sale, the sale date itself, and 30 days after. “Substantially identical” is the fuzzy part; the IRS doesn’t define it precisely, but it generally disallows buying the same security or near-identical funds, while allowing you to rotate into genuinely different holdings (different sectors, different providers, different asset classes). If you violate the rule, the loss isn’t lost — it adjusts your cost basis on the new security, deferring the deduction. For investors actively harvesting losses, maintaining a spec list of acceptable replacements and tracking all sales and purchases throughout the year helps avoid violations. If you’re in a high-tax state, understanding how your state treats wash sales (which may differ from federal rules) is also important.

This guide is for educational purposes only and does not constitute tax, legal, or investment advice. Tax outcomes depend on your individual circumstances and may change based on future legislation or IRS guidance. AlwaysOnTax does not address state or local tax planning. Consult a qualified tax professional before acting on any strategy discussed here.