Cost of Equity Calculator
:root {
–primary-blue: #004a99;
–success-green: #28a745;
–light-background: #f8f9fa;
–dark-text: #333;
–border-color: #ccc;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(–light-background);
color: var(–dark-text);
line-height: 1.6;
margin: 0;
padding: 20px;
}
.calculator-container {
max-width: 800px;
margin: 30px auto;
background-color: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
border: 1px solid var(–border-color);
}
h1, h2 {
color: var(–primary-blue);
text-align: center;
margin-bottom: 20px;
}
.input-group {
margin-bottom: 20px;
padding: 15px;
border: 1px solid var(–border-color);
border-radius: 5px;
background-color: #fdfdfd;
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: center;
}
.input-group label {
font-weight: bold;
margin-right: 10px;
flex: 1 1 150px; /* Flexible width for labels */
min-width: 120px;
}
.input-group input[type="number"],
.input-group select {
padding: 10px;
border: 1px solid var(–border-color);
border-radius: 4px;
font-size: 1rem;
flex: 2 1 200px; /* Flexible width for inputs */
min-width: 150px;
}
button {
display: block;
width: 100%;
padding: 12px 20px;
background-color: var(–primary-blue);
color: white;
border: none;
border-radius: 5px;
font-size: 1.1rem;
cursor: pointer;
transition: background-color 0.3s ease;
margin-top: 10px;
}
button:hover {
background-color: #003366;
}
#result {
margin-top: 30px;
padding: 20px;
background-color: var(–success-green);
color: white;
text-align: center;
font-size: 1.5rem;
font-weight: bold;
border-radius: 5px;
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.explanation {
margin-top: 40px;
padding: 25px;
background-color: #e9ecef;
border-radius: 8px;
border: 1px solid var(–border-color);
}
.explanation h2 {
color: var(–primary-blue);
text-align: left;
margin-bottom: 15px;
}
.explanation p, .explanation ul, .explanation li {
margin-bottom: 15px;
color: #555;
}
.explanation li {
list-style-type: disc;
margin-left: 20px;
}
.formula {
background-color: #fff;
padding: 15px;
border-radius: 4px;
margin-top: 10px;
font-family: 'Courier New', Courier, monospace;
color: #000;
text-align: center;
border: 1px dashed var(–border-color);
}
@media (max-width: 600px) {
.input-group {
flex-direction: column;
align-items: flex-start;
}
.input-group label, .input-group input[type="number"], .input-group select {
flex: none;
width: 100%;
}
.calculator-container {
padding: 20px;
}
}
Cost of Equity Calculator
Understanding the Cost of Equity
The Cost of Equity (CoE) is a fundamental concept in finance that represents the return a company requires to compensate its equity investors for the risk of owning the stock. Essentially, it's the opportunity cost of investing in a specific company's stock compared to other investments with similar risk profiles. Companies use the Cost of Equity in various financial decisions, such as capital budgeting, valuation, and assessing mergers and acquisitions.
The Capital Asset Pricing Model (CAPM)
The most widely used method to calculate the Cost of Equity is the Capital Asset Pricing Model (CAPM). The CAPM is a model that describes the relationship between the systematic risk of an asset (like a stock) and its expected return. It assumes that investors are compensated for bearing systematic risk, which is risk that cannot be diversified away.
CAPM Formula:
Cost of Equity = Risk-Free Rate + Beta * (Market Risk Premium)
Let's break down the components of the CAPM:
-
Risk-Free Rate (Rf): This is the theoretical rate of return of an investment with zero risk. In practice, it's often represented by the yield on long-term government bonds (e.g., U.S. Treasury bonds) of a developed country, as these are considered to have minimal default risk.
-
Beta (β): Beta measures the volatility, or systematic risk, of a particular stock in comparison to the market as a whole.
- A beta of 1 means the stock's price tends to move with the market.
- A beta greater than 1 indicates the stock is more volatile than the market.
- A beta less than 1 suggests the stock is less volatile than the market.
-
Market Risk Premium (MRP): This is the excess return that investing in the stock market provides over the risk-free rate. It represents the additional compensation investors expect for taking on the risk of investing in the stock market instead of a risk-free asset. It's typically calculated as the expected market return minus the risk-free rate. (Expected Market Return – Risk-Free Rate).
How to Use This Calculator:
- Input the Risk-Free Rate: Enter the current yield of a long-term government bond (expressed as a percentage).
- Input the Beta: Find the stock's beta from a reliable financial data source (e.g., Yahoo Finance, Bloomberg) and enter it.
- Input the Market Risk Premium: Enter the expected excess return of the market over the risk-free rate (expressed as a percentage).
- Click "Calculate Cost of Equity".
Example Calculation:
Suppose a company has the following characteristics:
- Risk-Free Rate: 3.5%
- Beta: 1.2
- Market Risk Premium: 6.0%
Using the CAPM formula:
Cost of Equity = 3.5% + 1.2 * (6.0%)
Cost of Equity = 3.5% + 7.2%
Cost of Equity = 10.7%
This means investors would expect a return of 10.7% from investing in this company's stock to compensate them for the risk involved.
Use Cases:
- Valuation: Used as the discount rate in Discounted Cash Flow (DCF) analysis to determine the intrinsic value of a company's stock.
- Capital Budgeting: Helps companies decide whether to invest in new projects by comparing the project's expected return to the cost of equity.
- Performance Measurement: Used to assess whether a company is generating returns that exceed the cost of its equity financing.
- Mergers & Acquisitions: Aids in determining the fairness of an acquisition price.
function calculateCostOfEquity() {
var riskFreeRateInput = document.getElementById("riskFreeRate");
var betaInput = document.getElementById("beta");
var marketRiskPremiumInput = document.getElementById("marketRiskPremium");
var resultDiv = document.getElementById("result");
var riskFreeRate = parseFloat(riskFreeRateInput.value);
var beta = parseFloat(betaInput.value);
var marketRiskPremium = parseFloat(marketRiskPremiumInput.value);
if (isNaN(riskFreeRate) || isNaN(beta) || isNaN(marketRiskPremium)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
resultDiv.style.backgroundColor = "#f8d7da"; // Error color
resultDiv.style.color = "#721c24";
resultDiv.style.display = "block";
return;
}
var costOfEquity = riskFreeRate + beta * marketRiskPremium;
resultDiv.innerHTML = "Cost of Equity:
" + costOfEquity.toFixed(2) + "%";
resultDiv.style.backgroundColor = "var(–success-green)";
resultDiv.style.color = "white";
resultDiv.style.display = "block";
}