If you sell a stock or mutual fund at a loss and buy a substantially identical one within 30 days, the wash sale rule applies. This rule disallows the loss for tax purposes, deferring it by adding it to the cost basis of the new shares. Proper timing is key to successfully harvesting tax-saving capital losses. Learn more.