The wash-sale rule[1] disallows a capital loss if you buy the same or substantially identical security within 30 days before or after the loss sale — a 61-day window. The disallowed loss is added to your replacement security's cost basis,[2] deferring (not eliminating) the tax benefit. The rule also reaches purchases in your IRA or Roth IRA, which can permanently destroy the loss.[4]
The Statutory Rule: IRC §1091
IRC §1091(a)[1] states: "In the case of any loss claimed to have been sustained from any sale or other disposition of shares of stock or securities where it appears that, within a period beginning 30 days before the date of such sale or disposition and ending 30 days after such date, the taxpayer has acquired (by purchase or by an exchange on which the entire amount of gain or loss was recognized by law), or has entered into a contract or option so to acquire, substantially identical stock or securities, then no deduction shall be allowed under section 165."
Key elements:
- 61-day window: 30 days before + day of sale + 30 days after
- Trigger: Purchase OR entering into a contract or option to purchase
- Result: Loss disallowance (not permanent loss — deferred to replacement security)
- Applies to: Stocks, securities, mutual funds, and ETFs (not currently to crypto or real estate)
How the Basis Adjustment Works
When a wash sale occurs, the disallowed loss adjusts the replacement security's cost basis upward, and the original security's holding period transfers to the replacement (IRC §1091(d)).[2]
Detailed example:
- October 1: Buy 100 shares of ABC at $50/share (basis = $5,000)
- November 5: Sell 100 shares of ABC at $35/share (proceeds = $3,500; loss = $1,500)
- November 20: Buy 100 shares of ABC at $36/share (within 30 days — wash sale!)
Result:
- The $1,500 loss is disallowed on November 5 sale
- Adjusted basis of new shares: $3,600 (purchase price) + $1,500 (disallowed loss) = $5,100
- Holding period of new shares includes the 35 days you held the original shares (October 1 to November 5), so it is treated as starting 35 days before November 20
If you then sell the replacement shares on December 5 at $40/share:
- Proceeds: $4,000
- Adjusted basis: $5,100
- Loss: $1,100 (the full embedded loss is now deductible)
What "wash sale loss disallowed" on Form 1099-B means
Box 1g of Form 1099-B, "Wash sale loss disallowed," is the part of a loss that your broker has treated as disallowed under section 1091. Brokers must fill it in when the sale and the repurchase happen in the same account and involve covered securities with the same CUSIP number. They may, but do not have to, report other wash sales, such as a repurchase in a different account. The broker adds the box 1g amount to the basis of the shares you bought.[6]
The IRS uses this example in its instructions for brokers: Alex buys 100 shares for $1,000 in September 2026 and sells them for $600 in October 2026. Within 30 days of the sale, Alex buys 75 shares with the same CUSIP number in the same account.[6]
| Line | Amount |
|---|---|
| Proceeds (box 1d) | $600 |
| Cost or other basis (box 1e) | $1,000 |
| Loss on the sale ($600 − $1,000) | ($400) |
| Wash sale loss disallowed (box 1g): the loss on the 75 shares bought back, 75 ÷ 100 × $400 | $300 |
| Loss Alex can deduct now: the 25 shares not bought back | ($100) |
| Added to the basis of the 75 new shares | $300 |
When fewer shares are bought back than were sold, only the matching number of shares is a wash sale.[3] The other $100 of the loss is not affected.
How to report box 1g on Form 8949
Report the sale on Form 8949 with code W in column (f) and the disallowed loss as a positive number in column (g).[7] Column (h) is the proceeds minus the basis, adjusted by column (g). For Alex that is $600 − $1,000 + $300, a loss of $100, entered as (100).[7]
If box 1g is wrong, for example because it leaves out a repurchase in another account, enter the correct disallowed loss in column (g). If your amount is less than the amount in box 1g, attach a statement explaining the difference.[7] Brokers only have to report wash sales inside one account, so you still need to check purchases in your other accounts, in your IRA or Roth IRA, and by your spouse.[3][4]
IRA Purchases and Permanent Loss Destruction
IRS Revenue Ruling 2008-5[4] holds that the wash-sale rule applies when you sell at a loss in a taxable account and buy substantially identical securities in your IRA or Roth IRA within the window. The mechanics differ significantly from taxable account wash sales:
- The loss is still disallowed in the taxable account
- The disallowed loss CANNOT be added to the IRA's basis (IRA basis rules are separate under IRC §408 and §408A)
- The loss is permanently lost — neither deductible now nor in the future
This is one of the most dangerous wash-sale traps. A taxpayer who sells a losing position in a taxable account and then buys the same fund in their 401(k) or IRA within 30 days can destroy the loss permanently. Rev. Rul. 2008-5[4] addresses IRAs only; the IRS has not ruled on purchases inside a 401(k), so many advisers apply the same caution there.
Strategies to Avoid the Wash-Sale Rule
- Wait 31 days: Do not repurchase the same or substantially identical security for at least 31 days after the sale. This maintains the tax loss but leaves you out of the market for a month.
- Buy a similar-but-different ETF: Sell a Vanguard Total Stock Market ETF (VTI) and immediately buy a Schwab Total Stock Market ETF (SCHB) — different issuers, nearly identical exposure, likely not substantially identical. (This remains a gray area; the IRS has not issued a definitive ruling.)
- Switch to individual stocks: Sell an S&P 500 index ETF and buy 20–30 individual S&P 500 stocks to maintain broad market exposure without triggering a wash sale.
- Track all accounts: Run wash-sale checks across your taxable accounts AND any IRAs or 401(k) plans where you or your spouse trade — the rule is household-wide.
Year-End Wash-Sale Planning
The 30-day window does not stop at year-end. A loss sale in late December followed by a repurchase in early January is still a wash sale: the loss is disallowed on the current year's return and added to the basis of the January shares. Purchases in the 30 days before the sale count too, including automatic dividend reinvestments. If you want the loss on this year's return, avoid buying substantially identical securities from 30 days before the sale through 30 days after it.
See our companion guide on tax-loss harvesting strategy and use our capital gains tax calculator to model how harvested losses reduce your total capital gains tax bill.