PE ratio is calculated as the close price of the stock divided by the earnings per share excluding extraordinary items for the most recent financial year. The ratio indicates the number of units of the stock price it takes to purchase a single unit of the company’s earnings per share (EPS). If the company is currently trading at Rs.300/share and the EPS of the company is Rs.30, then the PE ratio is 300/30 = 10x. So it costs Rs.10 to be eligible to purchase Re.1 of the company’s earnings

PE ratio is the most important valuation ratio and helps understand whether a company is undervalued or overvalued. The best way to use a PE ratio is by comparing the ratio of different companies operating in the same sector

Suppose company A is trading at a PE ratio of 12 and B is trading at a PE of 17. Obviously, A is undervalued when compared to B as it costs only Rs.12 to purchase 1 unit of A’s EPS, whereas B’s costs Rs.17. However it is important to understand the reason behind the undervaluation. If the market is expecting B to grow at a faster rate, demand for shares of B will increase leading to a higher share price and consequently higher PE ratio. So in this case the higher PE for B is justified. However, suppose the market has not correctly understood A’s earning potential and hence has ignored the stock leading to low PE. Such a situation might present a genuine buying opportunity for the stock, however, it is important to ensure that the market has not correctly understood A’s earning potential. If the market has ignored A because of poor earnings or bad management practices, it is better to ignore the same in spite of relative cheapness.

Check out this article on how the PE ratio can be calculated differently on various platforms.