XNPV
returns net present value for irregular cash flows
signature
XNPV(rate, values, dates)
returns: number
| argument | required |
|---|---|
| rate | required |
| values | required |
| dates | required |
examples
formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.
| A | B | |
|---|---|---|
| 1 | 10 | 2 |
| 2 | 20 | 4 |
| 3 | 30 | 6 |
| 4 | 40 | 8 |
| 5 | 50 | 10 |
fx
=XNPV(0.09, A1:A5, B1:B5) 149.81126223483471 errors
error values observed from the engine — each with a call that produces it.
| error | produced by |
|---|---|
| #NUM! | =XNPV(0.05, A1:A3, DATE(2026,1,15)) |
related
- ACCRINT accrued interest for a security paying periodic interest
- ACCRINTM accrued interest for a security paying at maturity
- AMORDEGRC depreciation per period, French accounting, degressive
- AMORLINC depreciation per period, French accounting, linear
- COUPDAYBS days from coupon period start to settlement
- COUPDAYS days in the coupon period containing settlement