Enter cash flows separated by commas. Start with the initial investment (negative value). Example: -10000, 2000, 3000
The interest rate paid on the amounts used to finance negative cash flows (cost of capital).
The interest rate compounded on positive cash flows.
Modified Internal Rate of Return (MIRR)
0.00%
Analysis:
Present Value of Costs (PV): $0.00
Future Value of Inflows (FV): $0.00
Duration (n): 0 periods
What is the Modified Internal Rate of Return (MIRR)?
The Modified Internal Rate of Return (MIRR) is a financial metric used to determine the attractiveness of an investment or project. It is designed to overcome the limitations of the traditional Internal Rate of Return (IRR). While standard IRR assumes that positive cash flows are reinvested at the IRR itself (which is often unrealistic for high-yielding projects), MIRR allows you to specify a distinct Reinvestment Rate and a Finance Rate.
How This MIRR Calculator Works
This calculator determines the MIRR by distinguishing between positive cash flows (revenues) and negative cash flows (costs/investments). The calculation follows three distinct steps:
Step 1 (Present Value of Costs): All negative cash flows are discounted back to the present time (Year 0) using the Finance Rate. This represents the total cost of the investment in today's terms.
Step 2 (Future Value of Inflows): All positive cash flows are compounded forward to the final period of the project using the Reinvestment Rate. This represents the total terminal value of the returns.
Step 3 (MIRR Calculation): The MIRR is derived by finding the discount rate that equates the Present Value of Costs with the Future Value of Inflows over the project's duration.
Understanding the Inputs
Cash Flows: A chronological list of money going in and out. The first number is usually negative, representing the initial outlay (e.g., -50000). Subsequent numbers represent returns or further costs.
Finance Rate (Discount Rate): This is the cost of capital. It is the interest rate a business pays to finance the initial investment or any negative cash flows during the project.
Reinvestment Rate: This is the rate of return the company expects to earn on the free cash flows generated by the project. It is typically lower than the project's IRR and reflects a more conservative, realistic return on cash.
Formula for MIRR
The mathematical formula used in this calculation is:
Where n is the number of periods (years), FV is calculated at the reinvestment rate, and PV is calculated at the finance rate.
Example Calculation
Imagine an investment with an initial cost of $10,000 (Cash Flow: -10000) followed by returns of $3,000, $4,000, and $5,000 over three years.
Finance Rate: 5%
Reinvestment Rate: 6%
Result: The MIRR would be calculated based on the terminal value of the $3k, $4k, and $5k reinvested at 6%, compared against the $10k initial cost financed at 5%.
function calculateMIRR() {
var cashFlowsInput = document.getElementById('cashFlows').value;
var financeRateInput = document.getElementById('financeRate').value;
var reinvestRateInput = document.getElementById('reinvestRate').value;
var errorDiv = document.getElementById('mirrError');
var resultBox = document.getElementById('resultBox');
// Reset display
errorDiv.style.display = 'none';
errorDiv.innerHTML = ";
resultBox.style.display = 'none';
// Validation
if (!cashFlowsInput || financeRateInput === " || reinvestRateInput === ") {
errorDiv.innerHTML = 'Please fill in all fields.';
errorDiv.style.display = 'block';
return;
}
// Parse Cash Flows
var flowsStr = cashFlowsInput.split(',');
var flows = [];
for (var i = 0; i < flowsStr.length; i++) {
var val = parseFloat(flowsStr[i].trim());
if (isNaN(val)) {
errorDiv.innerHTML = 'Invalid format in Cash Flows. Please use numbers separated by commas (e.g. -1000, 500, 600).';
errorDiv.style.display = 'block';
return;
}
flows.push(val);
}
if (flows.length < 2) {
errorDiv.innerHTML = 'You need at least two cash flows (an investment and a return) to calculate MIRR.';
errorDiv.style.display = 'block';
return;
}
var financeRate = parseFloat(financeRateInput) / 100;
var reinvestRate = parseFloat(reinvestRateInput) / 100;
var n = flows.length – 1; // Duration is number of periods (intervals), so count – 1
// Step 1: Calculate PV of negative flows at Finance Rate
var pvNeg = 0;
var hasNegative = false;
for (var t = 0; t < flows.length; t++) {
if (flows[t] < 0) {
// Discount negative flows to time 0
pvNeg += flows[t] / Math.pow(1 + financeRate, t);
hasNegative = true;
}
}
// Step 2: Calculate FV of positive flows at Reinvestment Rate
var fvPos = 0;
var hasPositive = false;
for (var t = 0; t 0) {
// Compound positive flows to time n
// Exponent is (n – t)
fvPos += flows[t] * Math.pow(1 + reinvestRate, n – t);
hasPositive = true;
}
}
// Error checking for logic
if (!hasNegative) {
errorDiv.innerHTML = 'Cash flows must contain at least one negative value (initial investment).';
errorDiv.style.display = 'block';
return;
}
if (!hasPositive) {
errorDiv.innerHTML = 'Cash flows must contain at least one positive value (return).';
errorDiv.style.display = 'block';
return;
}
// MIRR Formula: (FV_pos / -PV_neg)^(1/n) – 1
// Note: pvNeg is negative, so we take absolute or negate it.
var absPvNeg = Math.abs(pvNeg);
if (absPvNeg === 0) {
errorDiv.innerHTML = 'Present Value of costs is zero. Cannot divide by zero.';
errorDiv.style.display = 'block';
return;
}
var mirr = Math.pow(fvPos / absPvNeg, 1 / n) – 1;
var mirrPercentage = (mirr * 100).toFixed(2);
// Display Results
document.getElementById('mirrResult').innerHTML = mirrPercentage + '%';
document.getElementById('pvResult').innerHTML = formatCurrency(absPvNeg);
document.getElementById('fvResult').innerHTML = formatCurrency(fvPos);
document.getElementById('nResult').innerHTML = n;
resultBox.style.display = 'block';
}
function formatCurrency(num) {
return '$' + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}