Note: The other languages of the website are Google-translated. Back to English

Excel XNPV function

The XNPV function calculates the net present value (NPV) for a series of cash flows that may or may not be periodic.


XNPV(rate, values, dates)


  • Rate (required): The discount rate to apply to the cash flows.
  • Values(required): An array or a range of cells that represents the series of cash flows.

The series of values must contain at least one positive and one negative value:

-- The negative value: represents the cost or payment;
-- The positive value: represents the income.
  • Dates (required): A series of dates that corresponds to the values.
  1. The date of the initial investment must be first in the array;
  2. All other dates must be later than the initial date, and can be in any order;
  3. Dates should be entered:
-- By using the DATE function;
-- As references to cells containing dates;
-- As results returned from other formulas.


1. In Excel, dates can be used in calculations as they are stored as sequential numbers. By default, 1/1/1900 is serial number 1, so 12/1/2021 is serial number 40877 because it is 40876 days after 1/1/1900;
2. Dates are truncated to integers if containing time;
3. The #NUM! error occurs when either of the following conditions is met:
-- The arguments “values” and “dates” arrays have different dimensions;
-- Any of the given “dates” precedes the starting date.
4. The #VALUE! error occurs when either of the following condition is met:
-- Any of the supplied dates is an invalid date;
-- Any of the supplied “rate”, “values” and “dates” is non-numeric.
5. The XNPV is calculated by the following equation:

-- Pi is the ith or last cash flow (payment);
-- di is the ith or last payment date;
-- d1 is the 0th payment date.

Return Value

It returns a numeric value.


As shown in the screenshot below, there is a 1-year investment project, which is expected to generate the following cash flows based on a discount rate of 8%. To calculate the net present value using the XNPV function, you can do as follows.

1. Select a blank cell, copy or enter the formula below and press the Enter key to get the result.


Then you can change the cell format to currency if you need.

Note: If the function returns a positive number, the investment is feasible. Otherwise, the investment is infeasible.

Related Functions

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

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL