A stock is worth the same as a bank account which will generate the same future cash flows. This is a present value computation. Treat proceeds from stock buybacks like dividends.
Stocks are riskier than bank accounts.
Increase the required interest rate and use expected dividends. Expected dividends may be increasing or decreasing instead of constant. There are more complicated present value formulas. People don't agree on expected dividends. Many people are employed as analysts who carefully read company reports.