Calculates the net present value of an investment based on a specified series of potentially irregularly spaced cash flows and a discount rate.

**Sample Usage**

XNPV(A2,B2:B25,C2:C25)

**Syntax**

XNPV(rate, cashflow_amounts, cashflow_dates)

- rate - The rate of discount over one period.
- cashflow_amounts - Schedule of payments associated with the investment.
- cashflow_dates - Payment dates that corresponds to the cash flow payments.

**Examples**

XNPV(A2,B2:B25,C2:C25) returns the net present value for the investment.

**Notes**

- XNPV is similar to PV except that XNPV allows variable-value cash flows and cash flow intervals.
- Each cell in cashflow_amounts should be positive if it represents income from the perspective of the owner of the investment or negative if it represents payments.
- If the cash flows of an investment are at regular intervals, use NPV instead.