Net Present Value (NPV) is a financial metric used to determine the profitability of an 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.
How to Use This Calculator
Initial Investment: Enter the total upfront cost of the project (expressed as a positive number).
Discount Rate: This is the target rate of return or the cost of capital. It accounts for the time value of money and risk.
Cash Inflows: Enter the expected revenue or savings generated by the project for each year.
The NPV Formula
The mathematical formula used for this calculation is:
Where r is the discount rate and t is the time period.
Interpreting the Results
Positive NPV: The investment is expected to generate value above the cost of capital. Generally, projects with a positive NPV are considered worth pursuing.
Negative NPV: The investment is expected to result in a net loss relative to the discount rate. These projects are typically rejected.
Zero NPV: The project breaks even exactly at the specified discount rate.
Practical Example
Imagine you are considering a piece of machinery that costs $10,000. You expect it to generate $3,000 every year for 5 years. If your discount rate is 10%:
The total present value of those five $3,000 payments is approximately $11,372.
Subtract the $10,000 initial cost.
The NPV is $1,372. Since it is positive, the investment is profitable.
function calculateNPV() {
var initial = parseFloat(document.getElementById('initialInvestment').value);
var rate = parseFloat(document.getElementById('discountRate').value);
var cf1 = parseFloat(document.getElementById('cf1').value) || 0;
var cf2 = parseFloat(document.getElementById('cf2').value) || 0;
var cf3 = parseFloat(document.getElementById('cf3').value) || 0;
var cf4 = parseFloat(document.getElementById('cf4').value) || 0;
var cf5 = parseFloat(document.getElementById('cf5').value) || 0;
var resultBox = document.getElementById('npvResult');
var statusText = document.getElementById('npvStatus');
var displayValue = document.getElementById('npvDisplayValue');
var explanation = document.getElementById('npvExplanation');
if (isNaN(initial) || isNaN(rate)) {
alert('Please enter valid numbers for the Initial Investment and Discount Rate.');
return;
}
var r = rate / 100;
var flows = [cf1, cf2, cf3, cf4, cf5];
var presentValueSum = 0;
for (var i = 0; i 0) {
resultBox.className = 'npv-result-box result-positive';
statusText.innerHTML = 'Positive NPV';
explanation.innerHTML = 'This project is financially viable and is expected to add value to the firm.';
} else if (npv < 0) {
resultBox.className = 'npv-result-box result-negative';
statusText.innerHTML = 'Negative NPV';
explanation.innerHTML = 'This project is expected to lose money relative to the discount rate and should likely be avoided.';
} else {
resultBox.className = 'npv-result-box result-positive';
statusText.innerHTML = 'Zero NPV';
explanation.innerHTML = 'The project exactly meets the required rate of return.';
}
}