Skip to content

XNPV

Returns the net present value of cash flows that occur on specific dates, discounting each by the actual number of days since the first date.

Syntax

=XNPV(, , )

Financial

All versions of Excel.

Try it

Edit the formula in B8 or change the inputs. The sheet recalculates as you type.

B8
A
B
C
1
Date
Cash flow
2
01-Jan-2008
-10,000
3
01-Mar-2008
2,750
4
30-Oct-2008
4,250
5
15-Feb-2009
3,250
6
01-Apr-2009
2,750
7
8
XNPV at 9%
2086.65

B8 =ROUND(XNPV(0.09,B2:B6,A2:A6),2) returns 2086.65

How XNPV works

XNPV finds the net present value of cash flows that happen on irregular dates. Where NPV assumes the cash flows are equally spaced, XNPV uses the actual date of each one. The formula =XNPV(9%,B2:B6,A2:A6) discounts each value in column B by the number of days between its date in column A and the first date, divided by 365.

How the discounting works

Each cash flow is divided by (1+rate)^((date - first_date)/365). The first date is therefore time zero, and the first cash flow isn't discounted at all. This is a significant difference from NPV, which discounts its first value by a full period. With XNPV you put the initial outlay in the range, at the first date, and you don't need to add anything separately.

A check: if -1,000 on 1 January 2025 and 1,100 on 1 January 2026 are exactly 365 days apart, XNPV at 10% returns zero, because 1,100 discounted by one year at 10% is 1,000.

The arguments

  • rate is an annual rate. It is used with a 365-day year, whatever the dates.
  • values are the cash flows. At least one must be positive and one negative, or XNPV returns #NUM!.
  • dates are real dates. A text date can cause #VALUE!, and a date earlier than the first date returns #NUM!. Order matters only for the first date: the others can come in any sequence.

Why not NPV for dated cash flows

With three cash flows on 1 January, 1 July and 1 January, NPV treats them as three equal periods and the result is wrong for an annual rate. XNPV counts 181 days and 184 days and gets the timing right. For cash flows that really are annual or monthly with equal gaps, NPV and XNPV give similar answers, but XNPV can differ slightly because it uses actual days, with leap years included.

Common uses

  • Investments and property deals with irregular receipts.
  • Cash flow models with payments on specific invoice dates.
  • Discounting a schedule where the dates are in a column.
  • Present value at a fixed date: put that date first with a zero cash flow.

Related functions

XIRR is the matching rate calculation: it finds the rate at which XNPV is zero. IRR and NPV are the same pair for equally spaced flows.

XNPV assumes a constant annual rate for the whole period and ignores tax and fees.

Arguments

rate
The annual discount rate, such as 9% or 0.09. XNPV always treats it as a yearly rate.
values
The cash flows, as a range or array. Money you receive is positive and money you pay is negative. There must be at least one positive and one negative value, and the list must be the same size as dates.
dates
The date of each cash flow, in the same order as values. The first date is the starting point. All other dates must be on or after it, but they can be in any order.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Irregular cash flows (Excel's own example)

B8 =ROUND(XNPV(0.09,B2:B6,A2:A6),2)

Result: 2086.65

The first date is time zero. The 2,750 received on 1 March is discounted for 60 days, and the later flows for more. The result is positive, so the deal beats 9%.

B8
A
B
C
1
Date
Cash flow
2
01-Jan-2008
-10,000
3
01-Mar-2008
2,750
4
30-Oct-2008
4,250
5
15-Feb-2009
3,250
6
01-Apr-2009
2,750
7
8
XNPV at 9%
2086.65

B8 =ROUND(XNPV(0.09,B2:B6,A2:A6),2) returns 2086.65

Example 2

One year apart: break-even at the discount rate

B5 =ROUND(XNPV(0.1,B2:B3,A2:A3),2)

Result: 0

The dates are exactly 365 days apart, so 1,100 discounted one year at 10% is exactly 1,000, and the NPV is zero.

B5
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-1,000
3
01-Jan-2026
1,100
4
5
XNPV at 10%
0

B5 =ROUND(XNPV(0.1,B2:B3,A2:A3),2) returns 0

Example 3

Why NPV is wrong for irregular dates

B6 =ROUND(XNPV(0.08,B2:B4,A2:A4),2)

Result: 258.44

The flows are six months and a year apart. NPV would treat the second as a full year out and the third as two years out, giving -432.10 for the same inputs. XNPV counts the real days.

B6
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-10,000
3
01-Jul-2025
2,000
4
01-Jan-2026
9,000
5
6
XNPV at 8%
258.44

B6 =ROUND(XNPV(0.08,B2:B4,A2:A4),2) returns 258.44

Example 4

A go or no-go check

B6 =IF(XNPV(0.08,B2:B4,A2:A4)>0,"Proceed","Stop")

Result: Proceed

A positive XNPV at the required rate means the deal clears the hurdle.

B6
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-10,000
3
01-Jul-2025
2,000
4
01-Jan-2026
9,000
5
6
Decision
Proceed

B6 =IF(XNPV(0.08,B2:B4,A2:A4)>0,"Proceed","Stop") returns Proceed

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B7, return the XNPV of the three dated cash flows at the discount rate in B1.

Answer in B7.

B7
A
B
C
1
Discount rate
8.0%
2
Date
Cash flow
3
01-Jan-2025
-10,000
4
01-Jul-2025
2,000
5
01-Jan-2026
9,000
6
7
XNPV
8
Clears the rate?
9
10

Common mistakes

  • Put the initial outlay in the range, on the first date. XNPV, unlike NPV, doesn't discount the first cash flow, so don't add the outlay separately.
  • Dates must be real dates. Text dates cause #VALUE!, and a date earlier than the first one causes #NUM!.
  • Values and dates must be the same size and in matching order. A mismatch returns #NUM!.
  • The rate is always annual, and days are counted over a 365-day year. Don't divide the rate by 12 for monthly dates.
  • You need at least one positive and one negative cash flow. All the same sign returns #NUM!.

Questions people ask

What is the difference between NPV and XNPV?

NPV assumes equally spaced cash flows and discounts its first value by one period. XNPV uses the actual date of each flow and doesn't discount the first one.

Should the initial investment be inside the XNPV range?

Yes. Put it first, on the start date, as a negative number. XNPV treats the first date as time zero.

Why does XNPV return #NUM!?

A date may be earlier than the first date, the values and dates may differ in size, or all the cash flows may have the same sign.

Is the XNPV discount rate yearly?

Yes. XNPV always takes an annual rate and uses days divided by 365, however the dates are spaced.

Learn XNPV in a real sheet.

XNPV is taught in Dates and financial modelling, lesson 19: Net present value with NPV and XNPV. Each lesson is a short, graded exercise like the one above.