A wash sale occurs when the same securities are purchased 30 days before or after the sale. If a loss results, all or part of the loss is disallowed. If an equal or greater number of the same securities that were sold are purchased, the entire loss is disallowed. If fewer shares are purchased than were sold, part of the loss is disallowed. The disallowed loss is added to the basis of the securities purchased.