The short answer is Net Present Value or Discounted Cash Flow. Future money is worth less than present money for inflation and other reasons. So you discount any future moneys by some amount per year--doesn't need to be a fixed amount--and eventually you reach a point where that dollar you're receiving in 50 years is worth... not much.
Very theoretically stocks are valued in the same way based on future dividend payments. But that's not really how analysts price companies.