What is a Wash Sale?
The wash sale rule prevents you from taking a loss when you buy replacement stocks or securities within 30 days before or after you get rid of the same stock or security.
For the wash sale rule, "stocks and securities" include contracts or options for securities. Also, the replacement securities don't have to be exactly the same - just substantially identical.
If you fall under the wash sale rules then you cannot deduct losses unless you are a securities dealer and the trade was part of your business activity.
The tax or cost basis of the replacement securities is the new cost increased by the disallowed loss. This applies even if you buy the replacement stock in a different account. Buying the replacement stock in an IRA can be especially painful since cost basis is not typically recognized in these accounts. Therefore, the loss on the sale would be lost.
For more details on wash sales, see IRS publication 550.