To successfully receive a declared corporate dividend, an investor must purchase or hold the stock prior to the ex-dividend date. The absolute earliest moment you can sell your shares and still retain your entitlement to the upcoming dividend payment is precisely on the ex-dividend date itself or any trading day thereafter. If you sell the stock even one single business day before the ex-dividend date, the buyer of the shares—rather than you—will be registered on the corporate books to receive the scheduled dividend distribution.