# XNPV

## Content

This function calculates the net present value for a schedule of cash flows that may not be periodic.

## Syntax

`XNPV(rate, values, dates)`

## Arguments

This function has these arguments:

| Argument | Description |
| -------- | ----------- |
| *rate* | [Required] Discount rate to apply to the cash flows |
| *values* | [Required] Series of cash flows that correspond to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment |
| *dates* | [Required] Schedule of payment dates that correspond to the cash flow payments in *values* |

## Remarks

Numbers in dates are truncated to integers. A #VALUE! error is returned if any argument is non-numeric or if any date is invalid.

* If a number in *dates* precedes the starting date, a #NUM! error is returned.
* If *values* and *dates* have a different number of values, a #NUM! error is returned.

## Examples

`XNPV(0.09,B2:B6,C2:C6)`