Net Present Value (NPV) is a fundamental concept in finance used to evaluate 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 period of time. In essence, NPV helps determine whether an investment is likely to be profitable or not by considering the time value of money.
The core idea behind NPV is that a dollar today is worth more than a dollar in the future, due to its potential earning capacity (inflation, opportunity cost, risk). The discount rate used in the NPV calculation reflects this time value of money and the risk associated with the investment.
The NPV Formula
NPV = Σ [ CFt / (1 + r)t ] – Initial Investment
Where:
CFt: The net cash flow during period t (cash inflow minus cash outflow).
r: The discount rate per period (expressed as a decimal). This rate is often the company's cost of capital or a required rate of return.
t: The number of periods into the future the cash flow occurs.
Initial Investment: The initial cost of the investment, typically an outflow at time t=0.
How to Interpret NPV
Positive NPV (> 0): Indicates that the projected earnings generated by the investment are greater than the anticipated costs. The investment is considered potentially profitable and should be accepted.
Zero NPV (= 0): Suggests that the projected earnings are exactly equal to the anticipated costs. The investment is expected to break even, neither adding nor subtracting value.
Negative NPV (< 0): Implies that the projected earnings are less than the anticipated costs. The investment is considered likely to result in a loss and should be rejected.
Use Cases
NPV analysis is widely used for:
Capital budgeting decisions (e.g., whether to invest in new machinery, expand operations).
Evaluating mergers and acquisitions.
Assessing the feasibility of new projects or product launches.
By standardizing the valuation of different investments into a single present-day dollar amount, NPV provides a clear metric for making sound financial decisions.
function addCashFlowInput() {
var container = document.getElementById('cashFlowsContainer');
var newDiv = document.createElement('div');
newDiv.className = 'cash-flow-input';
var newInput = document.createElement('input');
newInput.type = 'number';
newInput.className = 'cash-flow-value';
newInput.placeholder = 'Cash flow for next period';
var removeButton = document.createElement('button');
removeButton.className = 'remove-cash-flow';
removeButton.innerHTML = 'Remove';
removeButton.onclick = function() {
container.removeChild(newDiv);
};
newDiv.appendChild(newInput);
newDiv.appendChild(removeButton);
container.appendChild(newDiv);
}
function calculateNPV() {
var initialInvestment = parseFloat(document.getElementById('initialInvestment').value);
var discountRatePercent = parseFloat(document.getElementById('discountRate').value);
var cashFlowElements = document.getElementsByClassName('cash-flow-value');
var resultDiv = document.getElementById('result');
if (isNaN(initialInvestment) || isNaN(discountRatePercent)) {
resultDiv.textContent = 'Please enter valid numbers for initial investment and discount rate.';
resultDiv.className = ";
return;
}
var discountRate = discountRatePercent / 100;
var npv = -initialInvestment; // Start with the initial investment as a negative value
for (var i = 0; i 0) {
resultDiv.className = 'positive';
} else if (npv < 0) {
resultDiv.className = 'negative';
} else {
resultDiv.className = ''; // Neutral
}
}