﻿ XNPV function

# XNPV function

This article describes the formula syntax and usage of the XNPVfunction in Microsoft Excel.

## Description

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.

## Syntax

XNPV(rate, values, dates)

The XNPV function syntax has the following arguments:

• Rate    Required. The discount rate to apply to the cash flows.

• Values    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    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.

## 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.

## Example

The example may be easier to understand if you copy it to a blank worksheet.

How do I copy an example?

1. Select the example in this article. If you are copying the example in Excel Online, copy and paste one cell at a time.
Important: Do not select the row or column headers.

Selecting an example from Help

2. Press CTRL+C.

3. Create a blank workbook or worksheet.

4. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Online, repeat copying and pasting for each cell in the example.
Important: For the example to work properly, you must paste it into cell A1 of the worksheet.

5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

6. After you copy the example to a blank worksheet, you can adapt it to suit your needs.

 1 2 3 4 5 6 7 8
 A B Values Dates -10,000 January 1, 2008 2,750 March 1, 2008 4,250 October 30, 2008 3,250 February 15, 2009 2,750 April 1, 2009 Formula Description (Result) =XNPV(.09, A2:A6, B2:B6) The net present value for an investment with the above cost and returns. The cash flows are discounted at 9 percent. (2086.6476 or 2086.65)

Note    In Excel Online, to view the result in its proper format, select the cell, and then on the Home tab, in the Number group, click the arrow next to Number Format, and click General.

Applies To: Excel 2010, Excel Starter, Excel Online, SharePoint Online

﻿