A wash sale is one where you sell a security to take a loss and then buy it back in less than 30 days.  Your loss deduction is barred if within 30 days of the sale you buy substantially identical stock or securities, you purchase a “call” option on such securities, or you sell a “put” option on the securities that is “deep-in-the-money”.  The wash sale period is really 61 days running from 30 days before the sale to 30 days after the transaction. If you sell/ buy at the end of a calendar year, it does not change the wash sale rules. If you do the sell transaction and your spouse does a corresponding buy it is still considered a wash sale.

The disallowed loss is added to the basis of the replacement stock. The actuality of this is that you are deferring the deduction for the loss on the first sale to the sale of the stock from the subsequent purchase at a later date.

The wash sale rules do not apply to sales with gains.  So, for example, if you sell a stock at a gain and then the price drops and you re purchase it within 30 days at a lower price, this is not considered a wash sale.

You cannot use your IRA to try and get around the wash sale rules.  If you sell a stock at a loss in your personal account and try to buy it back in your IRA within 30 days, the wash sale rules come into play. In addition, the loss that would have been added to the basis of the new shares in a personal account is not applicable in an IRA. So you lose the increased basis of the shares permanently.

If you sell a portion of your holdings in a security within 30 days of original purchase the loss is deductible as a short term loss.  The wash sale rules apply to transactions where there is a loss transaction and a repurchase within thirty days before or after the sale transaction.