Wash Sale Rule
IRS Publication 550 says a wash sale occurs when you sell or trade stock or securities at a loss and, within 30 days before or after the sale, buy or otherwise acquire substantially identical stock or securities. The loss cannot be deducted. The disallowed loss is added to the cost of the new stock or securities, and the holding period of the new shares includes the holding period of the shares sold. Wash sales are reported on Form 8949 with code “W” in column (f).
Maintained by Archie Chang · Rules checked against IRS Publication 550 and the Instructions for Form 8949 (for 2025 returns) November 14, 2026 · Methodology & sources
General information, not tax advice. FedRateCalc is an independent site and is not affiliated with the Internal Revenue Service.
Wash Sale Rule at a glance
| Rule | What it says | Source |
|---|---|---|
| The 30-day window | A loss sale followed by an acquisition of substantially identical stock or securities within 30 days before or after the sale | IRS Publication 550 (for 2025 returns) |
| Effect on the loss | The loss cannot be deducted, apart from a dealer’s loss in the ordinary course of business | IRS Publication 550 (for 2025 returns) |
| Basis of the new shares | The disallowed loss is added to the cost of the new stock or securities | IRS Publication 550 (for 2025 returns) |
| Holding period | The new shares’ holding period includes that of the shares sold | IRS Publication 550 (for 2025 returns) |
| Spouse or controlled corporation | A purchase of substantially identical stock by your spouse or a corporation you control is also a wash sale | IRS Publication 550 (for 2025 returns) |
| IRA purchases | Acquiring substantially identical stock for your IRA or Roth IRA is a wash sale, and the basis addition does not apply to it | IRS Publication 550 (for 2025 returns) |
| Reporting | Form 8949, Part I or Part II, code “W” in column (f), the disallowed loss as a positive number in column (g) | IRS Publication 550 (for 2025 returns) |
What counts as a wash sale
You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities.
A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you:
- Buy substantially identical stock or securities,
- Acquire substantially identical stock or securities in a fully taxable trade,
- Acquire a contract or option to buy substantially identical stock or securities, or
- Acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA.
If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale.
Substantially identical stock or securities
In determining whether stock or securities are substantially identical, you must consider all the facts and circumstances in your particular case. Ordinarily, stocks or securities of one corporation are not considered substantially identical to stocks or securities of another corporation. However, they may be substantially identical in some cases.
If the number of shares of substantially identical stock or securities you buy within 30 days before or after the sale is either more or less than the number of shares you sold, you must determine the particular shares to which the wash sale rules apply.
Basis and holding period of the new shares
If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the new stock or securities. This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold.
The text excludes item (4), the IRA or Roth IRA case, from the basis addition. Publication 550 gives this example:
You buy 100 shares of X stock for $1,000. You sell these shares for $750 and within 30 days from the sale you buy 100 shares of the same stock for $800. Because you bought substantially identical stock, you cannot deduct your loss of $250 on the sale. However, you add the disallowed loss of $250 to the cost of the new stock, $800, to obtain your basis in the new stock, which is $1,050.
Reporting a wash sale on Form 8949
Report a wash sale transaction in Part I or Part II of Form 8949 with the appropriate box checked. Complete all columns. Enter “W” in column (f). Enter as a positive number in column (g) the amount of the loss not allowed.
Report the sale or exchange on Form 8949 and enter the amount of the nondeductible loss as a positive number in column (g).
However, you cannot deduct a loss from a wash sale even if it is not reported on Form 1099-B.
The Form 8949 and Form 1099-B pages explain the forms in more detail.
Related pages
- Form 8949: where sales are reported
- Form 1099-B: the broker statement of sales
- Capital gains tax calculator: tax on gains
- Step-up in basis: another rule that changes basis
- Capital loss carryover: the yearly limit and the carryover worksheet
Wash Sale Rule questions
What is the wash sale rule?
You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities. A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you: buy substantially identical stock or securities, acquire them in a fully taxable trade, acquire a contract or option to buy them, or acquire substantially identical stock for your IRA or Roth IRA.
Does the 30 days count before the sale too?
Yes. Publication 550 says within 30 days before or after the sale. If the number of shares of substantially identical stock or securities you buy within 30 days before or after the sale is either more or less than the number of shares you sold, you must determine the particular shares to which the wash sale rules apply.
What happens to the disallowed loss?
If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the new stock or securities. This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold.
Does the wash sale rule apply to a spouse or an IRA?
If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale. Publication 550 also lists acquiring substantially identical stock for your IRA or Roth IRA as a wash sale, and the basis addition does not apply to that case.
How is a wash sale reported?
Report a wash sale transaction in Part I or Part II of Form 8949 with the appropriate box checked. Complete all columns. Enter “W” in column (f). Enter as a positive number in column (g) the amount of the loss not allowed. Report the sale or exchange on Form 8949 and enter the amount of the nondeductible loss as a positive number in column (g).
Cite this page
Page title: Wash Sale Rule: 30 Days Before or After the Sale. Updated November 14, 2026. Canonical URL: https://fedratecalc.com/wash-sale-rule/
Data source: IRS Publication 550, Investment Income and Expenses (Wash Sales); IRS Instructions for Form 8949, compiled by FedRateCalc.
Plain-text citation
FedRateCalc. Wash Sale Rule: 30 Days Before or After the Sale. Updated November 14, 2026. https://fedratecalc.com/wash-sale-rule/HTML link
<a href='https://fedratecalc.com/wash-sale-rule/'>FedRateCalc</a>Authoritative sources: IRS Publication 550, Investment Income and Expenses (Wash Sales) · IRS Instructions for Form 8949