An earnings surprise occurs when a stock reports earnings that are not in line with what analysts expected the company's earnings to be. An earnings surprise can be either positive or negative, depending on whether the company beat the number or missed the number. The stock then likely moves up or down depending on how its earnings compared to the analyst's opinion.
A publicly held company is a company in which any individual can buy stock on the stock exchange. These companies have a number of different reporting requirements to the public. One of those requirements is the company must report how much it earned on a quarterly basis. Each company reports earnings at different times and different dates, but each must report four times per year. The total earnings are reported, and those earnings are also divided by the number of outstanding shares of the stock to arrive at the earnings-per-share figure.
Because earnings and earnings-per-share are important metrics of how well a company is doing, and thus how well its stock is doing, financial analysts make estimates of how much a company should earn. There are a number of different analysts who make estimates, and a consensus forecast is normally arrived at, which is an expected average number that most analysts believe a given company should report. The larger a stock or company is, the more analysts are likely to make a guess or estimate on the expected earnings of the company.
When the company does report its earnings, this number is then compared to the number the analysts believed they would report. If the number does not match what the analysts expected, it is considered to be an earnings surprise. Investors thus often react to the fact that the given stock did not perform as the market forces expected it to perform, buying or selling in response to the earnings surprise.
If a stock misses earnings, it can be viewed as an indication the company is not doing as well as it should be doing, given the conditions of the market and the performance of its competitors. As such, stockholders tend to sell the stock because it is believed that the stock should be doing better and is thus a bad or risky investment. On the other hand, a stock that has better than expected or better than average earnings is often seen as a good buy. An earnings surprise, however, does not always result in rational buyer/seller behavior.