The wash sale rule (IRS Section 1091) disallows a loss deduction if you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares, deferring rather than eliminating the loss. The rule applies to stocks, bonds, mutual funds, ETFs, and options. It does not currently apply to cryptocurrency. Violations are reported on Form 8949.
61 DaysWash Sale Window
Sec. 1091IRS Code Section
DeferredLoss Treatment
Form 8949Reporting Form

What Is the Wash Sale Rule?

The wash sale rule is an IRS regulation codified in Section 1091 of the Internal Revenue Code that prevents taxpayers from claiming a tax loss deduction on the sale of a security if they repurchase the same or a substantially identical security within a specific timeframe. The rule is designed to prevent investors from selling securities at a loss for tax purposes while maintaining their investment position in the same security.

When a wash sale occurs, the loss is disallowed for tax purposes in the current year. Instead, the disallowed loss is added to the cost basis of the replacement shares that triggered the wash sale. This mechanism defers the loss recognition until the replacement shares are eventually sold in a non-wash sale transaction. The holding period of the replacement shares also includes the holding period of the original shares.

The wash sale rule applies broadly to transactions involving stocks, bonds, mutual funds, exchange-traded funds (ETFs), options, and other securities. It applies to both direct purchases and indirect purchases through reinvestment plans, dividend reinvestment programs (DRIPs), and margin accounts. The rule applies regardless of whether the sale was intentional or accidental.

Importantly, the wash sale rule does not currently apply to cryptocurrency, NFTs, or other digital assets, as these are classified as property rather than securities under current IRS guidance. However, proposed legislation has sought to extend the wash sale rule to digital assets, and this may change in future tax years.

The 30-Day Window Explained

The wash sale rule examines a 61-day window around the date of sale: 30 days before the sale, the day of the sale, and 30 days after the sale. If you purchase a substantially identical security at any point during this window, the loss from the sale is disallowed. The window is symmetrical because the IRS wants to prevent both advance planning (buying replacement shares before selling) and post-sale repurchases.

The full 61-day window breaks down as follows:

  • Day -30 to Day -1: Any purchase of a substantially identical security within the 30 days before the sale will trigger a wash sale. This prevents investors from buying replacement shares in advance, then selling the original shares at a loss.
  • Day 0: The sale date itself. If you sell shares at a loss and repurchase the same security on the same day, it is a wash sale.
  • Day +1 to Day +30: Any purchase within the 30 days after the sale will trigger a wash sale. This is the most common scenario — selling at a loss, then buying back within 30 days because the price drops further or the investor wants to maintain exposure.

The wash sale rule also considers purchases made by your spouse or a corporation you control. If your spouse buys the same stock within the 61-day window, it can trigger a wash sale on your loss. Similarly, purchases by a controlled corporation or partnership are attributed to you for wash sale purposes. This rule prevents taxpayers from using related parties to circumvent the restriction.

The rule applies to the specific shares sold, not the entire position. If you sell 100 shares at a loss but also hold 200 additional shares of the same security, you can still claim the loss on shares that are not matched with replacement purchases within the window. Brokers are required to track wash sales and report adjusted cost basis to the IRS on Form 1099-B.

ScenarioActionWash Sale?Explanation
Buy on Jan 1, Sell at loss on Jan 25No purchase within 30 daysNoOnly 24 days after purchase, but no repurchase within 30 days of sale
Sell at loss on Jan 25, Buy on Feb 5Purchase within 30 days after saleYesRepurchase occurred 11 days after the loss sale
Sell at loss on Jan 25, Buy on Dec 1Purchase more than 30 days after saleNoRepurchase is well outside the 61-day window
Buy on Jan 10, Sell at loss on Jan 25Purchase within 30 days before saleYesThe initial purchase was 15 days before the loss sale

Substantially Identical Securities

The term "substantially identical" is a key concept in the wash sale rule, and it is intentionally broad. The IRS has not provided a definitive list of what constitutes substantially identical securities, but IRS rulings and court cases have established several guiding principles. Understanding what counts as substantially identical is essential for avoiding inadvertent wash sales.

At the most basic level, the same security from the same issuer is always substantially identical. For example, selling Apple (AAPL) common stock and repurchasing Apple (AAPL) common stock is a wash sale. Selling shares of a specific mutual fund and repurchasing the same mutual fund is also a wash sale. These straightforward cases are automatically flagged and tracked by brokerage firms.

For bonds and convertible securities, the analysis is more nuanced. Bonds from the same issuer with different coupon rates or maturity dates may not be substantially identical, though those with very similar terms may be. Convertible securities and the underlying stock into which they convert can be substantially identical, especially when the conversion right is currently exercisable and the price relationship makes conversion likely.

For options and derivatives, purchasing a call option on a stock within 30 days of selling the same stock at a loss can trigger a wash sale because the option gives you the right to acquire substantially identical stock. Similarly, selling a put option and letting it expire within the window can trigger complications. The IRS has ruled that options on the same security and with terms very close to each other may be substantially identical.

For ETFs and index funds, the analysis is generally that two ETFs tracking different indices (e.g., S&P 500 vs. Total Stock Market) are NOT substantially identical because their holdings and performance differ. However, selling an S&P 500 ETF and buying a different S&P 500 ETF from another provider may be considered substantially identical. The IRS has not issued clear guidance on this, so conservative investors treat any ETF tracking the same index as substantially identical.

If you are uncertain whether two securities are substantially identical, consult a tax professional. The penalties for incorrectly claiming a loss that the IRS considers a wash sale can include interest and accuracy-related penalties, in addition to the reversal of the claimed deduction.

Calculating Disallowed Loss and Adjusted Basis

When a wash sale is triggered, the disallowed loss must be calculated and the adjusted basis of the replacement shares must be determined. These calculations are critical for accurate tax reporting and ensuring that the deferred loss is eventually recognized when the replacement shares are sold.

The disallowed loss is calculated as the lesser of:

  • The actual loss realized on the sale of the original shares, or
  • The difference between the purchase price of the replacement shares and the sale price of the original shares (if the replacement shares cost more than the original sale price, the full loss may be disallowed)

Once the disallowed loss is determined, it is added to the cost basis of the replacement shares. This increases the basis of the replacement shares by the amount of the disallowed loss. The holding period of the replacement shares includes the holding period of the original shares for purposes of determining long-term vs short-term capital gain treatment.

For example, suppose you buy 100 shares of XYZ at $50 per share ($5,000 total cost). You sell those 100 shares at $40 per share ($4,000 total proceeds), realizing a $1,000 loss. Within 30 days, you repurchase 100 shares of XYZ at $45 per share ($4,500 total cost). Since you repurchased within 30 days, the $1,000 loss is disallowed. The $1,000 disallowed loss is added to the $4,500 cost basis of the replacement shares, resulting in an adjusted basis of $5,500. When you later sell those replacement shares, you will recognize the $1,000 loss (subject to wash sale rules on that future sale).

If you repurchase fewer shares than you sold at a loss, the wash sale applies proportionally. If you sold 100 shares but only repurchased 50, only 50% of the loss is disallowed (proportional to the number of shares repurchased). The remaining 50% of the loss is deductible subject to normal capital loss limitation rules.

Brokerage firms are required to track wash sales and report adjusted cost basis to the IRS on Form 1099-B. However, brokers are only required to track wash sales within the same account. Wash sales across different accounts (e.g., a taxable brokerage account and an IRA, or accounts at different brokerages) are not tracked by brokers and must be self-reported by the taxpayer.

Multiple Purchases Example

When an investor makes multiple purchases of the same security over time, wash sale calculations can become complex. The IRS uses a first-in, first-out (FIFO) approach for matching replacement shares to loss sales for wash sale purposes, unless you have specifically identified different shares (specific identification method). Understanding how multiple purchases interact is essential for active traders.

Consider this realistic example: You own shares of ABC Corp acquired on different dates. On November 1 you buy 100 shares at $100. On November 15 you buy another 100 shares at $90. On December 1 you sell the November 1 shares (100 shares) at $80, realizing a $2,000 loss. On December 10 you buy another 100 shares at $85. Because the December 10 purchase is within 30 days of the December 1 sale, it triggers a wash sale.

The $2,000 loss is disallowed and added to the basis of the December 10 shares. The December 10 shares now have an adjusted basis of $10,500 ($8,500 purchase price + $2,000 disallowed loss). If you later sell those 100 shares at $95, your recognized loss would be $1,000 ($9,500 proceeds - $10,500 adjusted basis).

The November 15 shares (100 shares at $90 cost basis) remain unaffected by the wash sale — they are not replacement shares because they were acquired before the loss sale. You still hold them with their original $9,000 basis. The wash sale only affects the shares acquired within the 61-day window.

DateActionSharesPriceCost/ProceedsBasis Adjustment
Nov 1Buy100$100$10,000 cost
Nov 15Buy100$90$9,000 cost
Dec 1Sell (Nov 1 shares)100$80$8,000 proceeds$2,000 loss disallowed
Dec 10Buy (replacement)100$85$8,500 costAdjusted basis = $10,500

If you have multiple purchases at different prices within the 61-day window, each purchase is matched in chronological order against the loss sale. Complex situations with multiple lots and partial sales may require professional tax software or a qualified tax preparer to ensure accurate calculations.

Wash Sales in IRAs

Wash sales involving IRAs (Individual Retirement Accounts) are particularly problematic because the interaction between taxable accounts and tax-advantaged retirement accounts creates a unique trap for investors. The wash sale rule applies to purchases in any account, including IRAs, if the purchase occurs within the 61-day window of a loss sale in a taxable account.

Here is how it works: If you sell shares of a security at a loss in your taxable brokerage account and purchase substantially identical shares in your IRA (traditional, Roth, SEP, or SIMPLE) within 30 days before or after the sale, the wash sale rule is triggered. The loss from the taxable account sale is disallowed.

The critical problem with IRA wash sales is what happens to the disallowed loss. In a normal wash sale between taxable accounts, the disallowed loss is added to the cost basis of the replacement shares in the taxable account, and the loss is deferred until those shares are sold. However, when the replacement shares are in an IRA, the basis adjustment occurs inside the IRA, not in the taxable account.

When the IRA eventually distributes the funds, the distribution is taxed as ordinary income (for traditional IRAs) or not taxed (for Roth IRAs). The deferred capital loss from the wash sale is never recognized as a capital loss on your tax return. In effect, the wash sale in an IRA can permanently eliminate the ability to use that capital loss, rather than simply deferring it.

The IRS has explicitly addressed this issue in Revenue Ruling 2008-5, which confirmed that wash sales can occur between taxable accounts and IRAs. The ruling stated that the disallowed loss in such cases increases the basis of the IRA's shares, but since IRA distributions are not capital transactions, the loss may never be realized for tax purposes.

To avoid this trap, follow these rules:

  • Never buy the same or substantially identical security in an IRA within 30 days of selling it at a loss in a taxable account
  • Wait at least 31 days after a loss sale before purchasing the same security in any account
  • Turn off automatic dividend reinvestment (DRIP) in your IRA for securities you are tax-loss harvesting in your taxable account
  • Consider using different ETFs or mutual funds in your IRA vs your taxable account to avoid substantially identical issues

Crypto and NFT Wash Sales

As of the 2025-2026 tax year, the wash sale rule does not apply to cryptocurrency, digital assets, or NFTs (non-fungible tokens). The IRS treats cryptocurrencies as property for tax purposes (per IRS Notice 2014-21 and subsequent guidance), and Section 1091 specifically applies to "stocks, securities, and options" — not to property or commodities.

This distinction means that investors can:

  • Sell Bitcoin, Ethereum, or other cryptocurrencies at a loss
  • Immediately repurchase the same cryptocurrency (even the same day)
  • Claim the full capital loss on their tax return

This makes crypto particularly attractive for tax-loss harvesting — the practice of selling assets at a loss to offset capital gains and reduce tax liability. Crypto investors can harvest losses and maintain their market position simultaneously, which is not possible with securities subject to the wash sale rule.

However, the treatment of crypto wash sales may change. The Biden Administration's budget proposals and several congressional bills have included provisions to extend the wash sale rule to digital assets. The rationale is that the current exemption creates an unfair advantage for crypto investors and costs the federal government billions in lost tax revenue. If enacted, crypto wash sales would be treated identically to securities wash sales.

It is also worth noting that some crypto derivatives and ETFs (such as Bitcoin futures ETFs) may already be subject to wash sale rules because they trade on traditional securities exchanges and are classified as securities. Always check whether your specific crypto investment vehicle is classified as a security or property for tax purposes.

For NFTs, the tax treatment is similar to crypto — they are classified as property, and the wash sale rule does not currently apply. However, the IRS has signaled increasing interest in NFT tax compliance, and future guidance may change the treatment.

Reporting on Form 8949 and Schedule D

Wash sales are reported on Form 8949, Sales and Other Dispositions of Capital Assets, which flows into Schedule D (Form 1040), Capital Gains and Losses. Accurate reporting is essential because the IRS receives matching data from brokers on Form 1099-B, which includes wash sale indicators and adjusted basis information.

On Form 8949, each transaction subject to the wash sale rule must be reported in Part I (short-term) or Part II (long-term), depending on the holding period. In the column for adjustments (Column (g)), you enter the amount of the disallowed loss. The code "W" should be entered in Column (f) to indicate the transaction is a wash sale. The adjusted gain or loss (Column (h)) is carried to Schedule D.

Brokers are required to report wash sales on Form 1099-B and indicate whether the sale is subject to the wash sale rules. Box 1g of Form 1099-B shows the disallowed loss amount. If you use tax preparation software, it typically imports this data directly from your broker and automatically adjusts your Form 8949 entries. However, you are responsible for verifying the accuracy of the imported data.

If your broker does not track wash sales across multiple accounts or between taxable and IRA accounts, you must manually identify and report these transactions. This requires reviewing your trading activity across all accounts for the 61-day window around each loss sale. Failing to report a wash sale that the IRS later identifies can result in a CP2000 notice proposing additional tax, penalties, and interest.

After completing Form 8949, the totals (adjusted for wash sales) carry to Schedule D. The net capital gain or loss from Schedule D flows to your Form 1040. Remember that net capital losses are limited to $3,000 per year ($1,500 for married filing separately), with excess losses carried forward indefinitely to future tax years.

Wash Sales vs Tax-Loss Harvesting

Tax-loss harvesting is a legitimate investment strategy that involves selling securities at a loss to offset capital gains and reduce tax liability. The wash sale rule is the primary constraint on tax-loss harvesting — it prevents investors from claiming the loss while immediately re-establishing the same position. Understanding the interaction between these two concepts is critical for effective tax planning.

When done correctly, tax-loss harvesting works as follows:

  • You sell a security that has declined in value, realizing a capital loss
  • You do not repurchase the same or substantially identical security within the 61-day wash sale window
  • You may purchase a similar but not substantially identical security to maintain market exposure (e.g., selling an S&P 500 ETF and buying a Total Stock Market ETF)
  • The realized loss offsets realized capital gains (and up to $3,000 of ordinary income per year)

The key to successful tax-loss harvesting without triggering wash sales is to wait at least 31 days before repurchasing the sold security. During this waiting period, you can either stay in cash or invest in a similar but not substantially identical security. This waiting period ensures that the loss is recognized and can be used to offset gains or income.

Common tax-loss harvesting pairings that maintain market exposure without creating substantially identical issues include:

  • Selling an S&P 500 ETF and buying a Total Stock Market ETF
  • Selling a developed markets international ETF and buying a total international ETF
  • Selling a growth ETF and buying a value ETF (though this significantly changes exposure)
  • Selling a corporate bond ETF and buying a Treasury bond ETF

The wash sale rule does not prohibit all harvesting — it only restricts harvesting when you immediately repurchase the same position. By using similar but distinct securities, you can capture tax losses while maintaining your desired asset allocation. Remember to consider transaction costs, bid-ask spreads, and the impact of any market movements during the waiting period.

For more information on how capital gains and losses affect your overall tax liability, use our federal tax refund calculator.

How to Avoid Wash Sales

Avoiding wash sales requires careful planning, especially during periods of market volatility when you may be tempted to sell losers and adjust positions. Here are practical strategies to avoid triggering the wash sale rule:

1. Track Your Purchase Dates — Maintain a log of your purchase dates for each security you trade. Before selling any security at a loss, check whether you have purchased the same or substantially identical security within the previous 30 days. If you have, wait until day 31 after the most recent purchase to sell at a loss.

2. Use the 31-Day Rule — After selling at a loss, wait a minimum of 31 days before repurchasing the same security. This ensures you are outside the 30-day window and the loss is fully recognized. Set calendar reminders for each loss sale to track when you can safely repurchase.

3. Coordinate Across Accounts — Remember that wash sales can occur across different accounts, including IRAs, joint accounts, and accounts at different brokerages. If you sell at a loss in one account and repurchase in another, the wash sale still applies. Review all accounts before executing loss sales.

4. Disable Dividend Reinvestment — Automatic dividend reinvestment (DRIP) can inadvertently trigger wash sales if dividends are used to purchase shares within the 61-day window of a loss sale. During tax-loss harvesting periods, consider turning off DRIP for securities you plan to sell at a loss.

5. Be Careful with Options — Buying call options or selling put options on a security within the 61-day window can trigger a wash sale on a loss sale of the underlying security. Options are considered substantially identical to the underlying stock in many cases. Avoid options strategies on securities you are tax-loss harvesting.

6. Consider Tax-Loss Harvesting Partners — Instead of repurchasing the same security, invest in a similar but different security during the 30-day waiting period. For example, if you sell an S&P 500 ETF at a loss, buy a total US stock market ETF or a large-cap value ETF instead. This maintains market exposure without triggering a wash sale.

7. Use Specific Identification — If you hold multiple lots of the same security acquired at different times and prices, use the specific identification method when selling. This allows you to choose which lots to sell, potentially avoiding wash sales by choosing lots acquired more than 30 days ago. Inform your broker in writing of the specific shares you are selling before or at the time of the sale.

Frequently Asked Questions

The wash sale rule is an IRS regulation (Section 1091 of the Internal Revenue Code) that disallows a loss deduction on the sale of a security if you purchase a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares, effectively deferring the loss until the replacement shares are eventually sold in a non-wash sale transaction.
To avoid a wash sale, you must wait at least 31 days after selling a security at a loss before purchasing a substantially identical security. The wash sale window spans 61 days total: 30 days before the sale, the day of the sale, and 30 days after the sale. If you buy the same or substantially identical security at any point during this 61-day window, the loss is disallowed.
As of the 2025-2026 tax year, the wash sale rule does NOT apply to cryptocurrency under current IRS guidance. Cryptocurrencies and other digital assets are treated as property rather than securities for tax purposes, and the wash sale rule under Section 1091 specifically applies to stocks, bonds, and other securities. However, Congress has considered legislation to extend the wash sale rule to crypto, and this may change in future tax years.
Wash sales are reported on Form 8949, Sales and Other Dispositions of Capital Assets. For each transaction that is a wash sale, you mark Box (D) in the column to indicate the sale is subject to the wash sale rules. You enter the sales price, cost basis, and the amount of the disallowed loss (the difference between the actual loss and the allowable loss). The adjusted gain or loss is carried to Schedule D.
The disallowed loss from a wash sale is not permanently lost — it is added to the cost basis of the replacement shares. When you eventually sell the replacement shares in a non-wash sale transaction, the deferred loss is recognized. This means the wash sale rule defers the loss rather than eliminating it, unless you hold the replacement shares until death (basis step-up) or donate them to charity.
Yes. Buying substantially identical securities in an IRA within the 30-day wash sale window will trigger a wash sale. This is particularly problematic because if the replacement shares are purchased in a traditional IRA, the disallowed loss is added to the IRA's cost basis rather than being deferred to a taxable account. Since IRA distributions are taxed as ordinary income (not capital gains), the loss may never be effectively recognized as a capital loss.
Yes. The wash sale rule applies to options on stocks and substantially identical ETFs and mutual funds. Options contracts on the same underlying stock are considered substantially identical. ETFs that track the same index are generally treated as substantially identical by the IRS, so selling SPY at a loss and buying VOO within 30 days could trigger a wash sale.
Brokerages are required to track and report wash sales on Form 1099-B for identical securities held in the same account. However, wash sales across different brokerages or accounts (including a taxable account and an IRA) are not tracked by brokers — the responsibility falls on the taxpayer to identify and report these. The IRS may cross-reference trades across accounts during an audit.
Yes, wash sales only apply to loss transactions. You are free to sell a security at a gain and immediately repurchase it — no waiting period applies. This is known as tax-gain harvesting. However, be aware that recognizing gains may increase your tax liability. Some investors strategically harvest gains in years when their income is low to take advantage of the 0% long-term capital gains bracket.
The wash sale window spans 61 days total: 30 days before the sale, the day of the sale, and 30 days after the sale. If you purchase a substantially identical security at any point during this 61-day period, the loss on the sale is disallowed. This means you must wait at least 31 days after selling at a loss before repurchasing the same security to avoid the rule.
Reviewed by Krishn
K

As a tax content specialist, I verify every detail in this guide against IRS publications, including Publication 550 (Investment Income and Expenses) and the official IRS Form 8949 and Schedule D instructions. The wash sale rule under Section 1091 is one of the most commonly misunderstood tax provisions, and I update this guide each tax season to reflect changes in IRS guidance, brokerage reporting requirements, and legislative proposals regarding crypto wash sales. Understanding how to properly calculate and report wash sales is essential for any active investor.

KrishnLead Tax Content Strategist, TaxCalcHQ

Disclaimer: The wash sale rule information on this page is based on IRS Section 1091, Publication 550, and IRS Form 8949 and Schedule D instructions for the 2025-2026 tax year. Actual tax rules, basis adjustments, and filing requirements may vary based on your specific circumstances. This content is for informational purposes only and does not constitute tax advice. Consult a qualified tax professional for advice specific to your situation. TaxCalcHQ is not affiliated with the IRS or any government agency.