Calculate the weighted average return based on multiple scenarios.
Enter the probability (%) and the potential return (%) for up to three market scenarios. Ensure total probability equals 100%.
Scenario
Probability (%)
Return (%)
Scenario A (e.g. Bull)
Scenario B (e.g. Neutral)
Scenario C (e.g. Bear)
What is an Expected Rate of Return?
The expected rate of return is the profit or loss an investor anticipates on an investment that has known or estimated historical rates of return. It is calculated by multiplying potential outcomes (returns) by the chances of each occurring (probabilities) and then summing those results.
While the expected rate does not guarantee a specific result, it serves as a critical tool for portfolio construction. It allows investors to compare different assets on an "apples-to-apples" basis by factoring in risk. If two investments have the same expected rate but different probability distributions, an investor can choose the one that better fits their risk tolerance.
function calculateExpectedRate() {
var pA = parseFloat(document.getElementById('probA').value) || 0;
var rA = parseFloat(document.getElementById('retA').value) || 0;
var pB = parseFloat(document.getElementById('probB').value) || 0;
var rB = parseFloat(document.getElementById('retB').value) || 0;
var pC = parseFloat(document.getElementById('probC').value) || 0;
var rC = parseFloat(document.getElementById('retC').value) || 0;
var totalProb = pA + pB + pC;
var resultDiv = document.getElementById('rateResult');
var errorBox = document.getElementById('errorBox');
// Validate that probabilities sum to approximately 100%
if (Math.abs(totalProb – 100) > 0.01) {
errorBox.innerHTML = "Error: Total probability must equal 100%. Your current total is " + totalProb.toFixed(2) + "%.";
errorBox.style.display = 'block';
resultDiv.style.display = 'none';
return;
}
errorBox.style.display = 'none';
// Calculation: Sum of (Probability / 100 * Return)
var expectedReturn = (pA / 100 * rA) + (pB / 100 * rB) + (pC / 100 * rC);
document.getElementById('resultText').innerText = "The Weighted Expected Rate is:";
document.getElementById('resultValue').innerText = expectedReturn.toFixed(2) + "%";
resultDiv.style.display = 'block';
resultDiv.style.backgroundColor = expectedReturn >= 0 ? '#f0fdf4' : '#fef2f2';
document.getElementById('resultValue').style.color = expectedReturn >= 0 ? '#166534' : '#991b1b';
}