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 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 P/E; 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 P/E) 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 June 18, 2014 traded at $41.56 per share with an EPS (TTM) of $1.87, so the P/E ratio would be:
 Stock price ($41.56) / earnings per share ($1.87) = 22.22
This essentially means that investors are willing to pay $22.22 for every dollar of earnings that KO has. For comparison, Pepsico Inc (PEP) on the same day traded at $88.90 per share with an EPS (TTM) of $4.43 and a P/E ratio of 20.31. The average P/E ratio for companies in the Beverage sector is about 20.26, and, historically, the average P/E ratio for the broad market has been around 15. KO, therefore, has a higher P/E ratio than both the sector and broad market average, as well one of its competitors, PEP. This higher P/E ratio might mean that investors will expect higher earnings growth in the future compared to 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.
RELATED FAQS

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 ... 
What does the Dividend Discount Model (DDM) show an investor about a company?
Discover the purpose of the dividend discount model, or DDM, of stock analysis and what it specifically aims to evaluate ... 
If a company has a high debt to capital ratio, what else should I look at before ...
Learn about some of the financial leverage and profitability ratios that investors can analyze to supplement examining the ... 
How can a firm bring down its operating leverage?
Discover how to determine a company's operating leverage and how this metric can be helpful to analysts and investors when ...

PriceEarnings Ratio  P/E Ratio
A valuation ratio of a company's current share price compared ... 
Enterprise Value (EV)
A measure of a company's value, often used as an alternative ... 
Nonadmitted Balance
An item on an insurer’s balance sheet that represents reinsured ... 
Best's Capital Adequacy Relativity (BCAR)
A rating of an insurance company’s balance sheet strength. Best’s ... 
Deferred Tax Asset
A deferred tax asset is an asset on a company's balance sheet ... 
Earnings Per Share  EPS
The portion of a company's profit allocated to each outstanding ...