Selling a stock at a loss and rebuying it within 30 days cancels the tax write-off under the wash-sale rule

A cropped closeup image of professional smart trader hand pointing at financial growth graph while write data analysis in notebook Business finance and Stock market investment concept Burgeoning

Investors who sell a stock at a loss and repurchase the same or a substantially identical security within 30 days lose the right to claim that loss as a tax deduction. Federal statute 26 U.S. Code Section 1091 spells out the rule in blunt terms: “no deduction shall be allowed” when the repurchase falls inside the window. The restriction covers 30 days before and 30 days after the sale, creating what regulators call a 61-day period. With volatile markets driving more frequent trading among retail investors, the wash-sale rule has become a quiet but costly trap for anyone harvesting losses without tracking the calendar.

How the 61-Day Window Blocks a Tax Deduction

The wash-sale rule exists to prevent taxpayers from booking a paper loss for tax purposes while maintaining essentially the same market position. Under the federal wash-sale statute, a loss sale is disallowed whenever the taxpayer acquires substantially identical stock or securities, or enters into a contract or option to acquire them, within the 30 days before or after the sale. The implementing regulation in Treasury regulation 1.1091-1 labels this span the “61-day period,” counting 30 days on each side plus the sale date itself.

The disallowed loss does not vanish entirely. Instead, it gets added to the cost basis of the replacement shares, according to the basis adjustment rule in regulation 1.1091-2. That means the loss is deferred, not destroyed. When the investor eventually sells the replacement shares without triggering another wash sale, the higher basis reduces the taxable gain or increases the deductible loss at that point. But for the current tax year, the write-off is gone and cannot offset other capital gains or ordinary income.

Automated trading platforms raise a particular concern here. Algorithms that execute rapid buy-sell-buy sequences on the same ticker can generate wash-sale events faster than a manual trader would. A strategy that repeatedly re-enters positions after small price moves may, in practice, keep the investor inside the 61-day window almost continuously. No public IRS dataset currently breaks out wash-sale flags by platform type, so the hypothesis that automated retail platforms produce a higher share of wash-sale events than self-directed accounts remains untested with available federal data. Brokers do report wash-sale adjustments on Form 1099-B, but aggregate volumes by account category have not been published by the IRS or Treasury, leaving only anecdotal evidence from tax preparers and investors.

Reporting Requirements on Form 8949

Taxpayers who trigger a wash sale face a specific paperwork obligation. The IRS Instructions for Form 8949 for 2025 require filers to use adjustment code “W” and enter the nondeductible wash-sale loss as a positive number adjustment. This adjustment increases the reported proceeds or reduces the reported loss on the form, effectively zeroing out the disallowed deduction for that transaction. The SEC’s Investor.gov glossary restates the same standard: a wash sale occurs when securities are sold at a loss and substantially identical securities are bought within 30 days before or after.

The reporting mechanics matter because many investors rely on their broker’s year-end tax documents without checking for wash-sale flags. A brokerage statement may show a loss on a particular trade, but if the wash-sale code appears, that loss cannot reduce taxable income. Investors who file without reviewing the code “W” adjustments risk either an IRS notice or an inaccurate return that overstates deductible losses. In some cases, tax software will import the broker’s data but still require the taxpayer to confirm that wash-sale adjustments have been handled correctly, especially when multiple accounts or brokers are involved.

Practical compliance starts with recordkeeping. Investors who actively trade the same securities should maintain a calendar or use portfolio software that tracks purchase and sale dates across all taxable accounts. Because the rule looks at acquisitions within 30 days before and after the sale, buying shares shortly before a loss sale can be just as problematic as buying them afterward. Coordinating activity between spouses is also important, since purchases in one spouse’s account can affect the wash-sale status of a loss sale in the other’s account under the statute’s “taxpayer” framework and related interpretations.

For those intentionally harvesting losses, one common approach is to switch into a similar but not substantially identical investment for at least 31 days. For example, an investor selling an index fund might choose a different fund with a similar objective but a distinct index or issuer. The law and regulations do not provide a bright-line test for “substantially identical,” so investors often work with tax professionals to evaluate borderline cases. The goal is to maintain market exposure while clearing the 61-day window and preserving the loss deduction.

Ultimately, the wash-sale rule is less about punishing short-term trading than about timing. The same economic loss can be deductible if realized outside the 61-day period, or nondeductible if paired too closely with a repurchase. Investors who understand how the statute, regulations, and reporting rules interact can better align their trading strategies with the tax calendar and avoid unpleasant surprises when filing season arrives.

Leave a Reply

Your email address will not be published. Required fields are marked *