Evaluate the profitability of your investment by discounting future cash flows.
Your Estimated NPV:
$0.00
What is Net Present Value (NPV)?
Net Present Value (NPV) is a core financial metric used in capital budgeting to analyze the profitability of a projected investment or project. It represents the difference between the present value of cash inflows and the present value of cash outflows over a specific period of time.
The NPV Formula
The mathematical formula for calculating NPV is:
NPV = Σ [ Rt / (1 + i)^t ] – Initial Investment
Rt: Net cash inflow-outflow during a single period t
i: Discount rate or return that could be earned in alternative investments
t: Number of timer periods
How to Calculate NPV Step-by-Step
Identify Initial Investment: Determine the total cost required to start the project (usually represented as a negative number or subtracted at the end).
Estimate Cash Flows: Project the expected revenue or savings for each future period (usually years).
Determine the Discount Rate: Choose an appropriate discount rate, which often reflects the company's weighted average cost of capital (WACC) or the risk level of the project.
Discount Each Cash Flow: Use the formula CF / (1 + r)^n for each year.
Sum the Totals: Add all discounted cash flows together and subtract the initial investment.
Example Calculation
Suppose you invest $10,000 in a project with a 10% discount rate. It returns $4,000 in Year 1, $4,000 in Year 2, and $4,000 in Year 3.
Year 1 PV: $4,000 / (1 + 0.10)^1 = $3,636.36
Year 2 PV: $4,000 / (1 + 0.10)^2 = $3,305.79
Year 3 PV: $4,000 / (1 + 0.10)^3 = $3,005.26
Total PV of Inflows: $9,947.41
NPV: $9,947.41 – $10,000 = -$52.59
Because the NPV is negative, this project would theoretically lose value relative to the 10% benchmark.
function calculateNPV() {
var initialInvestment = parseFloat(document.getElementById('initialInvestment').value);
var rate = parseFloat(document.getElementById('discountRate').value) / 100;
var cf1 = parseFloat(document.getElementById('cashFlow1').value) || 0;
var cf2 = parseFloat(document.getElementById('cashFlow2').value) || 0;
var cf3 = parseFloat(document.getElementById('cashFlow3').value) || 0;
var cf4 = parseFloat(document.getElementById('cashFlow4').value) || 0;
var cf5 = parseFloat(document.getElementById('cashFlow5').value) || 0;
if (isNaN(initialInvestment) || isNaN(rate)) {
alert("Please enter both the Initial Investment and the Discount Rate.");
return;
}
var cashFlows = [cf1, cf2, cf3, cf4, cf5];
var totalPresentValue = 0;
for (var t = 0; t 0) {
statusMessage.innerText = "Positive NPV: This investment is potentially profitable.";
statusMessage.style.color = "#2f855a";
} else if (npv < 0) {
statusMessage.innerText = "Negative NPV: This investment may result in a net loss.";
statusMessage.style.color = "#c53030";
} else {
statusMessage.innerText = "Zero NPV: This project breaks even at the specified discount rate.";
statusMessage.style.color = "#2d3748";
}
resultBox.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}