.npv-calculator-container {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
.npv-header {
text-align: center;
margin-bottom: 30px;
}
.npv-header h1 {
color: #2c3e50;
margin-bottom: 10px;
}
.npv-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
font-weight: 600;
margin-bottom: 5px;
color: #34495e;
}
.input-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.input-note {
font-size: 0.85em;
color: #7f8c8d;
margin-top: 4px;
}
.calc-button {
grid-column: 1 / -1;
background-color: #2980b9;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s;
width: 100%;
margin-top: 10px;
}
.calc-button:hover {
background-color: #21618c;
}
.result-section {
grid-column: 1 / -1;
margin-top: 25px;
padding: 20px;
background-color: #ffffff;
border: 1px solid #dcdcdc;
border-left: 5px solid #2980b9;
border-radius: 4px;
display: none;
}
.result-value {
font-size: 2em;
font-weight: bold;
color: #2c3e50;
margin-bottom: 10px;
}
.breakdown {
font-family: "Courier New", Courier, monospace;
background: #f4f4f4;
padding: 15px;
border-radius: 4px;
margin-top: 15px;
white-space: pre-wrap;
}
.article-content {
margin-top: 50px;
line-height: 1.6;
color: #333;
}
.article-content h2 {
color: #2c3e50;
margin-top: 30px;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 10px;
}
.article-content ul {
margin-left: 20px;
}
.math-block {
background-color: #edf2f7;
padding: 15px;
border-radius: 5px;
font-style: italic;
text-align: center;
margin: 20px 0;
}
@media (max-width: 600px) {
.npv-grid {
grid-template-columns: 1fr;
}
}
Understanding NPV with an Infinite Discount Rate
Net Present Value (NPV) is a core component of corporate budgeting and investment planning. It measures the difference between the present value of cash inflows and the present value of cash outflows over a period of time. Typically, a moderate discount rate (like 5%, 10%, or 12%) is used to account for inflation, risk, and opportunity cost.
However, theoretical scenarios sometimes require analyzing the limit as the discount rate approaches infinity. This calculator helps visualize that mathematical boundary.
The Mathematical Formula
The standard formula for NPV is:
NPV = CF₀ + CF₁/(1+r)¹ + CF₂/(1+r)² + … + CFₙ/(1+r)ⁿ
Where:
- CF₀: Initial Cash Flow (usually negative investment).
- CFₜ: Cash flow at time period t.
- r: The discount rate.
What Happens When r = ∞?
When the discount rate (r) becomes infinitely large, the denominator in the formula (1+r) also becomes infinite. In mathematics, any finite number divided by infinity approaches zero.
Therefore, for any time period t > 0:
Limit (r → ∞) [ CFₜ / (1+r)ᵗ ] = 0
This collapses the entire NPV equation down to a single term:
NPV (Infinite Rate) = CF₀
Implications of Infinite Discount Rates
While an "infinite" interest rate is impossible in standard banking, the concept represents a scenario of extreme hyperinflation or absolute immediate preference.
- Hyperinflation: If money loses value instantly after receiving it, future cash flows are worthless. Only the money you hold right now (or the debt you incur right now) matters.
- Extreme Risk: If a project has a 100% probability of failure immediately after launch, investors might model the discount rate as approaching infinity, effectively valuing only the startup costs.
- Immediate Viability: This calculation proves that if you cannot wait even one second for a return, the project is only viable if the initial cash flow itself is positive (which is rare for investments).
How to Use This Calculator
This specific tool demonstrates the theoretical limit. By inputting your Initial Investment and projected future cash flows, you will see that no matter how large the future returns are, an infinite discount rate renders them null.
- Initial Investment: Enter your starting cost. Use a negative sign (e.g., -1000) to represent money leaving your pocket.
- Future Cash Flows: Enter projected earnings for periods 1 through 5.
- The Result: The tool will show that your NPV equals your Initial Investment, proving that future potential has zero present value under these extreme conditions.
function calculateInfiniteNPV() {
// 1. Get input values
var initialInv = parseFloat(document.getElementById('initialInvestment').value);
var cf1 = parseFloat(document.getElementById('cf1').value);
var cf2 = parseFloat(document.getElementById('cf2').value);
var cf3 = parseFloat(document.getElementById('cf3').value);
var cf4 = parseFloat(document.getElementById('cf4').value);
var cf5 = parseFloat(document.getElementById('cf5').value);
// 2. Validate Initial Investment (Default to 0 if empty)
if (isNaN(initialInv)) {
initialInv = 0;
}
// Handle NaN for future flows just for display purposes
if (isNaN(cf1)) cf1 = 0;
if (isNaN(cf2)) cf2 = 0;
if (isNaN(cf3)) cf3 = 0;
if (isNaN(cf4)) cf4 = 0;
if (isNaN(cf5)) cf5 = 0;
// 3. Logic for Infinite Discount Rate
// As r -> infinity, PV of future flows -> 0.
// NPV = CF0 + 0 + 0 …
var npv = initialInv;
// 4. Format formatting helper
function formatMoney(num) {
return num.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
}
// 5. Build the breakdown string for educational purposes
var breakdownHtml = "";
breakdownHtml += "Formula: NPV = CF0 + CF1/∞ + CF2/∞ + …\n\n";
breakdownHtml += "Step 1: Identify Initial Investment (CF0)\n";
breakdownHtml += " => " + formatMoney(initialInv) + "\n\n";
breakdownHtml += "Step 2: Discount Future Cash Flows at Infinite Rate\n";
breakdownHtml += " Period 1: " + formatMoney(cf1) + " / ∞ = $0.00\n";
breakdownHtml += " Period 2: " + formatMoney(cf2) + " / ∞ = $0.00\n";
breakdownHtml += " Period 3: " + formatMoney(cf3) + " / ∞ = $0.00\n";
breakdownHtml += " Period 4: " + formatMoney(cf4) + " / ∞ = $0.00\n";
breakdownHtml += " Period 5: " + formatMoney(cf5) + " / ∞ = $0.00\n\n";
breakdownHtml += "Step 3: Sum of Present Values\n";
breakdownHtml += " => " + formatMoney(initialInv) + " + $0.00\n";
breakdownHtml += " => " + formatMoney(npv);
// 6. Output Logic
var resultBox = document.getElementById('resultBox');
var finalResult = document.getElementById('finalResult');
var mathLog = document.getElementById('mathLog');
resultBox.style.display = "block";
finalResult.innerHTML = formatMoney(npv);
// Color coding the result
if (npv 0) {
finalResult.style.color = "#27ae60"; // Green for positive
} else {
finalResult.style.color = "#2c3e50"; // Grey for zero
}
mathLog.textContent = breakdownHtml;
}