Wash Sale Rules Buying a stock within 30 days before or 30 days after selling for a loss will postpone recognition of the loss for tax purposes. So "buy before you sell" only works if the buy is more than 30 days before the sell.