## How to use the XNPV function

The XNPV function calculates the net present value for cash flows that may or may not be periodic. Net present value is used in investment planning and capital budgeting.

**What is net present value?**

Net present value (NPV) is a core concept in finance where the present value of an investment's future cash inflows is calculated and compared to the initial outlay to see if the investment is profitable over time.

**What is cash flow?**

A cash flow is the net amount of cash moving into or out of a business during a given time period, representing inflows from revenue and outflows for expenses, investments, financing, and dividends.

**What is periodic cash flow?**

Periodic cash flow is a regular cash inflow or outflow occurring at fixed intervals over time, like an annuity, loan payment, or payroll.

**What is non-periodic cash flow?**

Non-periodic cash flow is a cash inflow or outflow that occurs at irregular intervals and does not follow a precise schedule, like inventory purchases or one-time dividends.

**XNPV related functions in Excel**

Function | Description |
---|---|

XNPV(rate, values, dates) | Returns net present value for irregular cash flows |

NPV(rate, value1, value2...) | Returns net present value for regular cash flows |

IRR(values, guess) | Returns internal rate of return for cash flows |

PMT(rate, periods, present value, [future value], [type]) | Returns periodic payment amount |

FV(rate, periods, payment, [present value], [type]) | Returns future value of cash flows |

CUMIPMT(rate, nper, pv, start_period, end_period, type) | Calculates cumulative interest payments. |

DISC(settlement, maturity, pr, redemption, [basis]) | Calculates discount rate or bond equivalent yield |

### XNPV Function Syntax

XNPV(*rate, values, dates)*

### XNPV Function Arguments

rate |
Required. The discount rate. |

values |
Required. A number of values representing cash flow, the first value is optional and may be a cost or payment. Make sure the first value is a negative value if it is a cost or payment. At least one value must be negative and one value must be positive. |

dates |
Required. Dates that correspond to the cash flow values. |

**What is a discount rate?**

The discount rate is the interest rate used to calculate the present value of future cash flows. It accounts for the time value of money - money today is worth more than money in the future. Higher discount rates result in lower net present values.

### XNPV Function example

Formula in cell C12:

### XNPV Function not working

The XNPV function returns:

- #VALUE! error if arguments
*are*non-numeric. - #NUM! error if any number in dates precedes the starting date.
- #NUM! error if values and dates don't have the same number of values.
- #VALUE! error if any number in dates is not a valid date.

### How is the XNPV Function calculated

The formula looks like this:

d_{i} = the ith, or last, payment date.

d_{1} = the 0th payment date.

P_{i} = the ith, or last, payment.

### Functions in 'Financial' category

The XNPV function function is one of many functions in the 'Financial' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form