Wash sale rule examples usually come down to the same pattern: you sell a stock or fund at a loss, you acquire something substantially identical within 30 days before or after that sale, and the IRS disallows the loss on your current return under Section 1091 of the Internal Revenue Code.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed amount isn’t erased. In most cases it shifts onto the cost basis of the replacement shares, so you recover the tax benefit when you eventually sell those for good. The examples below walk through the situations that trip investors up, from the obvious buy-back to the ones your brokerage will never flag for you.
The Three Conditions Every Example Shares
Before the scenarios, the trigger itself. A wash sale needs all three of these:
- You sell stock or securities in a taxable account for less than your cost basis.
- You buy — or enter into a contract or option to buy — the same security or one substantially identical to it.
- The purchase falls anywhere in the 61-day window running from 30 days before the sale through 30 days after it.
The 30-days-before half of that window catches people off guard. If you add to a position on November 1 and then sell your original lot at a loss on November 20, the loss is disallowed because you acquired substantially identical shares within the 30 days leading up to the sale.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities
Example 1: The Straightforward Buy-Back
You buy 100 shares of XYZ Corp. on October 1 at $50 per share, for a cost basis of $5,000. On November 15, you sell all 100 shares at $40, taking a $1,000 loss. Ten days later, on November 25, you decide you want back in and buy 100 shares at $41 ($4,100 total).
The repurchase falls squarely inside the 61-day window, so the full $1,000 loss is disallowed for the current year. Your replacement shares get a new basis of $5,100 — the old $5,000 basis plus the $100 by which the repurchase price exceeded the sale proceeds.2eCFR. 26 CFR 1.1091-2 – Basis of Stock or Securities Acquired in Wash Sales When you eventually sell those shares, that inflated basis reduces your gain or enlarges your loss.
The holding period of the original shares also tacks onto the replacement lot. If you’d held the original 100 shares for eight months, those months count when you sell the replacement shares, which can convert a short-term result into a long-term one.3Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property
Example 2: Buying Back Only Part of the Position
You own 200 shares of ABC Inc. purchased at $100 apiece ($20,000 basis). On December 1 you sell all 200 at $90, realizing a $2,000 loss. On December 15 you repurchase only 100 shares at $91.
Because you replaced half of what you sold, half the loss is disallowed. $1,000 gets added to the basis of the 100 replacement shares (raising it from $9,100 paid to $10,100). The other $1,000 remains a valid capital loss you can report on Schedule D.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities
If you’d bought more than 200 replacement shares, the entire $2,000 loss would be disallowed. When multiple lots are involved, Publication 550 requires matching replacement shares to sold shares in the order you acquired the replacements.4Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses
Example 3: Your Spouse or Another Account Does the Buying
You sell 500 shares of MNO Corp. from your individual brokerage account on January 5 at a $2,500 loss. On January 20, your spouse buys 500 shares of MNO in a separate joint account. The $2,500 loss is disallowed, and the disallowed amount gets added to the basis of the shares in the joint account.
The rule reaches across accounts and across spouses. That matters because your brokerage will not warn you. Brokers are only required to report wash sales involving identical securities inside the same account. Sell at Fidelity, repurchase at Schwab, and neither 1099-B will flag the transaction. Sell in your account and let your spouse repurchase in theirs, and again nothing gets flagged. You have to catch it and make the adjustment yourself on Form 8949.5Internal Revenue Service. Instructions for Form 8949 (2025)
Example 4: A Dividend Gets Reinvested
You don’t need to place a trade to trigger a wash sale. Sell mutual fund shares at a loss, and if the fund pays a distribution that gets automatically reinvested within 30 days, those reinvested shares count as a repurchase of substantially identical securities. The loss matched to the reinvested amount is disallowed.
The fix is boring but effective: turn off automatic reinvestment before you harvest a loss near a distribution date, or shift your sale outside the 30-day window around it.
Example 5: You Replace Stock With an Option
Section 1091 covers contracts and options to acquire stock, not just the stock itself.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Sell shares at a loss on March 10 and buy a call option on the same stock on March 25, and you’ve triggered a wash sale. The disallowed loss folds into the cost basis of the option contract rather than any stock.
Short sales work symmetrically. Close a short at a loss and re-establish a short on the same security within 30 days, and the loss is disallowed. The direction of your exposure doesn’t matter; re-establishing it inside the window does.
Example 6: The IRA Purchase That Destroys the Loss
This is the costliest wash sale example. You sell a stock at a loss in your taxable brokerage account on February 1. Ten days later, your IRA buys the same stock. The loss is disallowed under Section 1091 — and unlike every other example above, you get no basis adjustment to recover it later.6Internal Revenue Service. Rev. Rul. 2008-5
The reason is structural. Basis inside an IRA doesn’t function the way basis works in a taxable account, because IRA distributions are taxed under different rules entirely. The basis adjustment mechanism has nowhere to attach. The IRS confirmed in Revenue Ruling 2008-5 that the IRA’s basis is not increased and the loss is permanently gone. The same logic applies to Roth IRAs and 401(k) plans. If you’re harvesting losses in a taxable account, make sure no retirement account is buying the same security anywhere near the sale.
What Counts as “Substantially Identical”
Every example above depends on this phrase, and the IRS defines it by “all the facts and circumstances” rather than a bright line. Publication 550 provides the useful anchors.4Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses
Shares of the same company’s stock are always substantially identical to each other — sell Apple, buy Apple, wash sale. Stocks of different corporations ordinarily are not, so selling Apple and buying Microsoft is not a wash sale. Bonds or preferred stock of a company usually aren’t identical to that same company’s common stock, unless the preferred is convertible into common, carries the same voting rights, and trades close to the conversion ratio; then the IRS treats them as substantially identical.
Funds are the gray area. Selling one S&P 500 index fund and buying a different S&P 500 index ETF is difficult to defend as non-identical, because the holdings overlap almost entirely. Two funds tracking different indexes — say an S&P 500 fund and a total stock market fund — stand on stronger ground. No published test settles it. The further apart the actual portfolios, the safer the swap.
How the Disallowed Loss Rides Along Afterward
When a wash sale disallows your loss, your new basis in the replacement shares equals the basis of the shares you sold, adjusted by the difference between what you paid for the replacements and what you received from the sale.2eCFR. 26 CFR 1.1091-2 – Basis of Stock or Securities Acquired in Wash Sales In plain terms, your replacement shares carry a higher basis than what you actually paid, so the eventual gain will be smaller or the eventual loss larger. The tax benefit is deferred, not destroyed — except in the IRA case above.
The holding period of the original shares also carries over to the replacement shares.3Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property That can turn a short-term gain on the replacement lot into a long-term one when you eventually sell.
One boundary worth naming: as of 2026, none of these examples applies to cryptocurrency. Section 1091 covers “stock or securities,” and the IRS classifies crypto as property. Congress has proposed extending the rule to digital assets, but nothing has been enacted.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities
Reporting a Wash Sale on Your Return
Wash sales get reported on Form 8949 with adjustment code “W” in column (f) and the disallowed loss entered as a positive number in column (g). If your broker reported the wash sale on your 1099-B and got the math right, the numbers carry straight over. If box 1g on the 1099-B is wrong, or the wash sale happened across accounts and the broker never saw it, you enter the correct disallowed amount yourself.5Internal Revenue Service. Instructions for Form 8949 (2025)
The cross-account cases are where reporting fails most often. Neither broker flags them, no 1099-B shows them, and the IRS still receives transaction data from every brokerage that can be matched against your return. Skipping the adjustment also compounds: the wrong basis on the replacement shares travels with them until you sell, so a missed wash sale today becomes a misstated gain later. Keep your own record of any sale-and-repurchase that crosses accounts, spouses, or into a retirement plan, and make the adjustment yourself.