This calculator helps determine the implied Risk-Free Rate ($R_f$) based on the Capital Asset Pricing Model (CAPM) formula, given the expected return of an asset, its beta, and the expected market return.
Standard measure of volatility relative to the market.
.capm-calculator-container {
background: #f9f9f9;
padding: 25px;
border: 1px solid #ddd;
border-radius: 8px;
max-width: 600px;
margin: 20px auto;
}
.capm-form-group {
margin-bottom: 15px;
}
.capm-form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
}
.capm-form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Ensures padding doesn't affect width */
}
.capm-calc-btn {
width: 100%;
padding: 12px;
background-color: #0073aa;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
}
.capm-calc-btn:hover {
background-color: #005177;
}
.capm-result-box {
margin-top: 20px;
padding: 15px;
background: #eef7fc;
border: 1px solid #cce5ff;
border-radius: 4px;
min-height: 50px;
}
function calculateRiskFreeRateCapm() {
// Get input values
var expectedAssetReturnInput = document.getElementById('expectedAssetReturn').value;
var assetBetaInput = document.getElementById('assetBeta').value;
var expectedMarketReturnInput = document.getElementById('expectedMarketReturn').value;
var resultDiv = document.getElementById('rfResult');
// Validate inputs exist and are numbers
if (expectedAssetReturnInput === "" || assetBetaInput === "" || expectedMarketReturnInput === "" || isNaN(parseFloat(expectedAssetReturnInput)) || isNaN(parseFloat(assetBetaInput)) || isNaN(parseFloat(expectedMarketReturnInput))) {
resultDiv.innerHTML = "Please enter valid numeric values for all inputs.";
return;
}
// Parse inputs
var eRiPercent = parseFloat(expectedAssetReturnInput);
var beta = parseFloat(assetBetaInput);
var eRmPercent = parseFloat(expectedMarketReturnInput);
// CRITICAL EDGE CASE: If Beta is exactly 1, the formula results in division by zero.
// The rearranged formula is Rf = (E(Ri) – Beta * E(Rm)) / (1 – Beta)
if (Math.abs(beta – 1.0) < 0.0001) {
resultDiv.innerHTML = "Mathematical Error: When Beta is exactly 1.0, the risk-free rate cannot be isolated using this formula due to division by zero. The asset return and market return should theoretically be equal in this scenario.";
return;
}
// Convert percentages to decimals for calculation
var eRiDecimal = eRiPercent / 100;
var eRmDecimal = eRmPercent / 100;
// Calculate Numerator: E(Ri) – (Beta * E(Rm))
var numerator = eRiDecimal – (beta * eRmDecimal);
// Calculate Denominator: 1 – Beta
var denominator = 1 – beta;
// Calculate Risk-Free Rate Decimal
var rfDecimal = numerator / denominator;
// Convert back to percentage
var rfPercentage = rfDecimal * 100;
// Display Result
resultDiv.innerHTML = "
Calculation Result
Based on the inputs provided, the implied Risk-Free Rate is: " + rfPercentage.toFixed(2) + "%";
}
Understanding the Risk-Free Rate in CAPM
The Capital Asset Pricing Model (CAPM) is a widely used financial model that establishes a linear relationship between the required return on an investment and risk. The standard formula is:
$E(R_i) = R_f + \beta_i(E(R_m) – R_f)$
Where:
$E(R_i)$: Expected Return of the asset.
$R_f$: The Risk-Free Rate.
$\beta_i$ (Beta): The measure of the asset's volatility in relation to the market.
$E(R_m)$: The Expected Return of the market.
Usually, CAPM is used to calculate the Expected Return ($E(R_i)$). However, corporate finance professionals and investors sometimes need to "reverse engineer" the formula to determine the implied risk-free rate given the current market expectations and asset pricing.
How to Calculate Risk-Free Rate from CAPM
To find the Risk-Free Rate ($R_f$), we rearrange the standard CAPM formula. The derived formula used by the calculator above is:
Convert back to percentage: $0.035 \times 100 = \mathbf{3.5\%}$
In this scenario, the implied risk-free rate is 3.5%.
Important Considerations
The "Beta = 1" Edge Case: If an asset has a beta of exactly 1.0, it moves perfectly in sync with the market. In this case, its expected return should equal the market return ($E(R_i) = E(R_m)$). The formula above cannot be used if Beta is 1 because the denominator ($1 – \beta$) becomes zero, leading to a mathematical error.
The risk-free rate is typically represented by the yield on government treasury securities (like the 10-year US Treasury note), as these are considered to have negligible default risk.