Modified Internal Rate of Return Calculator

Modified Internal Rate of Return (MIRR) Calculator

The Modified Internal Rate of Return (MIRR) is a financial metric used to evaluate the profitability of an investment or project. Unlike the traditional Internal Rate of Return (IRR), MIRR addresses some of its limitations, particularly the assumption that intermediate cash flows are reinvested at the IRR itself. MIRR assumes that all positive cash flows are reinvested at a specified rate (the reinvestment rate), and all negative cash flows are financed at a specified rate (the financing rate).

This distinction makes MIRR a more realistic measure for many investment scenarios, as it explicitly accounts for the cost of capital and the expected returns on reinvested funds. A higher MIRR generally indicates a more desirable investment.

How to Use the MIRR Calculator:

  1. Initial Investment: Enter the initial cash outflow (usually a negative number) at the beginning of the project.
  2. Cash Flow Years: For each subsequent year, enter the net cash flow (positive or negative) expected for that year.
  3. Reinvestment Rate (%): Enter the rate at which positive cash flows are expected to be reinvested. This is often the company's cost of capital or a target rate of return.
  4. Financing Rate (%): Enter the rate at which negative cash flows (if any) are financed. This is often the company's borrowing cost.

Click "Calculate MIRR" to see the result.









function calculateMIRR() { var initialInvestment = parseFloat(document.getElementById("initialInvestment").value); var cashFlowsText = document.getElementById("cashFlows").value; var reinvestmentRate = parseFloat(document.getElementById("reinvestmentRate").value) / 100; var financingRate = parseFloat(document.getElementById("financingRate").value) / 100; var resultElement = document.getElementById("mirrResult"); resultElement.innerHTML = ""; if (isNaN(initialInvestment) || isNaN(reinvestmentRate) || isNaN(financingRate)) { resultElement.innerHTML = "Please enter valid numbers for all fields."; return; } var cashFlowsArray = cashFlowsText.split(',').map(function(item) { return parseFloat(item.trim()); }); if (cashFlowsArray.some(isNaN)) { resultElement.innerHTML = "Please enter valid comma-separated numbers for cash flows."; return; } if (initialInvestment > 0) { resultElement.innerHTML = "Initial investment should be a negative number (outflow)."; return; } var n = cashFlowsArray.length; var presentValue_positive_cf = 0; var futureValue_negative_cf = 0; // Calculate future value of positive cash flows for (var i = 0; i 0) { presentValue_positive_cf += cashFlowsArray[i] / Math.pow((1 + reinvestmentRate), i + 1); } } // Calculate present value of negative cash flows for (var i = 0; i < n; i++) { if (cashFlowsArray[i] < 0) { futureValue_negative_cf += cashFlowsArray[i] / Math.pow((1 + financingRate), i + 1); } } // MIRR formula requires an iterative solution or approximation. // A common approach is to rearrange the formula and solve for MIRR. // (FV of positive CF / PV of negative CF)^(1/n) – 1 = MIRR // where FV of positive CF is compounded at MIRR and PV of negative CF is discounted at MIRR. // However, a simplified MIRR calculation often uses the reinvestment and financing rates directly. // The actual MIRR calculation involves finding 'r' such that: // Sum[CF_t / (1+r)^t] = 0 is not MIRR. // MIRR is the rate 'r' that equates the present value of outflows to the future value of inflows. // PV of Outflows = FV of Inflows // -Initial Investment + Sum[Positive CF_t / (1+financingRate)^t] = Sum[Negative CF_t * (1+reinvestmentRate)^(n-t)] // A more standard MIRR formula implementation finds the rate 'r' such that: // PV(all outflows) = FV(all inflows) // For MIRR, we first compound all positive cash flows to the end of the project life at the reinvestment rate, // and discount all negative cash flows (excluding the initial investment) to the beginning of the project life at the financing rate. var fv_positive_inflows = 0; for (var i = 0; i 0) { fv_positive_inflows += cashFlowsArray[i] * Math.pow((1 + reinvestmentRate), (n – 1 – i)); } } var pv_negative_outflows = initialInvestment; // Start with the initial investment for (var i = 0; i < n; i++) { if (cashFlowsArray[i] < 0) { pv_negative_outflows += cashFlowsArray[i] / Math.pow((1 + financingRate), (i + 1)); } } // The MIRR is the rate 'r' such that: // FV of positive cash flows = PV of negative cash flows // OR // 0 = sum [CF_t / (1+MIRR)^t] (this is IRR not MIRR) // The MIRR formula is often expressed as: // MIRR = (FV of positive cash flows / PV of negative cash flows)^(1/n) – 1 // where n is the number of periods for which the positive cash flows are compounded. // Let's assume n is the total number of periods (initial investment + cash flow periods). var totalPeriods = n + 1; // including the initial investment period // We need to find the rate 'r' such that: // sum(CF_t / (1+r)^t for t=1 to n) = -(Initial Investment) // and for MIRR, the compounding/discounting is done at specified rates. // Standard MIRR approach: // 1. Compute the future value of all positive cash flows at the end of the project life, // compounded at the reinvestment rate. // 2. Compute the present value of all negative cash flows (excluding initial investment), // discounted at the financing rate. // 3. Calculate the MIRR using the formula: // MIRR = [ (FV of positive CFs) / (PV of negative CFs + Initial Investment) ] ^ (1/n) – 1 // where n is the project life. var sum_fv_positive = 0; for(var i = 0; i 0){ sum_fv_positive += cashFlowsArray[i] * Math.pow(1 + reinvestmentRate, n – 1 – i); } } var sum_pv_negative = initialInvestment; // Initial outflow is already at PV for(var i = 0; i < n; i++){ if(cashFlowsArray[i] = 0) { resultElement.innerHTML = "Cannot calculate MIRR. Present value of outflows is not negative."; return; } // Check if sum_fv_positive is zero or negative (should not happen with positive cash flows) if (sum_fv_positive <= 0) { // If all cash flows are negative or zero after initial investment resultElement.innerHTML = "Cannot calculate MIRR. No positive cash flows to reinvest."; return; } var n_periods = n; // Number of periods after initial investment var mirr = Math.pow(sum_fv_positive / Math.abs(sum_pv_negative), 1 / n_periods) – 1; resultElement.innerHTML = "Modified Internal Rate of Return (MIRR): " + (mirr * 100).toFixed(2) + "%"; }

Leave a Comment