Cost of equity refers to the rate of return that shareholders
expect in return for their investment and as compensation for the
risk taken by them in investing into that company.
So, from the shareholders' point of view, this expected rate of
return (cost of equity) would be the opportunity cost of equity,
i.e. the rate of return forgone by investing in the company rather
than considering alternative investment options.
Cost of equity is determined through various different models
such as the Capital Asset Pricing Model (CAPM), Gordon model and
many others.
Here is more information and calculator of cost of equity with
formulas and examples
https://trignosource.com/Cost%20of%20equity.html