function calculateCrossover() {
var a = [
parseFloat(document.getElementById('a0').value) || 0,
parseFloat(document.getElementById('a1').value) || 0,
parseFloat(document.getElementById('a2').value) || 0,
parseFloat(document.getElementById('a3').value) || 0,
parseFloat(document.getElementById('a4').value) || 0,
parseFloat(document.getElementById('a5').value) || 0
];
var b = [
parseFloat(document.getElementById('b0').value) || 0,
parseFloat(document.getElementById('b1').value) || 0,
parseFloat(document.getElementById('b2').value) || 0,
parseFloat(document.getElementById('b3').value) || 0,
parseFloat(document.getElementById('b4').value) || 0,
parseFloat(document.getElementById('b5').value) || 0
];
// Differential Cash Flows (Project A – Project B)
var diff = [];
for (var i = 0; i < a.length; i++) {
diff.push(a[i] – b[i]);
}
// Find IRR of the differential flows using Newton-Raphson method
var rate = 0.1; // Initial guess
var precision = 0.000001;
var maxIterations = 1000;
var found = false;
for (var j = 0; j < maxIterations; j++) {
var npv = 0;
var derivativeNPV = 0;
for (var t = 0; t 0) {
derivativeNPV -= (t * diff[t]) / Math.pow(1 + rate, t + 1);
}
}
var nextRate = rate – (npv / derivativeNPV);
if (Math.abs(nextRate – rate) < precision) {
rate = nextRate;
found = true;
break;
}
rate = nextRate;
}
var resultContainer = document.getElementById('result-container');
var resultDisplay = document.getElementById('crossover-rate');
var analysisText = document.getElementById('analysis-text');
resultContainer.style.display = 'block';
if (found && !isNaN(rate) && isFinite(rate)) {
var percentage = (rate * 100).toFixed(2);
resultDisplay.innerText = percentage + "%";
analysisText.innerText = "At a discount rate of " + percentage + "%, both projects have the same Net Present Value (NPV). If your required rate of return is below this, the project with the steeper NPV curve is preferred.";
} else {
resultDisplay.innerText = "No Crossover Found";
analysisText.innerText = "The cash flow profiles for these two projects do not intersect at a positive discount rate, or the mathematical solution is undefined for these inputs.";
}
}
What is the IRR Crossover Rate?
In capital budgeting, the IRR Crossover Rate is the specific discount rate at which the Net Present Values (NPV) of two competing projects are exactly equal. It represents the point of indifference for a financial manager choosing between two mutually exclusive investments.
Why is the Crossover Rate Important?
When comparing two projects, they often have different cash flow timings. One project might provide high returns early on (Project A), while another might start slow but yield significantly higher cash flows in later years (Project B). Because NPV varies with the discount rate, these two projects' rankings might swap depending on the cost of capital. The crossover rate helps identify this "flip" point.
Below Crossover: The project with the larger total cash flows (usually the one with later-dated returns) typically has a higher NPV.
Above Crossover: The project that returns money faster (higher liquidity in early years) typically has a higher NPV.
How to Calculate the Crossover Rate
The crossover rate is mathematically determined by finding the Internal Rate of Return (IRR) of the differences between the cash flows of the two projects.
Subtract the cash flows of Project B from Project A for each period (Year 0 through Year N).
Calculate the IRR for this new set of "differential cash flows."
The resulting percentage is your Crossover Rate.
Real-World Example
Suppose you are evaluating two manufacturing machines:
Year
Project A CF
Project B CF
Difference (A-B)
0
-10,000
-10,000
0
1
5,000
2,000
3,000
2
5,000
9,000
-4,000
By finding the IRR of the "Difference" column (0, 3000, -4000), you find the crossover rate. If your company's actual cost of capital is 10% and the crossover is 8%, you know which project to prioritize based on the NPV profile.