Complete Guide to the Price-to-Earnings Ratio Algorithm: An Article Explaining the Core Metric of Stock Valuation

robot
Abstract generation in progress

Why is the Price-to-Earnings Ratio so Important?

When investing in stocks, the P/E ratio is basically the first metric you must understand. Many investment advisors like to use this number to make their points: what is the company’s historical P/E ratio, what is the current stock price, and what should a reasonable price be? How to calculate, how to use it, whether high is good or low is better—this article provides you with the most comprehensive answers.

What exactly is the P/E ratio?

The P/E ratio, also called the Price-to-Earnings ratio, abbreviated as PE or PER (Price-to-Earning Ratio), simply means: how many years it takes for your investment to be recouped from the company’s profits.

Taking TSMC as an example, its P/E ratio is about 13 times, which means: buying TSMC stock requires about 13 years to recover your investment cost through the company’s profits.

A lower P/E = cheaper stock; a higher P/E = higher market valuation (possibly because investors are optimistic about its future or its growth rate is fast).

How to calculate the P/E ratio? Choose one of two methods

Method 1: Stock Price ÷ Earnings Per Share (EPS) = P/E Ratio
Method 2: Company Market Cap ÷ Net Profit Attributable to Shareholders = P/E Ratio

We usually use the first method. Using TSMC as an example:

  • Current stock price: NT$520
  • EPS for 2022: NT$39.2
  • P/E ratio = 520 ÷ 39.2 = 13.3 times

This is the most basic form of the P/E calculation.

How many types of P/E ratios are there? Don’t get confused by different names

Depending on whether past profit data or estimated future profits are used, P/E ratios are divided into two main categories, which further subdivide into three types:

Static P/E Ratio (using past data)

Formula: Stock Price ÷ Annual EPS

Uses the company’s publicly released full-year profit data. For example, TSMC’s 2022 EPS = Q1(7.82) + Q2(9.14) + Q3(10.83) + Q4(11.41) = 39.2

Before the new annual report is released, EPS remains unchanged, so the PE fluctuation only comes from stock price changes. This is what “static” means.

Rolling P/E Ratio (using the latest data, but not market data)

Formula: Stock Price ÷ Sum of latest 4 quarters’ EPS

This method is called TTM (Trailing Twelve Months), with high update frequency. For example, if TSMC just announced Q1 2023 EPS of NT$5, then:

Latest 4 quarters’ EPS = 22Q2(9.14) + 22Q3(10.83) + 22Q4(11.41) + 23Q1(5) = 36.38
Rolling PE = 520 ÷ 36.38 = 14.3 times

Compare this with static PE: still 13.3, but the rolling PE has already risen to 14.3. So, the rolling PE can reflect the latest situation more promptly.

Dynamic P/E Ratio (using estimated data)

Formula: Stock Price ÷ Estimated annual EPS

If an institution estimates TSMC’s 2023 EPS at NT$35, then dynamic PE = 520 ÷ 35 = 14.9 times

This kind of P/E calculation sounds very appealing (can see into the future), but the problem is: each institution’s estimates vary, and often overestimate or underestimate, so its practical value is actually less than the first two methods.

What is a reasonable P/E ratio? Use two methods to benchmark

Method 1: Compare with industry peers

Different industries have vastly different P/E ratios. Data from the Taiwan Stock Exchange shows that the PE in the automotive industry can reach up to 98 times, while the shipping industry is only 1.8 times—completely incomparable.

Only compare with companies in the same industry and similar business models. For example, compare TSMC with UMC and Powertech:

  • TSMC PE: 23.85 times
  • UMC PE: 15 times

TSMC’s PE is relatively higher.

Method 2: Compare with the company’s own historical PE

Compare the current PE with past PE to judge high or low. TSMC’s current PE of 23.85 is in the upper middle of its 5-year range—not at bubble highs, nor at recession lows, but at a normal rebound level after economic improvement.

Practical application: how to use P/E ratio to select stocks?

P/E River Map: Quickly see if a stock is expensive or cheap

This is a very intuitive tool. The principle is simple: Stock Price = EPS × P/E Ratio

The chart draws 5-6 lines:

  • Top line = Highest historical PE × current EPS
  • Bottom line = Lowest historical PE × current EPS
  • Middle lines = PE levels at different stages

Looking at TSMC’s river map, the latest stock price falls between a PE of 13-14.8, positioned in the lower range, indicating undervaluation—usually a good buying opportunity.

But note: Low P/E doesn’t necessarily mean the stock price will rise; high P/E doesn’t guarantee it will fall. Many factors influence stock prices, and P/E is just one of them.

What is the market logic behind high P/E and low P/E?

The market is willing to assign high valuation to a stock mainly because it expects strong growth. So many tech stocks have high P/E ratios, and their stock prices can continue to rise—because investors believe their future profits will catch up with this valuation.

Conversely, low P/E may just reflect temporary company weakness, but the fundamentals are sound, and the market is still willing to hold. So, looking at P/E alone can be misleading.

The three major pitfalls of P/E: be cautious when using

Pitfall 1: Ignoring corporate debt in calculations

P/E only considers equity value and does not account for a company’s debt. Two companies may have the same P/E, but one earns from its own funds, the other from borrowed money—the former is safer, with completely different risks.

When interest rates rise or the economy downturns, highly leveraged companies suffer more. So, a low P/E doesn’t necessarily mean cheaper; it could mean higher risk.

Pitfall 2: Hard to judge whether P/E is high or low

  • It might be a temporarily sluggish company (profit decline), with a high P/E, but no fundamental problem
  • Or it could be optimistic about future growth, with a high P/E now, but expected to normalize next year or later
  • Or it might just be speculative hype, requiring adjustment

These situations vary greatly across companies, making it hard to judge solely based on historical experience.

Pitfall 3: New startups and loss-making companies can’t use P/E

Many startups and biotech stocks have no profits and can’t calculate EPS, so P/E isn’t applicable. In such cases, use other metrics like PB (Price-to-Book ratio) or PS (Price-to-Sales ratio).

PE, PB, PS: How to choose among these valuation metrics?

Metric Name Formula How to use Suitable for companies
PE Price-to-Earnings Ratio Stock Price ÷ EPS Higher PE = more expensive Profitable, stable companies
PB Price-to-Book Ratio Stock Price ÷ Book Value per Share PB<1 undervalued, >1 overvalued Cyclical companies
PS Price-to-Sales Ratio Stock Price ÷ Revenue per Share Higher PS = more expensive Companies not yet profitable

Once you understand how to calculate P/E and these three metrics, you’ll be able to reasonably assess whether a stock is worth buying and find investment targets that match your risk appetite.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
  • Pin

Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)