FileTax.Com
Photorealistic image of a stock investor’s workspace showing stock charts and financial documents illustrating the wash sale rule and tax loss harvesting.

Wash Sale Rule: What It Is and How It Affects Your Stock Losses 

Updated June 12, 2026
Reviewed June 12, 2026
Fact Checked
Written by · 2 authors
  • Scott Dylan Westerlund
    Scott Westerlund
    Content Writer - Tax Law
Reviewed by

Your Takeaways:

  • The wash sale rule disallows a capital loss when you sell a security at a loss and buy a substantially identical one within 30 days before or after the sale.
  • The 61-day window includes the 30 days before, the sale date itself, and the 30 days after.
  • The disallowed loss isn't gone — it's added to the cost basis of the replacement shares and deferred until you eventually sell those shares.
  • Wash sales apply across all your accounts AND your spouse's accounts — different brokers don't help.
  • Wash sales in IRAs and other tax-advantaged accounts are even worse: the loss is permanently disallowed with no basis adjustment.
  • Cryptocurrency is NOT currently subject to the wash sale rule under IRC §1091 (which applies to "stock or securities") — though legislation has been proposed multiple times.
  • On Form 8949, wash sales are flagged with code "W" in column (f) and the disallowed loss in column (g).

TL;DR: The wash sale rule disallows a capital loss when you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale (a 61-day window). The disallowed loss isn't permanently lost — it's added to the cost basis of the replacement shares, deferring the tax benefit to a future sale. The rule applies across all your accounts (and your spouse's), and a wash sale in an IRA results in a permanent loss with no basis adjustment. Cryptocurrency is not currently subject to the wash sale rule.

What Triggers a Wash Sale?

The wash sale rule applies when you sell a stock at a loss and buy the same or a substantially identical stock within 30 days before or after the sale. Even though a loss is realized on paper, your overall investment position hasn’t meaningfully changed.

The rule is codified in Internal Revenue Code §1091 and explained in IRS Publication 550.

Without this rule, an investor could sell at a loss, claim a tax deduction, and immediately repurchase the same investment. That would reduce taxable income without any real economic loss.

To prevent this, the IRS disallows the loss for the current year. Instead, the loss is deferred and added to the cost basis of the replacement shares.

This means you don’t lose the deduction entirely, but you also can’t use it right away. Instead, it will affect your gain or loss when you eventually sell the new shares.

Avoiding wash sales requires careful tracking of trade dates, purchase activity within the 30-day window, and reinvestments that may trigger unintended violations.

Source: IRS Pub. 550, Capital Gains and Losses

Next Steps: Check out this overview of investment taxes to learn everything you need to know about your investments, and then consider downloading our Stock Sale Tax Checklist to help you keep track of your investments in the upcoming year.

Know the 61-Day Wash Sale Window

The wash sale rule disallows a loss if you buy a substantially identical security within 30 days before or after the sale date, creating a 61-day window. While this is true, taxpayers should consider the 61-day window, which includes the 30 days prior to the sale date and the sale date itself.

The wash sale rule for stocks includes a 61-day window for substantially identical purchases, so any loss is disallowed if the stock was purchased within 30 days before the date of the final sale. As the name suggests, this window also includes the literal day of the stock sale. You cannot purchase a substantially identical stock on the date you sell the identical one, either.

Pro Tip: Note that annual tax forms such as the brokerage's 1099-B will list details of disallowed losses due to wash sales. Make sure that your records match those in the 1099-B.

Source: IRS Pub. 550, Wash Sales

Next Step: One of the most important keys to making a solid investment income strategy is to fully understand how capital gains and losses work. Whether you’re just starting out or hoping to refresh your knowledge, it might be a great idea to download our First-Time Investor Tax guide to get a full overview of how investing will impact your taxes.

Defining “Substantially Identical” Securities

If you’re attempting to determine if the wash sale rule applies to your recent stock purchases, then you need to define what it means for a stock to be substantially identical to another one. Generally, purchasing the exact same stock will trigger the wash sale rule. The rule will also get triggered when a substantially identical transaction is flagged.

Examples of Substantially Identical Transactions

Transaction

Likely Wash Sale?

Sell ABC stock at a loss and repurchase the exact same stock within 30 days

Yes

Sell common stock and buy call options on the same company

Yes

Sell shares of one S&P 500 index fund and buy a different S&P 500 fund

Depends on facts and circumstances, including fund structure and tracking methodology.

Sell stock and buy convertible bonds of the same issuer

Maybe

Sell stock of Company A and buy stock of Company B

No

Sell a losing stock and buy a similar but not identical ETF

Maybe

Sell stock in a taxable account and repurchase it in an IRA

Yes (loss permanently disallowed)

Because “substantially identical” isn’t always clearly defined, the IRS may evaluate certain transactions on a case-by-case basis. When in doubt, a tax professional can help you avoid an accidental wash sale.

Source: IRS Pub. 550, Substantially Identical

Next Step: One pro tip is to download our Stock Sale Tax Checklist to keep track of your investments. When you make a sale or purchase, you can use your checklist to identify any stock within the 61-day window. This process will help you maintain a more informed investment strategy.

How a Wash Sale Affects Your Cost Basis

When a wash sale occurs, the taxpayer cannot claim the capital loss on their tax return until the stock is sold again. Instead, the taxpayer should adjust the cost basis of the newly purchased investment.

Here’s how to calculate that amount:

Original purchase price of the new shares + any commissions or fees + disallowed loss amount = New cost basis

This adjustment ensures future gains are reduced—or future losses increased—when the replacement shares are sold.

Source: IRS Pub. 550, Wash Sales

How Wash Sales Are Reported on Form 8949

Wash sales must be specifically identified on your tax return. On Form 8949 (Sales and Other Dispositions of Capital Assets):

  • Column (f) – Codes: Enter code "W" to flag the transaction as a wash sale
  • Column (g) – Adjustment amount: Enter the disallowed loss as a positive number (this offsets the loss in column (h))
  • Column (h) – Gain/(loss): The actual loss after adjustment — typically zero for the disallowed portion

If your broker has identified a wash sale on Form 1099-B, the disallowed loss amount will appear in Box 1g. Use that figure directly on your Form 8949.

Important: Brokers only track wash sales within a single account. If you triggered a wash sale across multiple brokers or with a spouse's account, you must identify and adjust the wash sale yourself — the broker won't catch it.

Next Step: If you need more details on calculating the cost basis for your stock investments, visit our cost basis page now.

Photorealistic image showing taxable and retirement investment accounts side by side, illustrating how wash sale rules apply across IRAs and multiple accounts.

Wash Sales Across Accounts (Including IRAs)

Wash sale rules apply to all taxable accounts, but there is one important difference. Unlike regular taxable accounts, a wash sale that’s triggered in an individual retirement account will result in a permanent disallowance. In other words, the owner won’t be able to defer the tax benefits or adjust the cost basis on the new purchase. If the wash sale occurs in a tax-advantaged account, then the loss is also permanently disallowed.

Wash sale rules also apply across spousal accounts, which often catches investors off guard.

A Note on Employer 401(k) Brokerage Windows

Some 401(k) plans offer a "brokerage window" allowing participants to invest in individual stocks. If you sell a stock at a loss in your taxable brokerage account, then buy the same stock in your 401(k) brokerage window within 30 days, you've triggered a wash sale.

Like an IRA wash sale, this scenario results in a permanently disallowed loss with no basis adjustment available — because the replacement shares are in a tax-advantaged account.

Always coordinate timing across all accounts (including retirement accounts) before harvesting losses.

Common Wash Sale Mistakes

The most common wash sale mistake is accidentally triggering the rule by failing to meet the 61-day window when you sell stock. Miscalculating the 30-day period or failing to consider the 30 days prior to the sale are also common mistakes that result in a disallowed loss.

Another major mistake is forgetting that your spouse’s investment purchases count towards the substantially identical purchases for the wash sale rule. Don’t forget to also consider cross-accounts and investments that differ but are still sufficiently similar to trigger the rule.

Next Step: Avoid common wash-sale mistakes to maximize your tax position. From there, you can start investigating other types of tax strategies, like tax loss harvesting, to really level up.

Cryptocurrency and the Wash Sale Rule

As of the current tax year, the wash sale rule does not apply to cryptocurrency.

The wash sale rule under IRC §1091 specifically references "stock or securities." The IRS treats cryptocurrency as property (per Notice 2014-21), not as a security, so wash sale rules don't currently apply.

Practical implication: Crypto investors can sell at a loss and immediately repurchase the same coin to maintain market exposure, while still claiming the loss for tax purposes. This is a unique tax-loss harvesting opportunity not available to stock investors.

Caution: Legislation extending wash sale rules to digital assets has been proposed multiple times (most recently in the 2021 Infrastructure Investment and Jobs Act, which ultimately did not include the provision). Verify current law before relying on this strategy.

Avoiding the Wash Sale Rule to Maximize Your Tax Situation

Avoiding the wash sale rule should be an important part of your investment strategy. If a wash sale occurs, there are no IRS penalties. The loss is simply disallowed or deferred under the wash sale rules. You will receive the tax benefits of your stock sale the next time you sell the same stock.

When planning transactions to manage investment taxes, timing and asset selection matter just as much as performance. Investors often attempt to offset capital gains by selling securities at a loss, but the sale date determines whether those losses can be used to offset gains or are disallowed under wash-sale rules.

Shifting exposure among different asset types, such as mutual funds, exchange-traded funds, or preferred stock, may help investors offset gains while staying invested without triggering substantially identical purchases. Pairing capital losses with available tax deductions can further reduce overall tax liability, but these strategies require careful coordination. As portfolios become more complex, consulting a qualified tax professional can help ensure losses are applied correctly and in compliance with IRS rules.

Are you new to investing in stocks? If so, avoiding the wash sale rule is only one factor in your overall strategy that could affect your tax position. To get a full, detailed guide on everything you need to know and how to get started, download our first-time investor tax guide.

This article is for educational purposes only and does not constitute tax, legal, or financial advice. Tax laws and dollar thresholds referenced are current as of the last reviewed date shown above and may change. For guidance on your specific situation, consult a qualified tax professional.

Filed Under:

See what some of the hundreds of thousands of satisfied customers have to say about our services:

Levi C

Levi C.

VERY FAST

I got approved within a couple of days for my tax extension filing through these guys, and they responded to my email the same day. Great customer service and fast results. Give them a shot.

LaMontica

LaMontica

Great Service!!

This is the second year that I have used this service. Each time, the process was quick, easy, and efficient. I will definitely be using this service in the future and will recommend it to friends and family.

Chezbie

Chezbie

Fantastic Site!!

The process was so easy. I processed this extension in a matter of minutes! For you last-minute filers out there, come here. It'll help you end your long day in peace!

Why Trust FileTax.com

• Written and reviewed by qualified tax professionals, including CPAs and tax law reviewers

• Reviewer and contributor profiles include credentials, expertise, and verification information

• Content is reviewed for tax accuracy, compliance, and clarity before publication

• Based on IRS guidance, state tax agencies, and current tax law updates

• Editorial standards and review processes are publicly documented

Links

Editorial Standards

Customer Reviews

IRS Authorized e-File Provider Verification

Wash Sale Rule FAQs: Stocks, Losses, and Tax Strategies

As outlined above, the wash sale rule prevents investors from claiming a loss when they repurchase substantially identical securities within 61 days. When a wash sale occurs, the loss becomes a disallowed loss for tax purposes.