The general most common way to value a stock is using the P/E ratio. You can read more about it and its subtleties here. There are also several other ratios investors look at, and detailed descriptions of them are available here. All in all, there is no way to know with certainty when to buy or sell a stock, and what a fair price is. You should weigh your interests, risk tolerance, and information you have, to make wise investment decisions.
Steven Ko on Value
The advice is to think of it as a range and not as an exact number. Look at a stock’s value based on earnings growth and whether you can buy it when it’s cheap enough in order to lower risk.