CAPM (Capital Asset Pricing Model) is method widely used for equity cost calculation. Equity cost should show the return that investor should expect/seek from an investment that contains specific level of risk.
CAPM states that return from the asset depends on two parts: risk free interest rate + risk premium. Capital Asset Pricing Model is also the key for WACC calculation.
As the purpose of this method is to calculate the required rate of return or cost of equity capital, it has to be done accordance to market conditions. Of course, there are more methods to determine equity capital cost but this model is used the most in practice by far and is especially helpful in DCF valuation method.
CAPM Formula (Cost of Equity Formula)
Cost of equity = Risk free rate + Beta * (Expected return of the market – Risk free rate) + Additional risk
Risk free rate normally is equal to interest rate of safezone bonds. However, as riskfree is hypothetical as everything else in financial calculations, it could be also the rate of bonds of that country for which the investment belongs, but in this case currencies must match and it is very important not to include country’s risk premium twice.
Beta shows the volatility of the stock. The average beta is equal to 1.0 and it is beta of total stock market. If the beta is higher, it means stock is more risky. For example, if beta is equal to 2.0 it means that price of such stock is changing twice faster that stock market index. There are two ways to determine beta:
 To use historical data of the stock chart and compare it to the market index. But to use this method the data of many stock trading years (decades) is needed, and those data should not be disturbed by some onetime events of critical importance.
 To use beta of the sector that are calculated empirically. You may find calculated average betas of all the sectors in this page. However, to be correct you should use ‘unlevered beta corrected for cash’ and convert it in to standard beta according the debt to equity ratio of your company that is under valuation.
‘Expected return of the market – Risk free rate’ (this difference is also called as market risk premium) theoretically are two different indicators, but in practice this difference is used as one constant number. This number is calculated as a difference between historical stock market return and risk free bond market return, and mostly this number is equal to 4.0 for matured markets. However, there are different methodologies to calculate this ratio and some experts may take this number from 3.5 to 5.0. But normally this rate has to be always equal for the same country and do not change over time. Though, some riskier countries should include country risk as well, that is why ‘Expected return of the market – Risk free rate’ should be different for a stable market and for emerging market. Yet, this is historical approach. Implied market risk premium approach now gets its popularity against historical approach.
Additional risk should include risk that is not represented by beta and country risk. The examples of additional risk may be low stock liquidity, new management with bad track record in the company or other. Additional risk should be added only in specific cases while normal stocks should have no additional risk premium. (There is no additional risk in original CAPM formula).

There might be many criticism of this method; however, I do strongly believe that there is no other better method to use in practice for cost of equity calculation. Yet Capital Asset Pricing Model now has many modifications of which some has developed in new methods, but the essence stays the same.
In the practice the calculation of equity cost has many nuances that are treated differently by different specialists. Most of those nuances could be simplified or made in a more precise way. For example, equity costs should be calculated differently for the near period discounting and for terminal value.
In fact, a lot of experience is needed to use CAPM correctly, and every little mistake may have huge error on the result for the stock valuation.