The share price of a stock does decline when the stock goes ex-dividend. This effect prevents traders from making a short-term profit from buying shares and holding them for one day to collect the dividend. Unless you know that a dividend payment is coming, the share price drop may not be evident on your favorite stock price quote site.
A declared dividend includes a record date, which is the date that the investors must own shares to receive the dividend. Market rules require three days for a stock trade to finalize or "settle," so an investor must buy or own shares at least three days before the record date to be an owner on the record date. As a result, investors buying shares two days before the record date will not receive the dividend -- the stock is ex-dividend.
On the ex-dividend date, the share price starts trading at the previous day's closing price minus the amount of the dividend. For example, if a stock paying a 50-cent dividend closed the day before at $50, the share price opens on the ex-dividend day at $49.50. Investors who owned the shares before the ex-dividend date maintain the value of their investment. The investment that was worth $50 is now worth $49.50 plus the 50-cent dividend to be paid later.
An investor who sells shares on the ex-dividend date ends up with a breakeven result from the day before -- collecting a lower price for the shares but earning the dividend. Buyers on the ex-dividend date actually get an equivalent to the dividend earning potential, since the shares are purchased at a price lower than the previous price by the amount of the dividend; they pick up shares at the lower cost and avoid the taxable dividend payment.
The share price drop due to a stock going ex-dividend will not show as a decline or loss on the price quote websites or in your brokerage account. The $50 stock paying a 50-cent dividend will open the next day at $49.50, showing the price unchanged for the day. If the shares trade at $49.55, a quote screen will show that the shares are up 5 cents for the day, not down 45 cents. Unless you know the stock is going ex-dividend, there is no indication in the price quote that it has done so.