Wash Sale Rule and Basis Adjustment: Triggers, Trap, and Reporting

The wash sale rule disallows a loss deduction when you sell a stock or other security at a loss and buy a substantially identical security within 30 days before or after that sale. The loss isn’t erased. Under Internal Revenue Code Section 1091, it gets added to the cost basis of the replacement shares, which defers the tax benefit until you sell those shares in a clean transaction.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities In a handful of situations the loss really does disappear, and those are the ones worth knowing before you sell anything at a loss.

What Triggers a Wash Sale

Three things have to line up: you sell a security at a loss, you acquire a substantially identical security within a 61-day window (the 30 days before the sale, the sale date, and the 30 days after), and you aren’t a dealer trading in the ordinary course of business.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The acquisition doesn’t have to be a straight purchase. Entering into a contract or option to buy the same security counts too.

“Substantially identical” is where most of the confusion sits. Shares of the same company’s common stock are obviously identical. Bonds or preferred stock of the same company generally are not considered substantially identical to its common stock, unless the bonds or preferred shares are convertible into the common stock and trade at prices closely tracking the conversion ratio.2Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses Securities involved in a corporate reorganization or merger may also qualify as substantially identical to the predecessor company’s shares.

The IRS has never published a bright-line test for when two different ETFs or mutual funds cross the line. Two S&P 500 index funds from different providers track the same basket and behave almost identically, but there’s no definitive guidance on whether swapping between them triggers the rule. Most tax professionals treat funds with identical underlying indexes as risky and funds tracking meaningfully different indexes (say, the S&P 500 versus the Russell 1000) as safe replacements. Aggressive interpretations can backfire.

Automatic Dividend Reinvestments

One of the quieter traps involves dividend reinvestment plans. If you sell a stock at a loss but have a DRIP running on the same security, any shares bought with reinvested dividends during the 61-day window count as replacement shares and trigger the rule. The amounts are often small, and they can disallow a much larger loss. Turning off automatic reinvestment before selling avoids the problem.

Partial Wash Sales

The rule scales to how many replacement shares you buy. Sell 200 shares at a loss and buy back only 100 within the window, and the disallowance applies only to 100 shares’ worth of the loss. The other 100 shares’ loss is fully deductible. That matters when you want to trim a position while still claiming part of the tax benefit.

The Window Crosses Calendar Years

A December loss sale doesn’t lock in the loss for that tax year if you buy the security back in early January. The purchase falls inside the 30-day post-sale window and the loss gets disallowed on the prior year’s return. A December 15 sale creates a restricted window running from November 15 through January 14. Any acquisition of substantially identical shares in that span, including in a different account, triggers the rule.

Year-end tax-loss harvesting therefore means waiting a full 31 days before repurchasing, or moving into a similar but not substantially identical investment for the intervening month.

How the Basis Adjustment Works

When the IRS disallows the loss, Section 1091(d) requires it to be added to the cost basis of the replacement shares.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The math is simple: purchase price of the replacement shares plus the disallowed loss. That higher basis means a smaller eventual gain (or a larger eventual loss) when you finally sell the replacement shares cleanly.

A concrete example. You buy 100 shares at $100 each for $10,000, sell them for $80 each for $8,000, and realize a $2,000 loss. Two weeks later you buy 100 shares of the same stock at $85 each for $8,500. Because the repurchase falls inside the 61-day window, the $2,000 loss is disallowed. Your adjusted basis in the new shares becomes $8,500 plus $2,000, or $10,500.3Internal Revenue Service. Link and Learn Taxes – Case Study 1: Wash Sales

Sell those replacement shares later for $11,000 and your taxable gain is $500 ($11,000 minus $10,500), not $2,500. The $2,000 you couldn’t deduct earlier reduced your future gain by the same amount. The economics come out even; you just don’t get the loss on this year’s return.

Holding Period Carryover

The holding period from the original shares also carries over to the replacement shares.2Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses That matters because long-term capital gains (on assets held more than a year) are taxed at lower rates than short-term gains. Ten months on the original shares plus three more months on the replacements is thirteen months total, and the eventual sale qualifies for long-term rates.

The Retirement Account Trap

The costliest version of a wash sale is selling at a loss in a taxable brokerage account and then buying the same security in an IRA or 401(k) within the 61-day window. Revenue Ruling 2008-5 confirmed that this triggers the rule and disallows the loss.4Internal Revenue Service. Revenue Ruling 2008-5

What makes this version worse is that the basis in the IRA is not increased by the disallowed loss.4Internal Revenue Service. Revenue Ruling 2008-5 There’s no future sale where the loss comes back. It’s permanently forfeited. The ruling covers both traditional and Roth IRAs, because the underlying logic is the same: tax-advantaged accounts don’t permit basis adjustments under Section 1091(d). If you hold the same security in a taxable account and a retirement account, and you’re contributing to or rebalancing the retirement account during the same period you’re harvesting losses, this is easy to trigger by accident.

What the Rule Doesn’t Cover

A few situations reasonable people assume are inside the rule but aren’t, and a few that are.

Cryptocurrency

Section 1091 applies to “stock or securities.” Cryptocurrency and other digital assets fall outside that definition, so you can sell Bitcoin at a loss and immediately repurchase it without triggering a disallowance.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Congressional proposals to extend the rule to digital assets have circulated for years and remain under discussion, but nothing has been enacted as of 2026.

Spousal and Related-Party Accounts

Section 1091 applies to the “taxpayer,” and courts have historically read that term narrowly. The statute does not explicitly require you to account for purchases made by your spouse, dependents, or entities you control, so a strict textual reading suggests a spouse could buy the same stock you just sold at a loss without triggering the rule. In practice it’s riskier than it sounds. The IRS has argued, and some courts have agreed, that when one spouse exercises dominion and control over the other’s account, the trades belong to a single taxpayer. Brokerage firms also flag wash sales across accounts in the same household, which creates reporting friction even where the legal argument is debatable. Legislative proposals to formally cover spouses, dependents, controlled entities, and family retirement accounts have been introduced repeatedly without passing.

Short Sales

Losses from closing a short sale are covered. Under Section 1091(e), if you close a short at a loss and either sell substantially identical stock or open another short of substantially identical securities within the 61-day window around the closing date, the loss is disallowed.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Basis adjustment and holding period rules apply the same way.

Professional Traders With a Mark-to-Market Election

Investors who qualify as traders in securities and elect mark-to-market accounting under Section 475(f) are exempt from Section 1091 on their trading securities, because Section 475(d)(1) says so directly.5Office of the Law Revision Counsel. 26 USC 475 – Mark to Market Accounting Method for Dealers in Securities The election converts all gains and losses to ordinary income, must be filed by the due date (without extensions) of the return for the year before it takes effect, and requires frequent, substantial, and continuous trading activity to qualify.6Internal Revenue Service. Topic No. 429, Traders in Securities Most individual investors don’t qualify.

Harvesting Losses Without Triggering the Rule

The cleanest approach is to wait 31 days before repurchasing the same security. That leaves you exposed to price moves for a month, which is why many investors trip up by buying back too early.

The common workaround is to replace the sold security with something similar but not substantially identical. Sell an S&P 500 index ETF at a loss and buy a Russell 1000 index ETF while the clock runs. The two indexes overlap heavily but aren’t identical, and the ETFs come from different providers tracking different benchmarks. After the window closes you can swap back.

Watch for a few things during the waiting period:

  • Turn off DRIPs on the sold security before executing the loss sale.
  • If your 401(k) or IRA holds the same security, make sure no scheduled purchases occur during the 61-day window.
  • Coordinate with your spouse on any planned trades in the same security to avoid IRS challenges and brokerage reporting complications.

Reporting on Your Tax Return

Wash sales go on Form 8949, which covers sales and exchanges of capital assets. Each transaction gets its own line. In column (f), you enter adjustment code “W” to flag the transaction. In column (g), you enter the disallowed loss as a positive number, which offsets the loss shown in column (e).7Internal Revenue Service. Instructions for Form 8949 The totals flow onto Schedule D.

Your brokerage will report wash sales it detects on Form 1099-B, with the disallowed amount in box 1g. But brokerages only track wash sales within their own accounts and only for covered securities with matching CUSIP numbers bought and sold in the same account.2Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses If you trade the same security across multiple brokerages, or trigger a wash sale between a taxable account at one firm and a retirement account at another, identifying and reporting the adjustment is your job. The IRS won’t get an automatic flag from the broker.

Missing a wash sale adjustment can draw a 20% accuracy-related penalty on the resulting underpayment if the IRS finds negligence or disregard of the rules, plus interest from the original due date.8Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments Given how easily cross-account wash sales slip through, a running log of every sale and purchase date for every security across every account is the safeguard that actually works.