Money from shareholders never comes with an interest bill. No monthly installments, no maturity date. But make no mistake, that capital is anything but free: investors who put their money into a stock quietly set a target return, and if that target isn’t met, they can walk away at any time.
That is exactly what we’re trying to measure when we calculate cost of equity. Cost of equity is the return shareholders require (required return) as compensation for bearing the risk of holding a company’s shares. One of the most popular ways to estimate it is the Capital Asset Pricing Model (CAPM), which links return to systematic risk, the market risk that can’t be eliminated through diversification alone.
The easiest way to picture it: imagine two boats on the same sea. When a wave rolls in, the big ship barely rocks, while the small canoe gets tossed around far more. The wave is the market, the rocking is beta, and the harder a boat rocks, the higher the “fare” its passengers will ask for.
Disclaimer: all figures for Company X and Company Y in this article are fictional data for learning purposes, not data from any listed company or current market conditions. These examples are not investment advice, and CAPM results are estimates, not promises of profit.
The CAPM Formula to Calculate Cost of Equity
The CAPM formula used to calculate cost of equity states that the result equals the risk-free rate plus beta multiplied by the market risk premium. The formula is also covered in the classic textbook Principles of Managerial Finance by Gitman and Zutter.
Ke is the cost of equity; Rf the risk-free rate; β the stock’s beta; and E(Rm) the expected market return. The difference E(Rm) − Rf is called the equity risk premium (ERP), or market risk premium, so the formula can be shortened to Ke = Rf + β × ERP. A short explanation of the concept is also available in Investopedia’s CAPM entry.
One rule that’s easy to forget: stick to one currency and one time basis. Don’t mix an annual Rf with a monthly premium.
So, what ingredients do we need to calculate cost of equity? At least four: the risk-free rate, beta, the market risk premium, and a way to put them together into a final number. Let’s start with the simplest one.
Risk-Free Rate: Choose a Consistent Benchmark
The risk-free rate used to calculate cost of equity in rupiah is usually taken from the yield to maturity of rupiah-denominated government bonds with a tenor close to the cash flow horizon, for example ten years for long-term valuation. What we use is the yield to maturity, not the coupon, on a clearly stated valuation date.
Yield curve data can be checked on the website of Penilai Harga Efek Indonesia (PHEI), Indonesia’s bond pricing agency. Get into the habit of noting the source, date, currency, and tenor every time you update the model (trust me, six months from now we’ll have forgotten where that number came from).
It’s worth noting that government bonds aren’t automatically free of all risk. Their prices change when interest rates move, and the issuer still carries default risk. In approaches that adjust for country risk, the risk-free rate can be derived from the government yield minus the sovereign default spread. The framework must be consistent with the ERP so that country risk isn’t counted twice; a full discussion is available in Aswath Damodaran’s discount rate notes at NYU Stern.
Beta Coefficient: Understand the Risk Being Measured
Beta measures how sensitive a stock’s return is to movements in the market’s return. A beta of 1 means the stock moves roughly in line with the market, 0.8 means less sensitive, 1.5 means more sensitive, and a negative beta (below zero) tends to move in the opposite direction to the market.

A beta of 1 also doesn’t mean perfect correlation with the market, only an average sensitivity of roughly one to one. More importantly, a low beta doesn’t automatically mean a stock is safe. A company can still stumble over debt, liquidity, governance, or business problems. On the other hand, a high beta doesn’t guarantee high returns or beating the market. Even a big ship can spring a leak, right?
For a portfolio, beta is calculated as the weighted average of each stock’s beta, weighted by the market value of each position:
A portfolio beta of around one only indicates market sensitivity of around one, not a guarantee that the portfolio is safe. The number still needs to be read alongside concentration, liquidity, and the risks of each business.
Calculating Beta from Paired Returns
Beta is calculated by dividing the covariance of the stock’s return and the market’s return by the variance of the market’s return, using paired data on the same dates.
Ri is the stock’s return and Rm the return of the benchmark index. For a stricter estimate, regress the stock’s excess return against the market’s excess return, meaning each return minus the risk-free rate for the same period. If the risk-free rate is constant, subtracting it doesn’t change the slope.
Five years of monthly data can be a starting point, but a longer history isn’t always better if the company’s business has changed. For 60 monthly returns, we need 61 price points. And don’t use data from after the valuation date.
P is the price and D the dividend during the period. If the price rises from 1,000 to 1,030 and the dividend is Rp20, the price return is 3% while the total return is 5%. Adjust for stock splits and corporate actions as well. If you use an adjusted close series that already includes dividends, don’t add them again.
For the benchmark index, see the stock index information from the Indonesia Stock Exchange (IDX). The IDX Composite (IHSG) is a proxy for the domestic market, not the entire theoretical market portfolio of CAPM. Data from vendors such as Yahoo Finance can also be used, as long as you check the definitions, price adjustments, and beta methodology; download features can also change at any time.
A Fictional Example and Excel Formulas
The betas of Company X and Company Y in this example are calculated from six fictional monthly returns using Excel’s SLOPE function, giving a beta of 0.8 for X and 1.5 for Y. Six observations are only for arithmetic practice, not enough for a real company.
| Month: market (column B) | X (column C) | Y (column D) |
|---|---|---|
| M1: −4% | −2.4% | −6.5% |
| M2: 2% | 2.4% | 2.5% |
| M3: 5% | 4.8% | 7% |
| M4: −1% | 0% | −2% |
| M5: 3% | 3.2% | 4% |
| M6: −3% | −1.6% | −5% |
Beta X is calculated with =SLOPE(C2:C7,B2:B7), and the result is 0.8. Beta Y uses =SLOPE(D2:D7,B2:B7), and the result is 1.5. The first argument is the stock’s return, the second is the market’s return (swap them by accident and the result might surprise you, hehe).
The same result can be obtained with =COVARIANCE.S(C2:C7,B2:B7)/VAR.S(B2:B7), or with the COVARIANCE.P and VAR.P pair. Don’t mix population covariance with sample variance, because their divisors are different. Replace commas with semicolons if your Excel settings require it; details are in Microsoft’s SLOPE documentation.
Market Return and the Market Risk Premium
The expected market return used to calculate cost of equity is a forward-looking expectation of market returns; historical returns only help build assumptions and don’t automatically become the expected figure. A price index also doesn’t include dividends the way a total return index does.
The arithmetic mean is often used to estimate a single-period return, while the geometric mean summarizes historical compound growth. Still confused about the difference? Try a simple example: a return of +20% followed by −20% gives an arithmetic mean of 0%, but a geometric mean of about −2.02% per period. Rp100 million grows to Rp120 million, then falls to Rp96 million. So the geometric mean isn’t automatically the best CAPM input.
In Excel, create a gross return column containing 1 + return, then use =GEOMEAN(range_gross_return)-1. Don’t apply GEOMEAN directly to raw returns, because all the factors must be positive.
This formula only annualizes the monthly geometric result; it doesn’t turn it into a forecast. An alternative way to build the ERP is the implied premium approach; the data and methodology can be found on NYU Stern’s country risk premium page. Match the date, market, and risk framework, and don’t add a country risk premium again if it’s already included.
The Security Market Line and the Company X and Y Example
With fictional annual assumptions of Rf 5% and ERP 6%, the result when we calculate cost of equity for Company X, with a beta of 0.8, is 9.8%, while Company Y, with a beta of 1.5, reaches 14% per year. These figures don’t represent the Indonesian market on any particular date.
The Security Market Line (SML) shows the relationship between beta on the horizontal axis and required return on the vertical axis. In this example, the line starts at 5% when beta is zero and rises with a slope equal to the 6% ERP.
When beta = 1, cost of equity = 11%, which is the expected market return, not the 6% ERP. With a positive ERP and other assumptions unchanged, a beta above one produces a required return above the expected market return. Remember, the SML is a relationship within the model, not a guarantee of returns for every stock on the IDX.
Now let’s test the sensitivity. The summary below shows how much the results change if the ERP rises by one percentage point:
| Component | Company X | Company Y |
|---|---|---|
| Beta | 0.8 | 1.5 |
| Cost of equity (ERP 6%) | 9.8% | 14% |
| Cost of equity (ERP 7%) | 10.6% | 15.5% |
In other words, small changes in assumptions can shift a valuation meaningfully, especially for high-beta stocks. When you calculate cost of equity for a real company, document every input and check several scenarios.
Cost of Equity Example: danieel.id Company
The cost of equity of danieel.id Company is 11.2% a year, calculated with CAPM from a 4% risk-free rate, a beta of 1.2, and a 6% market risk premium. This company is imaginary, not a real one. It is the same single example used throughout the financial statement analysis guide, the e-book, and the danieel.id videos, so its numbers can be followed from the income statement all the way to stock valuation.
ke = 4.0% + 1.2 × 6.0% = 11.2%
Because the figures of danieel.id Company are in US dollars, the risk-free benchmark is a US government bond, not a rupiah government bond. A beta of 1.2 means the stock moves slightly more than the market, so shareholders require a return above the 10% market return.
This number also answers a question raised by DuPont analysis: the return on equity of danieel.id Company is only 7.6%, still below the 11.2% its shareholders require. The comparison is rough, because ROE is an accounting measure, while the cost of equity is based on market expectations.
From Cost of Equity to WACC
Cost of equity is one component of WACC (weighted average cost of capital), together with the after-tax cost of debt. For a simple capital structure with no preferred shares, the formula is:
E and D are the market values of equity and debt, Kd the before-tax cost of debt, and T the relevant tax rate. How to get Kd is covered in the article on how to calculate cost of debt, while putting everything together into one number is explained in WACC calculation. To understand the business condition behind those numbers, also read about company financial ratios.
This article covers stage 7 of the eight stages in our financial statement analysis roadmap. If you’d like to learn in order, from the basic statements all the way to stock valuation, start with its roadmap.
A Few Questions from Readers
What is cost of equity?
Cost of equity is the minimum return shareholders require as compensation for the risk of holding a company’s shares. It is used as the discount rate for equity and as a component of WACC.
How do you calculate cost of equity with CAPM?
Add the risk-free rate to beta multiplied by the market risk premium. With a risk-free rate of 5%, a beta of 0.8, and an ERP of 6%, the result is 9.8% per year.
Does a low beta mean a stock is safer?
Not automatically. Beta only measures sensitivity to the market, so a low-beta stock can still be risky because of debt, liquidity, governance, or problems in its own business.
Where can I find risk-free rate data for Indonesian stocks?
Rupiah government bond yields can be checked on the PHEI website. Choose a tenor that matches the valuation horizon, use the yield to maturity, and note the data date.
Why is cost of equity usually higher than cost of debt?
Shareholders are paid after creditors and receive no fixed return, so their risk is greater and the return they require is higher too. Interest on debt also generally enjoys a tax benefit, while dividends don’t.
So, Why Bother Calculating Cost of Equity?
In short, CAPM combines three ingredients: the risk-free rate from government bond yields, beta from stock returns paired with the market, and a carefully built market risk premium. The result is the cost of equity, which then feeds into WACC and valuation.
Back to those two boats. The wave is the same, but canoe passengers can fairly ask for a higher fare than passengers on the big ship. Investors work the same way: the more sensitive a stock is to market swings, the higher the return they demand. This is where the biggest benefit lies when we calculate cost of equity: risk assumptions that were vague become clear, written down, and testable.
The first step is simple: download five years of monthly prices for one stock you like and the IDX Composite, then try calculating its beta with SLOPE. Compare the result with the beta from a data provider, and look at where the difference comes from. Use the result as an analytical tool, not a forecast; investors aren’t fortune tellers.
If you give it a try, what beta did you get, and was it what you expected? Share your number in the comments, and maybe we can compare notes together.
This post is also available in:



