Category: FUNCTION | Updated: 2026-11-22

How to Use the XNPV Function | Calculate Net Present Value for Irregular Cash Flows

Syntax

=XNPV(discount, cashflow_amounts, cashflow_dates)
  • discount: The annual discount rate.
  • cashflow_amounts: A range of cells containing payment and receipt amounts (the first value is typically a negative initial investment).
  • cashflow_dates: A range of cells containing the dates (serial values) corresponding to each cash flow.

Practical Example with a Table

Here is an example of calculating the net present value (at a 4% discount rate) when ¥5,000,000 is invested on January 15, 2026, followed by irregular payouts/recoveries.

Date Cash Flow (JPY) Description
2026/01/15 -5,000,000 Initial investment (baseline date)
2026/06/30 1,200,000 1st return
2027/02/10 2,000,000 2nd return
2027/11/25 2,500,000 3rd return
  • Formula: =XNPV(4%, B2:B5, A2:A5)
  • Result: ¥402,118

Common Errors and Notes

  • Mismatched Range Sizes (#VALUE!): If the cashflow_amounts and cashflow_dates ranges do not have the same number of rows and columns, a #VALUE! error occurs.
  • Text Dates Cause Errors: If dates in the date column are entered as text rather than date serial values, a #VALUE! error will occur. Use the DATE function or a valid date format.

Frequently Asked Questions

Q. What is the biggest difference between the XNPV and NPV functions?

A. The NPV function assumes cash flows occur at "regular intervals," whereas XNPV takes "specific dates" for each cash flow and discounts them precisely on a daily basis.

Q. Should the initial investment be included in the cash flow range for XNPV?

A. Yes. XNPV uses the first date (start date) as the baseline (no discounting), so you should include the initial investment along with its date directly in the range.