The federal wash sale rule can defer a tax loss when securities are sold at a loss and substantially identical securities are acquired within the applicable period. It is a tax-accounting rule, not a rule that prevents an investor from making the trade.

The 30-day window works in both directions

IRS guidance describes the wash-sale period as 30 days before through 30 days after the loss sale. Purchases inside that window can cause some or all of the loss to be disallowed when the replacement investment is substantially identical.

For replacement shares in a taxable account, a disallowed loss is generally added to the basis of the replacement shares, which can defer recognition of the loss until a later disposition. Holding-period adjustments can also apply.

Why tax-loss harvesting needs coordination

Review purchases across accounts and automated activity before realizing a loss. Dividend reinvestment and recurring investment plans can create replacement purchases that are easy to overlook. The meaning of “substantially identical” depends on facts and circumstances, so do not assume every similar investment is interchangeable for tax purposes.

Use the Capital Gains Calculator for scenario estimates, while verifying actual basis and wash-sale adjustments from tax records.

Frequently asked questions

Is the wash-sale window only after the sale?

No. It includes acquisitions during the 30 days before and 30 days after the loss sale.

Is the disallowed loss always gone permanently?

Not necessarily. For many taxable-account replacement shares, the disallowed loss adjusts basis and is deferred.

Does the rule apply only to stocks?

IRS rules cover stock or securities and certain contracts or options. Specific situations can require tax advice.

Sources and method

See the calculation methodology, sources and update policy and site disclaimer.