In general, there are two methods to for the valuation of stocks to find whether it's overpriced or underpriced. They are:
1. Absolute valuation
2. Relative valuation
The absolute valuation determines the intrinsic value of the company based on the estimated free cash flows discounted to their present value. Discounted cash flow (DCF) is the most common approachfor absolute valuation.
If the current market value of the share is greater than the intrinsic value, then it's overpriced. On the other hand, if the current market price of the share is less than its intrinsic value, then it is undervalued.
The second approach is relative valuation.Relative valuation compares the company’s value to that of its competitors to find the company’s financial worth.
It’s similar to comparing the different houses in the same locality to find the worth of a house. Let’s say if most of the 3BHK apartment in a locality costs around 70 lakhs and you are able to find a similar 3 BHK apartment which costs 50 lakhs, then you can consider it cheap.
Here, you do not find the true worth of the apartment but just compare its price with the similar competitors.
Few of the common financial ratios used for the relative valuations are Price to Earnings (PE) ratio, Price to book value (PBV) ratio, PEG ratio etc. Read more about financial ratios here.
For example, if the PE ratio of a company is low compared to its competitors and industry, then it can be considered as underpriced.
It's really important to do the proper valuation of a stock before investing.
Let me end the answer with the famous quote from Benjamin Graham, the father of value investing.
"A great company is not a great investment if you have to overpay for it."
I hope it helps. Happy Investing.