XNPV function
Returns the net present value of cash flows that occur on specific, not necessarily regular, dates.
Available in Excel 2007 and later (earlier versions needed the Analysis ToolPak add-in), Excel for the web
Excel 2007 and laterWorks in Google Sheets
Syntax
XNPV(rate, values, dates)| Argument | What it means | |
|---|---|---|
rate | Required | Annual discount rate. |
values | Required | Cash flows, in the same order as dates. The first value is not discounted. |
dates | Required | The date of each cash flow. The first date is the valuation date (day 0). |
Returns: The net present value as of the first date.
How XNPV works
XNPV is the dated version of NPV. Each cash flow is discounted for the exact number of days between its date and the first date, using (1+rate)^(days/365). That makes it the right tool for real-world projects where payments come on contract milestones, not neat year ends.
Unlike NPV, XNPV includes the first value undiscounted, so the initial investment goes inside the function. The rate is always annual. The pair XNPV/XIRR belong together: XNPV evaluated at the XIRR rate returns zero.
Examples
1Project with milestone payments
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Cash flow | ||
| 2 | 2026-01-15 | -25000 | 2,122.39 | |
| 3 | 2026-07-01 | 6000 | ||
| 4 | 2027-02-01 | 9000 | ||
| 5 | 2027-09-15 | 8000 | ||
| 6 | 2028-03-31 | 7500 |
Result: 2,122.39
Each inflow is discounted at 9% a year for its exact time after 15 Jan 2026. The net value is +2,122.39, so the project earns more than the 9% required return (Number format, 2 decimals).
2Value today of a payment plan
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Receipt | ||
| 2 | 2026-12-02 | 0 | 46,925.22 | |
| 3 | 2027-03-31 | 12000 | ||
| 4 | 2027-09-30 | 12000 | ||
| 5 | 2028-06-30 | 26000 |
Result: 46,925.22
A customer will pay 50,000 in three instalments. Starting the timeline today with a 0 flow, the instalments are worth 46,925.22 today at 6% (Number format, 2 decimals).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#NUM! | A date is earlier than the first date, or values and dates differ in size. | Put the earliest date first and make the ranges match. |
#VALUE! | A date or value is not numeric. | Check for text dates. |
Tips
- To value from today, make the first row today's date with a 0 cash flow.
- XNPV uses a 365-day year; leap days slightly shorten the discount period.
- Unlike NPV, do not add the first cash flow separately — it is already included.
Google Sheets
XNPV also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
XNPV in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | NETTO.NUTIDSVÆRDI |
| Dutch | NHW2 |
| Finnish | NNA.JAKSOTON |
| French | VAN.PAIEMENTS |
| German | XKAPITALWERT |
| Hungarian | XNJÉ |
| Italian | VAN.X |
| Norwegian (Bokmål) | XNNV |
| Portuguese (Brazil) | XVPL |
| Portuguese (Portugal) | XVAL |
| Russian | ЧИСТНЗ |
| Spanish | VNA.NO.PER |
| Swedish | XNUVÄRDE |
| Turkish | ANBD |