The priceearnings ratio (P/E ratio) is a valuation measure that compares the level of stock prices to the level of corporate profits, providing investors with a sense of a stock’s value. To calculate a company’s P/E ratio, use the following formula:
P/E ratio = price per share ÷ earnings per share (EPS)
Where EPS = earnings ÷ total shares outstanding
As long as a company has positive earnings, the P/E ratio is calculated this way (a company with no earnings, or one which is losing money, has no P/E ratio). The stock price per share is set by the demand and supply prevalent in the stock market, and the earnings per share value will vary, depending on the company’s financials and which earnings variant is used. Typically, EPS is taken from the last four quarters (trailing EPS; referred to as TTM for trailing twelve months), but it can also be taken from the estimates of earnings expected over the next four quarters (forward EPS) or some other variation.
As a result, a company will have more than one P/E ratio, and investors must be careful to compare the same P/E ratio when evaluating different stocks.
To determine the P/E ratio, investors can divide the stock price by EPS. For example, CocaCola Co (KO) on April 12, 2017 traded at $42.90 per share with an EPS (TTM) of $1.49, so the P/E ratio would be:
P/E ratio for CocaCola = Stock price ($42.90) ÷ earnings per share ($1.49) = 28.79
This essentially means that investors are willing to pay $28.79 for every dollar of earnings that KO has.
For comparison, Pepsico Inc (PEP) on the same day traded at $113.11 per share with an EPS (TTM) of $4.36 and a P/E ratio of 25.94.
The average P/E ratio for companies in the Beverage sector is about 31.11, and, historically, the average P/E ratio for the broad market is around 26.4 as of 2017. KO, therefore, has a lower P/E ratio than its sector and a higher ratio than the broad market average and PEP.
The company's P/E ratio might mean that investors will expect higher earnings growth in the future compared to its competitor, Pepsico, and the overall market. The P/E ratio is only one valuation measure, however, and investors would have to dig deeper before making any investment decisions.

What does the forward p/e indicate about a company?
Explore the forward price to earnings ratio and learn its significance and how it compares to the traditional price to earnings ... Read Answer >> 
How can the pricetoearnings (P/E) ratio mislead investors?
A low P/E ratio doesn't automatically mean a stock is undervalued, just like a high P/E ratio doesn't necessarily mean it ... Read Answer >> 
What is the average pricetoearnings ratio in the banking sector?
Explore the price/earnings ratio in regard to the banking industry and learn what the average P/E ratio is for most banking ... Read Answer >> 
Stocks with high P/E ratios can be overpriced. Is a stock with a lower P/E always ...
The short answer? No. The long answer? It depends.The pricetoearnings ratio (P/E ratio) is calculated as a stock's current ... Read Answer >> 
What does it mean if a bond has a zero coupon rate?
Learn what the average range for the price to earnings (P/E) ratio in the electronics sector is and which factors influence ... Read Answer >> 
What's the difference between absolute P/E ratio and relative P/E ratio?
The simple answer to this question is that absolute P/E, which is the most quoted of the two ratios, is the price of a stock ... Read Answer >>

Investing
Beware False Signals From The P/E Ratio
The P/E ratio is a simple tool for evaluating a company, but no one ratio can tell the whole story. 
Investing
Can Investors Trust The P/E Ratio?
The P/E ratio is one of the most popular stock market ratios, but it has some serious flaws that investors should know about. 
Investing
Getting On The Right Side Of The P/E Ratio Trend
Buying at the right time is crucial, but how do we know when that is? 
Investing
Is Stock With a Lower P/E Always A Better Choice?
Is a stock with a lower P/E always a better investment than a stock with a higher one? The short answer is no, but it depends on a few things. 
Investing
How Do I Calculate the PriceEarnings Ratio?
If Apple is trading at $108.73 per share, and its trailing twelve months' EPS is $6.45, calculate the P/E ratio as... 
Investing
Explaining Forward PricetoEarnings Ratio
The estimated P/E of a company is often used to compare current earnings to estimated future earnings.

PriceEarnings Ratio  P/E Ratio
The PricetoEarnings Ratio or P/E ratio is a ratio for valuing ... 
P/E 30 Ratio
The pricetoearnings (P/E) ratio is the valuation ratio of a ... 
Forward Price To Earnings  Forward P/E
A measure of the pricetoearnings ratio (P/E) using forecasted ... 
P/E 10 Ratio
A valuation measure, generally applied to broad equity indices, ... 
Trailing PriceToEarnings  Trailing P/E
The sum of a company's pricetoearnings, calculated by taking ... 
Ratio Analysis
A ratio analysis is a quantitative analysis of information contained ...