Wash Sale Rule
The Wash Sale Rule is an IRS regulation that prohibits Tax Loss Harvesting (using a loss to offset a gain) if the taxpayer purchases the same, or “substantially identical”, security within a 61-day window. This wash sale period begins 30 days before the sale and ends 30 days after the sale.
The Wash Sale Rule applies across all of an investor's accounts. For instance, per the following Forbes article, one cannot merely use an IRA account to hide a Wash Sale from the IRS. In addition, the rule applies to spousal accounts for joint filers. For example, a wash sale would apply if a taxpayer sold a stock in his taxable account and subsequently bought the same stock in his wife's account.
Be aware that the IRS has a new tool to catch investors who claim losses on wash sales. If the offending trades are in the same account, your broker will flag them in its electronic report to the tax people. If the trades are in different accounts (e.g., you sell shares at a loss in your taxable Fidelity account while simultaneously buying the same stock in a Fidelity IRA) the broker will not flag the suspicious activity. But that doesn’t mean you get a pass on such wash sales. If you play the two-account game and get audited, you are on the hook for back taxes, interest and probably a negligence penalty.
If a Wash Sale is triggered, the taxpayer cannot use the loss to offset any gains, but the IRS is nice enough to let the taxpayer add the loss to the Cost Basis of the new purchase.