IRS Section 1091: Wash Sale Rules, Basis, and Form 8949

The wash sale rule disallows a capital loss when you sell a stock or security at a loss and buy a substantially identical one within 30 days before or after the sale. The loss doesn’t disappear right away in most cases: it gets added to the cost basis of the replacement shares, deferring the tax benefit until you sell those shares in a transaction that isn’t itself a wash sale. You report the adjustment on Form 8949 with code “W” in column (f) and the disallowed amount in column (g), then carry the totals to Schedule D. The mechanics are simple enough; the places people trip are dividend reinvestments, purchases in a second account, and buybacks inside an IRA.

What Triggers a Wash Sale

The trigger is a sale at a loss plus an acquisition of substantially identical stock or securities within a 61-day window. That window runs from 30 days before the sale through 30 days after it, and it includes the sale date itself.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Entering into a contract or option to acquire substantially identical securities also counts as an acquisition.2eCFR. 26 CFR 1.1091-1 – Losses From Wash Sales of Stock or Securities

When the rule applies, the loss is disallowed for the current tax year. You can’t use it to offset capital gains or ordinary income. Instead the disallowed amount is added to the basis of the replacement shares, which pushes the tax benefit forward to whenever you eventually sell those shares cleanly.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

The rule reaches beyond your own brokerage account. A purchase by your spouse or by a corporation you control inside the 61-day window is treated as your purchase for wash sale purposes.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

What Counts as Substantially Identical

The IRS has never published a bright-line test for “substantially identical,” and that ambiguity is where most judgment calls happen. Selling and repurchasing the same company’s common stock is the clear case. Convertible bonds or convertible preferred can also be treated as substantially identical to the underlying common when they trade in a way that closely tracks the conversion ratio, effectively behaving as common stock equivalents.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

Ordinary bonds and preferred stock of a company are not typically considered substantially identical to that company’s common stock.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses A common tax-loss harvesting move exploits this gap: sell one S&P 500 index ETF and buy a different S&P 500 ETF from another fund family. Most practitioners treat the two as not substantially identical because they are issued by different companies, even though they track a similar index. The IRS has not issued definitive guidance on that specific fact pattern, so a small amount of risk remains.

Options and Short Sales

Section 1091 treats contracts and options to buy or sell stock as stock or securities for wash sale purposes. If you sell a stock at a loss and buy a call option on the same stock within the window, expect a wash sale. Short sales follow the same pattern under Section 1091(e): a loss on closing a short position is disallowed if you acquire substantially identical stock within the 30-day-before/30-day-after window around the closing date.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

How the Disallowed Loss and New Basis Are Calculated

Two steps: figure the disallowed portion, then build the basis of the replacement shares. When you repurchase the same number of shares you sold, the entire loss is disallowed and the full amount is added to what you paid for the replacement shares. The statutory formula sets the basis of the replacement shares equal to the basis of the shares you sold, adjusted by the difference between the replacement purchase price and the original sale price.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

A Full Wash Sale

You buy 100 shares for $5,000 and sell them for $4,000, realizing a $1,000 loss. Ten days later you buy 100 shares of the same stock for $4,200. The full $1,000 loss is disallowed. Your basis in the new 100 shares is $4,200 plus the $1,000 disallowed loss, or $5,200. Sell those shares later for $5,500 and your taxable gain is $300 rather than $1,300; the deferred loss came through in the end.

A Partial Wash Sale

When you replace fewer shares than you sold, only a proportional slice of the loss is disallowed, and the regulations require you to match the disallowed portion to the replacement shares.2eCFR. 26 CFR 1.1091-1 – Losses From Wash Sales of Stock or Securities Say you sell 100 shares at a total loss of $250 and then repurchase 50 shares for $300 inside the window. Fifty replacement shares divided by 100 sold shares is 50%, so half the loss ($125) is disallowed and added to the $300 you paid, giving those replacement shares an adjusted basis of $425. The other $125 is deductible this year, because 50 of the sold shares were never replaced.

Holding Period Tacking

The holding period of the replacement shares includes the holding period of the shares you sold. Publication 550 states this directly: the new shares inherit the clock from the old.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses This can turn what looks like a short-term gain on the replacement shares into a long-term one taxed at a lower rate.

The Dividend Reinvestment Trap

This is where most accidental wash sales happen. If you hold a stock or mutual fund in a dividend reinvestment plan, every reinvested dividend is a fresh purchase of the same security. Sell that security at a loss within 30 days before or after one of those automatic reinvestments and you have a wash sale, even though you never placed a buy order yourself.

The fix is straightforward. Turn off automatic reinvestment before selling for a tax loss, and leave it off until the 30-day window closes. If a small reinvestment slips through, only the portion of shares actually replaced by that reinvestment triggers the wash sale; the rest of the loss remains deductible.

Cross-Account Buys and the IRA Trap

The wash sale rule applies across every account you control. Sell at a loss in one brokerage account and buy back in another, and the loss is still disallowed. The same is true when your spouse makes the repurchase in a separate account.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

Losses on sales that happen entirely inside a traditional IRA or Roth IRA aren’t deductible in the first place, so the wash sale rule usually has nothing to bite on. The real danger is the cross-account version: selling a stock at a loss in your taxable brokerage account and buying the same stock in your IRA or Roth IRA within 30 days.

That combination triggers a wash sale with a particularly harsh result. Publication 550 states an explicit exception to the basis rule: when the replacement shares are acquired for an IRA or Roth IRA, the disallowed loss is not added to the new shares’ basis.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses An IRA doesn’t track cost basis for tax purposes, so the loss doesn’t come back later. It’s gone. This is one of the few situations where the wash sale rule destroys a loss permanently rather than postponing it.

What’s Outside the Rule

Securities dealers who take a loss in the ordinary course of their dealing business are exempt from Section 1091. The exemption covers the dealing activity itself, not the dealer’s personal portfolio.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

Digital assets such as cryptocurrency remain outside the wash sale rule. The IRS classifies digital assets as property, not stock or securities, and Section 1091 applies only to stock or securities.4Internal Revenue Service. Digital Assets Commodities and foreign currency transactions are also outside the rule unless they are structured as options or contracts that themselves qualify as securities under Section 1091.

The 475(f) Election for Active Traders

Traders who qualify as being in the trade or business of trading securities can make a Section 475(f) mark-to-market election. Under that election, all securities are treated as sold at fair market value on the last business day of the year, and gains and losses are ordinary rather than capital.5Office of the Law Revision Counsel. 26 USC 475 – Mark to Market Accounting Method for Dealers in Securities Because no positions are carried across the year, the wash sale rule has nothing to disallow for the elected trading business. The election has to be filed by the original due date, without extensions, of the return for the year before the election takes effect, and it applies to all following years unless the IRS consents to revoke it.6Internal Revenue Service. Topic No. 429, Traders in Securities

How to Report a Wash Sale on Form 8949

Each wash sale is reported line-by-line on Form 8949. You can’t aggregate wash sale transactions the way you can with ordinary sales; every wash sale gets its own row.7Internal Revenue Service. Instructions for Form 8949 (2025) Fill in the sale date, proceeds, and cost basis as usual, then make two adjustments:

  • In column (f), enter the code “W” to flag the row as a wash sale.
  • In column (g), enter the disallowed loss as a positive number, which adds back the disallowed amount so it doesn’t reduce your reported loss for the year.

The totals from Form 8949 flow to Schedule D (Form 1040), where your net capital gain or loss is calculated.8Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets

When the 1099-B Doesn’t Catch It

Your broker’s Form 1099-B may already show a wash sale adjustment in box 1g if the repurchase happened inside the same account. Brokers only see what happens on their own books. If you sold in one account and repurchased in another brokerage, in a spouse’s account, or in an IRA at a different institution, the 1099-B will show the full loss as though nothing happened.7Internal Revenue Service. Instructions for Form 8949 (2025)

You are responsible for the correction on Form 8949. Enter the cost basis as the broker reported it in column (e), add code “W” in column (f), and enter the correct disallowed loss in column (g). If the broker’s wash sale figure is too high or too low, enter the correct amount and attach a statement explaining the difference.

Year-End Timing

The 61-day window does not reset at the calendar boundary. Sell on December 15 and repurchase on January 4, and you have a wash sale even though the transactions fall in two different tax years. The loss is disallowed in the year of the sale, and the basis adjustment goes to the shares purchased in January.3Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

To harvest a loss near year-end and still repurchase the same security, wait at least 31 days after the sale. Selling December 1 and buying January 2 gives you 32 days, which clears the window. Selling December 15 and buying January 5 gives you 21 days, which doesn’t. Count carefully. Investors who want to stay invested during the wait can hold a security that tracks a similar but not substantially identical index and swap back once the window closes.