Financial
All versions
◉ 14 views
=XNPV()
Returns the net present value for a schedule of cash flows that is not necessarily periodic. To calculate the net present value for a series of cash flows that is periodic, use the NPV function.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=XNPV(rate, values, dates)
Hover argument names in the table for details.
Output typeNumber
Popularity40 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon
▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =XNPV() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
rate |
Number | Required | The discount rate to apply to the cash flows. |
values |
Range | Required | A series of cash flows that corresponds 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. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value. |
dates |
Range | Required | A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order. |
▣ Examples
▦ Data
| Cell | Value |
|---|---|
A2 |
Values |
B2 |
Dates |
A3 |
-$10,000 |
B3 |
1/1/2008 |
A4 |
$2,750 |
B4 |
3/1/2008 |
A5 |
$4,250 |
B5 |
10/30/2008 |
A6 |
$3,250 |
B6 |
2/15/2009 |
A7 |
$2,750 |
B7 |
4/1/2009 |
A8 |
Values |
B8 |
Dates |
A9 |
-$10,000 |
B9 |
1/1/2008 |
A10 |
$2,750 |
B10 |
3/1/2008 |
A11 |
$4,250 |
B11 |
10/30/2008 |
A12 |
$3,250 |
B12 |
2/15/2009 |
A13 |
$2,750 |
B13 |
4/1/2009 |
The net present value for an investment with the above cost and returns. The cash flows are discounted at 9 percent.
=XNPV(.09, A2:A6, B2:B6)
Result:
$2,086.65
§ Remarks
- Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
- Numbers in dates are truncated to integers.
- If any argument is nonnumeric, XNPV returns the #VALUE! error value.
- If any number in dates is not a valid date, XNPV returns the #VALUE! error value.
- If any number in dates precedes the starting date, XNPV returns the #NUM! error value.
- If values and dates contain a different number of values, XNPV returns the #NUM! error value.
- XNPV is calculated as follows: where: di = the ith, or last, payment date. d1 = the 0th payment date. Pi = the ith, or last, payment.
✦ Tips
- Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
- Numbers in dates are truncated to integers.
⚠ Common Errors
#VALUE!
If any argument is nonnumeric, XNPV returns the #VALUE! error value. If any number in dates is not a valid date, XNPV returns the #VALUE! error value.
Fix: برای rate و values اعداد معتبر وارد کنید و تاریخها را با تابع DATE وارد کنید.
#NUM!
If any number in dates precedes the starting date, XNPV returns the #NUM! error value. If values and dates contain a different number of values, XNPV returns the #NUM! error value.
Fix: Check the two ranges
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!