The wash sale rule is an IRS regulation that disallows a tax deduction for a loss on a security if the same or substantially identical security is purchased within 30 days before or after the sale. This rule applies to traders and investors who sell securities at a loss and then repurchase them quickly. The disallowed loss is added to the cost basis of the repurchased shares, deferring the tax benefit until the new position is sold in a non-wash sale transaction.
A wash sale occurs when you sell a security at a loss and within 30 days before or after that sale, you buy the same or substantially identical security. The 30-day window includes the day of the sale. If you trigger a wash sale, you cannot claim that loss on your current year's taxes. Instead, the loss is added to the cost basis of the new shares. This means the loss is deferred until you eventually sell the new shares in a non-wash sale transaction.
Substantially identical security: This typically means the same stock, option, or ETF. It can also include contracts or options to buy the same security. For example, selling a stock at a loss and buying a call option on that same stock within the 30-day window may be considered a wash sale.
Cost basis: The original value of an asset for tax purposes, usually the purchase price. Adjustments like wash sale losses increase the cost basis, reducing future taxable gains or increasing future deductible losses.
Tax deduction: A loss on a security can offset capital gains and up to $3,000 of ordinary income per year. The wash sale rule prevents this immediate benefit.
Suppose you buy 100 shares of XYZ stock for $50 per share ($5,000 total) on January 1. On January 20, you sell all 100 shares for $40 per share ($4,000 total), realizing a $1,000 loss. On February 5, you buy 100 shares of XYZ again for $45 per share ($4,500 total). Because you bought the same stock within 30 days after the sale, this is a wash sale.
The $1,000 loss is disallowed. Instead, it is added to the cost basis of the new shares. The new cost basis becomes $4,500 + $1,000 = $5,500, or $55 per share. If you later sell those 100 shares for $60 each ($6,000 total), your taxable gain is $6,000 - $5,500 = $500, rather than $6,000 - $4,500 = $1,500. The loss is effectively deferred.
Active traders who frequently buy and sell the same securities are most affected. The rule applies across multiple accounts, including IRAs, if you control them. For example, selling at a loss in a taxable account and buying the same security in an IRA within 30 days also triggers a wash sale. In an IRA, the loss is permanently disallowed because there is no way to adjust cost basis inside the IRA.
To avoid the rule, wait at least 31 days before repurchasing the same or substantially identical security. Alternatively, buy a similar but not substantially identical security, such as an ETF tracking a different index or a stock in the same sector but different company. Be cautious with tax-loss harvesting strategies, which involve selling losers to offset gains; the wash sale rule can disrupt those plans.
Traders using margin or leverage should note that wash sales impact tax reporting, not trading strategies directly. However, ignoring the rule can lead to unexpected tax bills. The IRS does not prohibit wash sales, but the rule removes the immediate tax benefit. Misunderstanding can result in penalties for underreporting gains or overstating losses. Always consult a tax professional, especially for complex strategies like options or frequent trading.
A wash sale occurs when you sell a security at a loss and buy the same or substantially identical security within 30 days before or after.
The loss is disallowed and added to the cost basis of the new shares.
The rule applies across accounts you control, including IRAs.
Wait 31 days to repurchase to maintain the tax deduction.
Always track wash sales to ensure accurate tax reporting.
Prepared with AlphaScala editorial tooling, examples, and risk-context checks against our education standards. General education only, not personalized financial advice.