Title 26 › Subtitle Subtitle A— Income Taxes › Chapter 1— NORMAL TAXES AND SURTAXES › Subchapter O— Gain or Loss on Disposition of Property › Part VII— WASH SALES; STRADDLES › § 1091
If you sell stock or securities at a loss and, within 30 days before or after the sale, you buy substantially identical stock or securities — or even enter a contract or option to buy them — the loss is a wash sale and you cannot deduct it. The rule still applies if the contract or option could be settled in cash instead of actual shares. The only carve-out is for dealers in stock or securities who take the loss in the ordinary course of their business. The disallowed loss is not gone forever. Your basis in the replacement shares is set from the basis of the shares you sold, adjusted for any difference between what you paid for the new shares and what you sold the old ones for — so the loss is preserved for when you finally sell. If you buy back fewer shares than you sold, regulations decide which shares' losses are blocked. A similar rule blocks losses on closing a short sale when substantially identical stock is sold, or another short sale is opened, within the same 30-day window.
Full Legal Text
Internal Revenue Code — Source: USLM XML via OLRC
Legislative History
Reference
Citation
26 U.S.C. § 1091
Title 26 — Internal Revenue Code
Last Updated
Apr 6, 2026
Release point: 119-73