Mortgages & Refi · A US Finance Report
How the IRS Wash-Sale Rule Disallows Your Loss on Substantially Identical Stock
The IRS wash-sale rule disallows a loss when you sell stock or securities at a loss and buy substantially identical ones within 30 days before or after that sale.
If you sell a stock at a loss and buy it — or something close enough to it — right back, the IRS may not let you deduct that loss. This is the wash-sale rule, which disallows a loss when you sell or trade stock or securities at a loss and, within 30 days before or after that sale, buy substantially identical stock or securities, acquire them in a fully taxable trade, acquire an option or contract to buy them, or acquire substantially identical stock for an IRA or Roth IRA.
What counts as a wash sale
IRS Publication 550 defines a wash sale as selling or trading stock or securities at a loss and, within 30 days before or after that sale, buying substantially identical stock or securities, acquiring them in a fully taxable trade, acquiring an option or contract to buy them, or acquiring substantially identical stock inside an IRA or Roth IRA. The Securities and Exchange Commission's investor education site describes a wash sale as selling or trading securities at a loss and, within 30 days before or after, buying substantially identical securities, acquiring them in a fully taxable trade, or acquiring an option or contract to buy them, and it points back to the IRS publication for further details. The rule is codified at 26 U.S.C. Section 1091(a), which denies the loss deduction under Section 165 when substantially identical stock or securities are acquired within that 30-day-before/30-day-after window, unless the taxpayer is a dealer whose loss arises in the ordinary course of their dealing business. Notice the window is 61 days total — 30 days before the sale, the sale date itself, and 30 days after — so a trade you make weeks before you even realize a loss can still trigger the rule.
Worked example: the $250 loss that disappears
In IRS Publication 550's own example, a taxpayer buys 100 shares of X stock for $1,000, later sells those shares for $750 — a $250 loss — and then, within 30 days of that sale, buys 100 shares of the same stock for $800. Because the repurchased shares are substantially identical to what was sold, the $250 loss cannot be deducted on that year's return. The loss doesn't just vanish, though. The IRS has the taxpayer add the disallowed $250 to the $800 cost of the new shares, producing a basis of $1,050 in the replacement stock, unless those replacement shares were bought inside an IRA or Roth IRA, in which case no basis increase is allowed and the disallowed loss is lost for good.
- purchase price: 1000
- sale price: 750
- Formula: purchase price - sale price
- Result: 250
Worked example
- purchase price: 1000
- sale price: 750
- Formula: purchase price - sale price
- Result: 250
Worked example
- new purchase cost: 800
- disallowed loss: 250
- Formula: new purchase cost + disallowed loss
- Result: 1050
What "substantially identical" actually means
There's no bright-line test for what makes two securities substantially identical — the IRS says it depends on the facts and circumstances of each case. As a general rule, stock of one corporation is not considered substantially identical to stock of a different corporation. That general rule has conditions attached to it: convertible preferred stock or bonds of the same corporation can still count as substantially identical to that corporation's common stock when the preferred shares carry matching voting rights, similar dividend restrictions, a price that tracks the conversion ratio, and unrestricted convertibility. One clear exception involves reorganizations: stock of a predecessor corporation and stock of its successor corporation may be treated as substantially identical. The rule also closes an obvious workaround — if you sell stock at a loss and your spouse, or a corporation you control, buys substantially identical stock, that still counts as a wash sale.
Your holding period doesn't reset
One detail people miss: when a wash sale disallows your loss, the holding period for the new, replacement shares includes the time you held the original shares you sold. In practice, that means if you held the original stock for eleven months before selling at a loss and then immediately bought it back, the replacement shares inherit that eleven months rather than starting a fresh clock.
How to report it on your return
- Identify any sale where you bought substantially identical stock or securities within 30 days before or after the sale date.
- Report the transaction in Part I or Part II of Form 8949, with the appropriate box checked, filling in all columns.
- Enter the code "W" in column (f) of Form 8949 to flag it as a wash sale.
- Enter the disallowed loss amount as a positive number in column (g) of Form 8949.
- Check whether your broker already flagged it: Form 1099-B box 1g shows a disallowed wash-sale loss, but only when the sold securities were covered securities and the repurchased securities carried the same CUSIP number and were bought in the same account.
- Remember that the loss stays nondeductible even if your broker's 1099-B never reports it, so you're responsible for catching wash sales across accounts yourself.
- Covered securities only: box 1g applies only when the stock or securities sold were classified as covered securities.
- Same CUSIP required: the replacement stock or securities must carry the same CUSIP number as what was sold.
- Same account required: the repurchase must happen in the same brokerage account as the original sale.
- Gap in coverage: a wash sale across two different brokers, or between a taxable account and an IRA, generally won't appear in box 1g at all, yet the loss is still disallowed under the law,.
Form 1099-B box 1g only catches a narrow slice of wash sales — same CUSIP, same account. Trades split across brokers or different account types need manual review.
Key takeaways
- A wash sale disallows a loss when you sell stock or securities at a loss and buy substantially identical ones within 30 days before or after, whether through a direct purchase, a taxable trade, an option, or inside an IRA.
- The disallowed loss isn't lost forever for non-IRA replacement purchases — it gets added to the cost basis of the replacement shares, as in the Publication 550 example where $250 of disallowed loss raised the new basis to $1,050; no basis adjustment is allowed when the replacement shares were instead bought inside an IRA or Roth IRA.
- "Substantially identical" has no fixed test; different companies' stock is usually not substantially identical, but predecessor/successor shares in a reorganization can be an exception.
- Purchases by a spouse or by a corporation you control can trigger the rule just as if you'd bought the shares yourself.
- Your holding period carries over to the replacement shares rather than restarting.
- Brokers only flag some wash sales on Form 1099-B box 1g, so you must still track and report cross-account or cross-CUSIP wash sales yourself using Form 8949,.
Does the wash-sale rule apply if I sell at a loss and buy a completely different company's stock?
Generally no. The IRS treats stock of one corporation as ordinarily not substantially identical to stock of a different corporation, so swapping into an unrelated company's shares typically avoids the rule. An exception exists for reorganizations, where predecessor and successor corporation stock may still be considered substantially identical.
What if my spouse buys the stock back instead of me?
It still counts. If you sell stock at a loss and your spouse, or a corporation you control, buys substantially identical stock, Publication 550 treats that as a wash sale too.
Can I avoid the wash sale by buying the replacement shares in my IRA instead of my brokerage account?
No — buying substantially identical stock for your IRA or Roth IRA within the 30-day window is explicitly listed as one of the ways a wash sale can occur. In that case, the usual fix of adding the disallowed loss to your replacement shares' basis isn't available, since no basis adjustment is allowed when the replacement shares were bought inside an IRA or Roth IRA.
Will my broker always catch a wash sale for me on my 1099-B?
Not always. Box 1g only shows a disallowed wash-sale loss when the securities sold were covered securities and the repurchased securities had the same CUSIP number and were bought in the same account. Even when it's not reported that way, the loss remains nondeductible.
Does buying back the stock restart how long I've held it for tax purposes?
No. Your holding period for the replacement stock includes the period you held the original stock you sold, so it does not reset to zero.
The wash-sale statute, 26 U.S.C. Section 1091(a), carves out an exception for dealers in stock or securities when the loss arises in the ordinary course of their dealing business. For everyday investors who aren't securities dealers, this exception doesn't apply, and the full 30-day-before/30-day-after window governs any loss claimed on a sale.
Sources
Don't miss the next report. Tuesdays, with the math.
Free. Cancel from any email, anytime. Includes clearly marked offers from our partners.
More from Mortgages & Refi
Mortgages & Refi
How the IRS Decides if You're an Employee or Independent Contractor
By The US Finance Desk
Mortgages & Refi
How the IRS Calculates Estimated Tax Underpayment Penalties on Form 2210
By The US Finance Desk
Mortgages & Refi
Regulation Z and APR Disclosure: Verification Pending
By The US Finance Desk
Mortgages & Refi
PMI Removal Math: How to Stop Paying Mortgage Insurance Years Early
By The US Finance Desk