Wash Sale Rule Examples: Partial Buys, IRAs, and Reinvestments

The wash sale rule disallows your capital loss when you sell a stock or security at a loss and buy the same (or a substantially identical) one within 30 days before or after the sale. The examples below show the common ways that wash sale rule trips people up, from a straightforward buy-back to the traps that hit dividend reinvestments, spousal accounts, and IRAs. In most cases the disallowed loss isn’t destroyed; it shifts into the cost basis of your replacement shares and lowers your taxable gain when you eventually sell those. The rule sits in 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 Three Conditions That Have to Line Up

Every wash sale example below shares the same skeleton. You need all three:

  • You sell stock or securities in a taxable account at a price below your cost basis.
  • You buy, or enter into a contract or option to buy, the same stock or a substantially identical security.
  • The purchase falls anywhere in the 61-day window that runs from 30 days before the sale through 30 days after it.

That “30 days before” half is the part most people miss. Buy more shares on November 1, then sell your original lot at a loss on November 20, and the loss is disallowed because you acquired substantially identical shares inside the window that precedes the sale.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

Two securities are “substantially identical” as a facts-and-circumstances question, but IRS Publication 550 gives you the outlines. Shares of the same company’s common stock always are. Stocks of different corporations ordinarily are not. Preferred stock and common stock of the same company are usually not identical either, unless the preferred is convertible into common, votes the same, and trades close to the conversion ratio.2Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses Two ETFs tracking the same index sit in a genuinely gray zone; two funds tracking different indexes are safer the further their actual holdings diverge.

Example 1: The Straightforward Buy-Back

You buy 100 shares of XYZ Corp. on October 1 at $50, for a $5,000 basis. On November 15 you sell all 100 shares at $40, realizing a $1,000 loss. On November 25 you buy 100 shares back at $41 ($4,100 total).

The repurchase is 10 days after the sale, well inside the 61-day window, so the entire $1,000 loss is disallowed for this year. The replacement shares don’t take a $4,100 basis. Under the wash sale basis rules, you start with the old basis of $5,000 and adjust by the difference between the repurchase price and the sale proceeds, giving a new basis of $5,100.3eCFR. 26 CFR 1.1091-2 – Basis of Stock or Securities Acquired in Wash Sales When you eventually sell for real, that higher basis reduces your gain (or increases your deductible loss) by exactly the $1,000 you weren’t allowed to take now.

A second, quieter adjustment travels with the shares: the holding period of the original lot tacks onto the replacement lot.4Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property If you’d held the originals for eight months, those eight months count toward the replacement lot’s long-term status.

Example 2: You Only Bought Some of Them Back

You own 200 shares of ABC Inc. purchased at $100 each, so a $20,000 basis. On December 1 you sell all 200 at $90, realizing a $2,000 loss. On December 15 you buy back 100 shares at $91.

The rule applies proportionally. You replaced half the shares you sold, so half the loss is disallowed. $1,000 gets added to the basis of the 100 replacement shares (their basis becomes $10,100), and the other $1,000 stays a real, deductible capital loss you can report on Schedule D this year.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

If instead you’d bought back more than 200 shares, the entire $2,000 loss would be disallowed. Publication 550 requires you to match replacement shares to sold shares in the order you acquired them, which matters when you have to allocate the disallowed loss across multiple purchase lots.2Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

Example 3: Different Account, Same Household

You sell 500 shares of MNO Corp. at a $2,500 loss from your individual brokerage account on January 5. On January 20, your spouse buys 500 shares of MNO Corp. in a separate joint account.

The $2,500 loss is disallowed. The IRS treats a sale by one spouse at a loss and a repurchase by the other within the window as a wash sale, even in separate accounts, and the disallowed loss attaches to the basis of the shares in the joint account.

This is where the rule bites hardest, because no one is watching for you. Brokerages are only required to flag wash sales on identical securities inside the same account. A sale at Fidelity followed by a purchase at Schwab shows up on neither 1099-B as a wash sale. Same story for a sale in your account and a purchase in your spouse’s. You have to catch it and make the adjustment on Form 8949 yourself.5Internal Revenue Service. Instructions for Form 8949 (2025)

Example 4: A Dividend Reinvestment You Didn’t Notice

You sell mutual fund shares at a loss. Two weeks later, the fund pays a dividend, and your account automatically reinvests it into new shares of the same fund. You never placed a trade, but you just bought substantially identical securities inside the 30-day window. The portion of the loss matched to the reinvested shares is disallowed.

If you’re planning to harvest a loss on a fund near its distribution date, turn off automatic reinvestment first, or push the sale outside the 30-day window around the distribution.

Example 5: Options and Short Sales Count Too

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 and buy a call option on the same stock within 30 days, and the loss is disallowed. The basis adjustment attaches to the option contract instead of stock.

Short sales work the same way in reverse. Close a short at a loss and open a new short on the same stock inside the window, and the loss disappears from your current-year deduction. Direction doesn’t matter; re-establishing the same exposure inside 61 days does.

Example 6: The IRA Trap Where the Loss Disappears Forever

You sell a stock at a loss in your taxable brokerage account. Within 30 days, your IRA buys the same stock. The wash sale rule applies, and this is the one case where the deferred-benefit story falls apart.

In a regular wash sale, the disallowed loss rides along as extra basis in the replacement shares, so you get it back eventually. In an IRA there’s nowhere for that basis adjustment to land, because IRA distributions aren’t taxed on a gain-versus-basis calculation. The IRS confirmed in Revenue Ruling 2008-5 that the loss is disallowed and the IRA’s basis is not stepped up. The loss is permanently gone.6Internal Revenue Service. Rev. Rul. 2008-5

The same result follows for 401(k) purchases and other tax-deferred retirement accounts. If you’re harvesting losses in a taxable account, check that no retirement account is buying the same security anywhere close to the sale date.

A Boundary Worth Knowing: Cryptocurrency

The wash sale rule does not currently apply to cryptocurrency. Section 1091 covers “stock or securities,” and the IRS classifies crypto as property, not a security, so you can sell Bitcoin at a loss and rebuy it the next minute without triggering a wash sale.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Congressional proposals, including the Digital Asset PARITY Act and provisions in the Lummis crypto bill, would extend wash sale treatment to digital assets, but none have been enacted, and some would exempt stablecoins.

Reporting a Wash Sale on Your Return

Wash sales get reported on Form 8949. Use adjustment code “W” in column (f) and enter the disallowed loss as a positive number in column (g). If your broker already reported the wash sale correctly on the 1099-B (box 1g), you carry the numbers straight over. If the broker missed it, which is the norm for cross-account and spousal wash sales, you enter the correct disallowed amount yourself.5Internal Revenue Service. Instructions for Form 8949 (2025)

The $3,000 annual capital loss deduction cap ($1,500 if married filing separately) is separate. Disallowed wash sale losses aren’t deductible at all this year, so they never touch the cap; they show up later as reduced gain (or larger loss) when you sell the replacement shares. That deferred piece is easy to lose track of, and the basis adjustment is the whole point of getting the reporting right. Skip it now and you’ll overstate a gain when you finally exit the position.