Price-earnings ratio, or also known as P/E ratio, is a tool that is used by investors to help make a decision whether they should purchase a stock. The price-earnings ratio (P/E ratio) is the ratio for valuing a company that measures its current share price relative to its per-share earnings. The price-earnings ratio is also sometimes known as the price multiple or the earnings multiple. Essentially, the P/E ratio tells potential investors how much they have to pay for every $1 of earnings.

A low P/E ratio is attractive in the sense that one pays less for every $1 of earnings. At the same time, companies with higher P/E ratios generally expect higher earnings growth in the future than companies with low P/Es.

The formula for calculating the price-earnings ratio for any stock is simple: the market value per share divided by the earnings per share (EPS). This is represented by the equation (P/EPS), where P is the market price and EPS is the earnings per share.

Market value per share is simply how much it costs to buy a share of any publicly-traded company on the stock Market. Find a stock’s current price by searching online either for its stock symbol (usually four or fewer letters) or the full name of the company followed by “stock.” In general, Stock prices are constantly fluctuating and the P/E ratio of a company fluctuates with them.

EPS is calculated by taking a company’s net income over the last four quarters (twelve months), account for any stock splits, and then dividing by the number of shares outstanding. However, they may also use a forward, or projected, P/E ratio that uses expected earnings over the next four quarters.

For instance, company A is currently trading at $43 a share and its earnings over the last 12 months were $1.95 per share. The P/E ratio for the stock could then be calculated as 43/1.95, or 22.05.

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.

Although P/E is often thought of as an indication of how the company has been priced in the past, it’s also an indication of what investors think of its future. That’s because stock prices are a reflection of how people think a stock will perform in the future. Therefore, companies with high P/Es are a sign that investors expect higher earnings growth in the future.

Taking on a bunch of debt generally increases a company’s risk profile, which lowers its P/E ratio. Higher debt (greater risk) may lower investors’ willingness to pay a higher price for the stock but leverage usually increases a company’s earnings and thus can increase the PE. However, if profits instead fall, the portion that goes to the stockholders is reduced because debt holders will have to be paid first. That being said, of two companies with the same operations, trading in the same sector, the company with a moderate debt load with have a lower P/E ratio than the company with no debt. Keep this in mind when using P/E as a tool for diagnosing a company’s vitals.