# XNPV

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## 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* | Discount rate to apply to the cash flows |
| *values* | 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* | Schedule of payment dates that corresponds to the cash flow payments in *values* |

## Remarks

Numbers in dates are truncated to integers. A #VALUE! error is returned if any argument is nonnumeric 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.

## Data Types

Accepts numeric data for *rate* and *values*, and DateTime object data for *dates*. Returns numeric data.

## Examples

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

## Version Available

This function is available in product version 2.0 or later.

## See Also

[IRR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionIRR) \| [NPV](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionNPV) \| [MIRR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMIRR) \| [XIRR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionXIRR) \| [Financial Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsfinance)