The NPV can then be calculated using the following formula:
The Excel NPV formula only calculates the sum of the present value of future cash flows (t=1, t=2, ... t=n), so to obtain the true Net Present Value, you need to subtract the initial investment or in other words, add the initial negative value at t=0.
The NPV formula requires periodic cash flows. If you have non-periodic cash flows, you can use the XNPV formula.
Download an NPV Calculator for Excel.