Mirr Calculator with Discount Rate

.mirr-calculator-container { max-width: 800px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); line-height: 1.6; } .mirr-form-group { margin-bottom: 20px; } .mirr-label { display: block; margin-bottom: 8px; font-weight: 600; color: #2c3e50; } .mirr-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; box-sizing: border-box; } .mirr-input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52,152,219,0.2); } .mirr-help-text { font-size: 12px; color: #7f8c8d; margin-top: 5px; } .mirr-btn { background-color: #2c3e50; color: white; padding: 14px 24px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: 600; width: 100%; transition: background-color 0.2s; } .mirr-btn:hover { background-color: #34495e; } .mirr-result-box { margin-top: 25px; padding: 20px; background-color: #f8f9fa; border-left: 5px solid #27ae60; border-radius: 4px; display: none; } .mirr-result-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #7f8c8d; margin: 0 0 10px 0; } .mirr-result-value { font-size: 32px; font-weight: 700; color: #2c3e50; } .mirr-error { color: #e74c3c; font-size: 14px; margin-top: 10px; display: none; } .mirr-content { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; } .mirr-content h2 { color: #2c3e50; margin-top: 20px; font-size: 24px; } .mirr-content p { color: #555; margin-bottom: 15px; } .mirr-content ul { margin-bottom: 15px; padding-left: 20px; color: #555; } .mirr-content li { margin-bottom: 8px; }

MIRR Calculator with Discount Rate

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:

MIRR = ( FV(positive flows) / -PV(negative flows) )^(1/n) – 1

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, '$&,'); }

Leave a Comment