# XNPV Function

> Calculate the net present value of cash flows on irregular dates with XNPV in TX Sheet Control: rate, cash flows, dates, the 365-day year and #NUM! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > XNPV Function
- **228 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xnpv/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xnpv/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xnpv/llms-full.txt

---

Return the net present value of cash flows that occur on irregular dates. `rate_or_values` is the discount rate a year, `values_or_dates` the cash flows and `dates_or_guess` their dates; the first date is the start, and each cash flow is discounted by its days since then on a 365-day year. A date before the first date returns `#NUM!`.

### Syntax

```text
XNPV(rate_or_values, values_or_dates, dates_or_guess)
```

Category: Financial. Minimum arguments: 2. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=XNPV(0.1,{-100,110},{1,366})
```

The formula returns 0 (-1.4E-14 before rounding): 110 received 365 days after paying 100 is worth exactly 100 at a rate of 10%.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [XMATCH Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xmatch/llms-full.txt)
- **Next:** [XOR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xor/llms-full.txt)
