The wash-sale rule, instituted by the Internal Revenue Service defines a wash sale as one that occurs when an individual sells or trades a security at a loss and, within 30 days before or after this sale, buys a "substantially identical" stock or security, or acquires a contract or option to do so.
The rule also applies if a spouse or company controlled by the individual purchases a substantially equivalent security.
Additionally the wash-sale rule, investments bought in an IRA account cannot be used to offset losses in a non-retirement account.
The intent of the wash-sale rule is to prevent investors from abusing wash sales so as to maximize tax benefits.
The rule can be averted by waiting more than 30 days between transactions and by making sure that the two assets are not 'substantially identical'.