Discount the annual cash flows, then subtract the outlay
Net present value puts a time-zero investment and a stream of equal end-of-year cash flows on the same footing. Each future amount is discounted at the required return you enter. A positive NPV adds value at that hurdle rate under these assumptions. Present value discounts a lump or an ordinary annuity without subtracting an investment. XIRR uses dated irregular amounts. ROI is an undiscounted profit-to-cost ratio.
At 0%, present value = cash flow × years
NPV = present value of annual cash flows − initial investment
Profitability index = present value of annual cash flows ÷ initial investment
Example
A $100,000 project that returns $30,000 a year for 5 years at a 10% discount rate has about $113,724 of future-cash-flow present value and an NPV of about $13,724. The profitability index is about 1.14. At 0% the NPV is the undiscounted $50,000 surplus.
What this model leaves out
Project life must be a whole number of years. Cash flows are ordinary end-of-year amounts, not monthly or mid-year. Taxes, inflation, residual sale value, and unequal yearly amounts stay outside this equal-period identity. A negative NPV means discounted future cash flows do not recover the initial outlay. The profitability index is conventionally interpreted for a non-negative future stream; when annual cash flow is negative, use the NPV result rather than that ratio.