The following formula is involved in the calculation of risk premiums for stocks:

Capital Asset Pricing Model (CAPM):
where R_{E} is the expected rate of return, R_{RF} is the riskfree rate of return, B is the beta value for the security, and R_{M} is the market rate of return.

The following references can be used to cite this stock risk premium calculator:
 Soper, D.S. (2019) "Stock Risk Premium Calculator (Online Software)", http://www.danielsoper.com/fincalc. 
 Pratt, S.P. and Grabowski, R.J. (2010). "Cost of Capital: Applications and Examples", Hoboken, NJ: John Wiley & Sons. 