Simply put, there are only three things that affect the price of your stocks: earnings, enthusiasm, and shares outstanding. To explain, I'll lean on the analogy of a pie.
Think of the American stock market as a pie. Since 1900, that pie has on average gotten 9.5% larger year to year. Of that 9.5%, 9.0% was American companies bringing in more earnings [1]. If you decide to buy a piece of the pie, you can expect your piece to roughly mirror the earnings growth of American companies going forward.
What was the other 0.5%? Enthusiasm. This is the only other thing that affects the size of the pie. It is why the value of stocks fluctuate daily - sometimes dramatically, even though nothing about the business and its earnings may have changed. When enthusiasm for a company grows, people are willing to pay more for a slice of it relative to its earnings. Thus, the size of the pie increases and your slice along with it.
Enthusiasm is measured by the price-to-earnings ratio. Since 1900, people are typically willing to pay 15 times the earnings of the US stock market to own a slice of its pie. Since 1980, people are willing to pay 25 times [1]. When you hear that the stock market is "undervalued" or "overvalued" it is usually in reference to the present PE ratio being below or above these historical points.
For an individual company, determining a fair price-to-earnings ratio is more unique. Compare its current PE ratio to its historical PE ratios. Is it significantly higher than usual? If so, it could be due for a regression to the mean or "lost years", where the stock price doesn't rise as fast as earnings because it's still catching up to the enthusiasm that got a little carried away. Significantly lower? Investigate to be sure but you could be eyeing a bargain opportunity to get more than just your fair share of earnings growth.
The value of a stock is the value of the company (known as market cap) divided by the total number of shares in circulation. Each share in circulation is a slice of the pie.
When a company reduces the number of pieces in the pie, your slice gets bigger even though the pie does not. The percentage of the company you own increases and so does the value of your slice.Conversely, when a company cuts new slices of pie, your piece gets smaller. Your shares will appreciate less than the earnings growth you were entitled to. Not yum.
You should look for a pie that is getting larger. Look for increasing earnings growth and a price-to-earnings ratio that has more room to go up than down relative to the price-to-earnings ratio for that company's history and its industry.
You should also look for a pie where your piece will get bigger, not smaller. Look for a reduction in the number of shares outstanding. This will make your investment returns greater than the earnings growth of the company.
And that's it. Thanks for reading!
[1] Bogle, John C.. The Little Book of Common Sense Investing (Little Books. Big Profits) Wiley.