The US wash-sale rule denies a loss if you rebuy a substantially identical security within 30 days.
What it is
The wash-sale rule (IRC §1091) is a US anti-abuse provision that blocks you from claiming a tax loss while staying in essentially the same position. If you sell a security at a loss and buy a "substantially identical" security within the window starting 30 days before the sale and ending 30 days after it, the loss is disallowed for that tax year. The disallowed loss is not erased: it is added to the cost basis of the replacement shares, so the deduction is deferred until you eventually sell those shares.
Why it matters
It is the main trap in US tax-loss harvesting: investors sell at a loss to bank a deduction, then rebuy too soon and unwittingly void it. The biggest pitfall is the spousal and IRA overlap, the IRS treats a repurchase by your spouse or inside your own IRA as triggering the rule, and an IRA repurchase is worse because there is no taxable basis to absorb the deferred loss, so the deduction vanishes permanently. "Substantially identical" is also vaguer than people assume, there is no IRS safe harbor confirming that two different S&P 500 ETFs are safe substitutes.
How it's calculated
There is no formula, you test a date window. Count 30 calendar days before the loss sale and 30 calendar days after it; if a purchase of a substantially identical security falls anywhere in that 61-day span (including the sale day), the loss is disallowed. The disallowed amount is then added to the cost basis of the replacement shares and the original holding period carries over.
How Quintarthai uses it
When reviewing a position on a company's deep-analysis page, use the holding and price-history context to plan around the 61-day window before harvesting a loss. The Knowledge Base covers both the US wash-sale rule and Canada's superficial-loss analog for cross-border investors.
Cross-border note. This is a US rule (IRC §1091) for US taxpayers; Canada's equivalent is the superficial-loss rule (Income Tax Act s.54), which uses the same 30-day-each-side window but adds the denied loss to the adjusted cost base (ACB) of the replacement property. Canada's version explicitly reaches "affiliated persons" including your spouse and your own registered accounts (RRSP, RRIF, TFSA, FHSA), so a repurchase inside a TFSA or RRSP can trip it.
FAQ
If my loss is disallowed by the wash-sale rule, do I lose the tax benefit forever?
Usually no, it is deferred, not destroyed. In a normal taxable account the disallowed loss is added to the cost basis of your replacement shares, so you recover the benefit when you eventually sell them. The exception is rebuying inside an IRA, where there is no usable basis and the loss is lost permanently.
Does selling at a loss in my taxable account and rebuying in my spouse's account or my IRA avoid the rule?
No. The IRS treats a repurchase by your spouse or in an IRA you own as triggering the wash-sale rule. Canada's superficial-loss rule is similar, it counts repurchases by affiliated persons, including your spouse and your registered accounts such as an RRSP or TFSA.
Check your understanding
A US investor sells 100 shares of a stock on March 10 at a $2,000 loss, then buys 100 shares of the same stock on March 25 in her taxable account. What happens to the loss?
The repurchase on March 25 falls inside the 61-day window, so the loss is disallowed for this year but deferred, it is added to the new shares' cost basis and recovered when they are sold.