The price to earnings (P/E) ratio compares the share price of a company to the earnings it generates per share. The formula used to calculate this ratio simply divides the market value per share by the earnings per share (EPS). The typical calculation of the P/E ratio uses a company's EPS from the last four quarters.

A variation on this calculation is known as the forward P/E. Investors or analysts may use projected earnings per share, meaning the earnings expected to be generated per share over the next 12 months. This variation is also known as the leading or projected P/E. The significant difference is the forward P/E is based on analyst speculation about a company's future earnings rather than historical data.

The theory behind a stock's P/E ratio is it provides an estimate of the amount an investor is willing to pay per dollar generated in earnings. The P/E ratio also accounts for company growth expectations in the market. Because stock price is a reflection of what investors think a company is worth, the value accounts for growth. (For related reading, see "Forces That Move Stock Prices.")

The forward P/E ratio should be considered more in terms of the optimism of the market for a company's prospective growth. A company with a higher forward P/E ratio than the industry or market average indicates an expectation the company is likely to experience a significant amount of growth. If a company's stock fails to meet the high ratio value with increased per share earnings, the price of the stock will fall.

Ultimately, the P/E ratio is a metric that allows investors to determine how valuable a stock is, more so than market price alone. The P/E ratio and forward P/E ratio are particularly helpful when comparing similar companies within the same industry. (For related reading, see "How Can I Calculate a Company's Forward P/E in Excel?")