XIRR function
The XIRR function in Excel is used to calculate the internal rate of return (IRR) for a series of cash flows that are not necessarily periodic. This is especially useful for financial analysis involving irregular cash flows, such as investments or loans.
Syntax:
XIRR(values, dates, [guess])
Arguments:
- values: An array of cash flows corresponding to the payment schedule. The first value is typically negative (representing an investment or payment), and subsequent values are positive (returns or receipts).
- dates: A series of dates corresponding to the cash flows in
values. These must match the order of thevaluesarray. - guess (optional): An initial guess for the IRR. If omitted, Excel defaults to 10% (0.1).
Important Notes:
- Cash flows must include at least one positive and one negative value.
- Dates must be valid and sequential, but they don’t need to have equal intervals.
- The function iteratively calculates the IRR, and it might return a
#NUM!error if a solution can’t be found or the inputs are invalid.
Example:
Suppose you have the following cash flow data:
| Date | Cash Flow |
|---|---|
| 01/01/2023 | -10,000 |
| 04/01/2023 | 2,000 |
| 07/01/2023 | 4,000 |
| 12/01/2023 | 6,000 |
Formula:
=XIRR(B2:B5, A2:A5)
Where:
B2:B5contains the cash flows.A2:A5contains the corresponding dates.
Result:
Excel will return the annualized IRR as a percentage, representing the rate of return for the given cash flows.
Common Errors:
#NUM!: Occurs if there are invalid inputs or no solution is found.#VALUE!: Happens if thedatesare not valid or non-numeric data is present invalues.