The rate at which positive cash flows are reinvested.
The rate used to discount negative cash flows (if any).
Future Value of Returns (Terminal Value):–
Present Value of Costs:–
Investment Period:–
ERR: 0.00%
Understanding External Rate of Return (ERR)
The External Rate of Return (ERR), often synonymous with the Modified Internal Rate of Return (MIRR) in many financial contexts, is a financial metric used to determine the attractiveness of an investment or project. Unlike the standard Internal Rate of Return (IRR), the ERR assumes that positive cash flows are reinvested at a separate "external" rate—often the firm's cost of capital or a safe market rate—rather than at the project's own IRR.
Why Use ERR Instead of IRR?
The traditional IRR calculation has a significant flaw: it assumes that all interim cash flows generated by the project are reinvested immediately at the project's own internal rate of return. For high-yield projects, this assumption is often unrealistic. The ERR corrects this by splitting the calculation into two distinct phases using two different rates:
Reinvestment Rate: The rate at which you realistically expect to reinvest the profits generated by the project.
Financing Rate: The cost of capital or the interest rate paid on the funds used to finance the project's losses or initial costs.
The Calculation Logic
This calculator determines the ERR using the following step-by-step logic:
Future Value of Positive Flows: All positive cash flows (returns) are compounded forward to the end of the project using the Reinvestment Rate. This sums up to the "Terminal Value".
Present Value of Negative Flows: The initial outlay and any subsequent negative cash flows are discounted back to the present (Year 0) using the Financing Rate.
Solving for ERR: The calculator finds the discount rate that equates the Present Value of Costs to the Future Terminal Value over the investment period.
Example Calculation
Imagine a project with an initial cost of $10,000. Over the next 3 years, it generates returns of $3,000, $4,000, and $5,000.
Reinvestment Rate: 10%
Financing Rate: 5%
Instead of assuming the returns earn the project's high internal rate, the ERR calculator compounds the $3,000 and $4,000 forward at 10% to Year 3, sums them with the final $5,000, and calculates the annualized return required to turn the initial $10,000 into that final sum.
function calculateERR() {
// 1. Get DOM elements
var initialOutlayInput = document.getElementById('initialOutlay');
var cashFlowsInput = document.getElementById('cashFlows');
var reinvestmentRateInput = document.getElementById('reinvestmentRate');
var financingRateInput = document.getElementById('financingRate');
var resultContainer = document.getElementById('result-container');
var errorDiv = document.getElementById('error-message');
var fvResultSpan = document.getElementById('fv-result');
var pvResultSpan = document.getElementById('pv-result');
var periodResultSpan = document.getElementById('period-result');
var errFinalSpan = document.getElementById('err-final');
// 2. Parse and Validate Inputs
var initialOutlay = parseFloat(initialOutlayInput.value);
var reinvestRate = parseFloat(reinvestmentRateInput.value) / 100;
var financeRate = parseFloat(financingRateInput.value) / 100;
var cashFlowsStr = cashFlowsInput.value;
// Reset display
errorDiv.style.display = 'none';
resultContainer.style.display = 'none';
if (isNaN(initialOutlay) || initialOutlay <= 0) {
errorDiv.textContent = "Please enter a valid positive Initial Investment.";
errorDiv.style.display = 'block';
return;
}
if (isNaN(reinvestRate)) {
errorDiv.textContent = "Please enter a valid Reinvestment Rate.";
errorDiv.style.display = 'block';
return;
}
if (isNaN(financeRate)) {
errorDiv.textContent = "Please enter a valid Financing Rate.";
errorDiv.style.display = 'block';
return;
}
if (!cashFlowsStr.trim()) {
errorDiv.textContent = "Please enter at least one cash flow.";
errorDiv.style.display = 'block';
return;
}
// Parse comma-separated flows
var flowsArray = cashFlowsStr.split(',').map(function(item) {
return parseFloat(item.trim());
});
// Check if flows are valid numbers
for (var i = 0; i < flowsArray.length; i++) {
if (isNaN(flowsArray[i])) {
errorDiv.textContent = "Invalid number found in Cash Flows.";
errorDiv.style.display = 'block';
return;
}
}
var n = flowsArray.length; // Total periods
// 3. Calculation Logic
// Step A: Calculate PV of all Costs (Negative Flows + Initial Outlay)
// We treat Initial Outlay as occurring at t=0.
// We scan flowsArray (t=1 to t=n). If a flow is negative, discount it back to 0 using financeRate.
var pvCosts = initialOutlay; // Starts with initial investment
for (var t = 0; t < n; t++) {
var flow = flowsArray[t];
if (flow < 0) {
// t is index 0, which corresponds to Year 1.
// Formula: value / (1 + r)^(t+1)
pvCosts += Math.abs(flow) / Math.pow(1 + financeRate, t + 1);
}
}
// Step B: Calculate FV of all Returns (Positive Flows)
// We compound positive flows to the end of year n using reinvestRate.
var fvReturns = 0;
for (var t = 0; t 0) {
// Periods to compound = Total Years (n) – Current Year (t+1)
var yearsToCompound = n – (t + 1);
fvReturns += flow * Math.pow(1 + reinvestRate, yearsToCompound);
}
}
// Step C: Calculate ERR
// Formula: ERR = (FV_Returns / PV_Costs)^(1/n) – 1
if (pvCosts === 0) {
errorDiv.textContent = "Total costs cannot be zero.";
errorDiv.style.display = 'block';
return;
}
var errDecimal = Math.pow(fvReturns / pvCosts, 1 / n) – 1;
var errPercentage = errDecimal * 100;
// 4. Format and Display Results
// Helper to format currency
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
fvResultSpan.textContent = formatter.format(fvReturns);
pvResultSpan.textContent = formatter.format(pvCosts);
periodResultSpan.textContent = n + " Years";
errFinalSpan.textContent = errPercentage.toFixed(2) + "%";
resultContainer.style.display = 'block';
}