The wash sale rule under IRC §1091 disallows a capital loss when you sell a security at a loss and acquire substantially identical securities within 61 days - 30 days before the sale through 30 days after. The disallowed loss is not permanently lost: it is added to the basis of the replacement securities, deferring the loss until the replacement position is sold. The rule applies to stocks, bonds, options on stocks, and most securities. Cryptocurrency is currently exempt because the IRS treats digital assets as property, not securities. That exemption may not be permanent.
Window: 61 days total - 30 days before the loss sale, the day of the sale, and 30 days after.
Trigger: Purchasing substantially identical securities within that window - by buying in a taxable account, an IRA, a Roth IRA, or through a spouse's account.
Result: The loss is disallowed for the current year.
What happens to the loss: The disallowed amount is added to the cost basis of the replacement securities. The loss is not gone - it is deferred until the replacement position is eventually sold outside the wash sale window.
Holding period: The holding period of the original (sold) shares is tacked on to the replacement shares, which can affect whether the eventual gain or loss is long-term or short-term.
The IRS has not issued comprehensive regulations defining substantially identical for modern financial instruments. The principle is whether the securities represent the same economic position. Clear cases: buying and selling the exact same shares of the same company is always a wash sale. Options and contracts to acquire the same stock also count under IRC §1091(e).
More complex cases: convertible bonds of the same issuer may be substantially identical to the common stock. Two different S&P 500 index funds from different providers are generally not substantially identical even though they track the same index - they are separate legal securities issued by different entities. A bond and the stock of the same company are not substantially identical.
The wash sale rule applies across all accounts - not just within a single taxable account. Under IRC §1091(e), if you sell stock at a loss in your taxable account and purchase the same stock within 30 days in your IRA or Roth IRA, the loss is disallowed. Worse: unlike the taxable account wash sale where the loss is added to the replacement basis, when the replacement purchase is in an IRA, the disallowed loss disappears permanently. The basis adjustment mechanism does not work across account types into tax-advantaged accounts. There is no recovery of the deferred loss.
The 30-day-after window extends into the new year. If you sell a security at a loss on December 20, you cannot repurchase the same security before January 19 without triggering a wash sale. Many investors sell in late December to harvest losses for the current tax year and then repurchase in January believing the new year resets the window. It does not. The disallowance window follows the calendar, not the tax year.
The IRS treats cryptocurrency as property under Notice 2014-21, not as stock or securities. Because §1091 applies only to "stock or securities," cryptocurrency transactions are currently not subject to the wash sale rule. A Bitcoin holder can sell at a loss and immediately repurchase the same amount of Bitcoin without disallowance. This is not a planning strategy endorsed as permanent - Congress has repeatedly proposed extending wash sale treatment to digital assets. Several provisions in draft versions of OBBBA would have applied §1091 to digital assets, but those provisions did not survive into the final enacted law (P.L. 119-21). The current window is a legislative gap, not a settled design choice.