# NPV

The NPV function returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values).

### Syntax

NPV (Rate, value1,...valueN?) - > Number

### Arguments

<table><thead><tr><th width="148.33333333333331">Arguments</th><th width="224">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>Rate</td><td>Number</td><td>The rate of discount </td></tr><tr><td>value1</td><td>Number, Node reference</td><td>The node that contains the order of cash flows for which you want to calculate the NPV. This is a required argument.</td></tr><tr><td>valueN?</td><td>Number, Node reference</td><td>The additional nodes that contains the order of cash flows for which you want to calculate the NPV. This is an optional argument </td></tr></tbody></table>

### Example

Consider the below example of a project with an initial investment of $10,000 and cash inflows of $4,000 for the subsequent four years. Discount rate is 12%. The objective is to evaluate the project by calculating NPV.

<table><thead><tr><th width="133">Periods</th><th align="right">0</th><th align="right">1</th><th align="right">2</th><th align="right">3</th><th align="right">4</th></tr></thead><tbody><tr><td><mark style="color:purple;">Initial Investment</mark></td><td align="right">-10000</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td></tr><tr><td><mark style="color:green;">Cash Inflows</mark></td><td align="right">-</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[NPV] node:

<mark style="color:blue;">**`NPV`**</mark>**`(12% ,`**<mark style="color:green;">**`[Cash Inflows]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)+`**<mark style="color:purple;">**`[Initial Investment]`**</mark>

We are including .ALL\_PERIODS in the formula so that it takes the value of the entire year's cash inflow rather a single period.

### Result

| NPV | 2149.40 |
| --- | ------- |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valq.com/model/formula-functions/finance-functions/npv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
