How to Fix Excel XIRR #NUM! Error After Adding a Final Row
Question details
The user needs to resolve a #NUM! error that occurs in the XIRR function after adding a new transaction row to an existing financial dataset.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating the internal rate of return for a schedule of cash flows using the XIRR function, which breaks upon adding a final debt or payment transaction.
- Observed behavior
- The XIRR formula fails to compute the rate and returns a #NUM! error instead of the expected percentage.
Before troubleshooting the XIRR formula, ensure that your updated cash flow range includes at least one positive value (income) and one negative value (payment), as this is a mathematical requirement for the function.
Verify Cash Flow Signs and Transaction Dates
The most common reason for a #NUM! error in XIRR is missing opposing cash flows, invalid date formats, or unsorted chronological data.
The XIRR function requires a valid series of dates and at least one negative and one positive cash flow. When a new row is added, incorrect formatting or missing minus signs can instantly trigger a calculation failure.
Inspect your updated data range. Ensure your initial investment is entered as a negative number and your returns or incomes are entered as positive numbers.
Highlight your date column, right-click, and select 'Format Cells'. Ensure they are explicitly formatted as Dates, not as text strings.
Select your entire data range, go to the 'Data' tab on the ribbon, and click 'Sort' to arrange the cash flows in chronological order from oldest to newest.

Provide an Initial Guess to Help Excel Calculate
Excel uses an iterative technique for XIRR. If it cannot find a result within 100 iterations, it returns #NUM!. Adding a guess helps it locate the mathematical solution.
Calculate Internal Rate of Return Accurately with WPS Spreadsheet
WPS Spreadsheet provides robust financial functions including XIRR, with full compatibility for Excel data formats. Easily calculate complex investment returns without hassle.
- 1. Open your dataset: Launch WPS Spreadsheet and open your cash flow document.
- 2. Select the result cell: Click on the cell where you want to display the rate of return.
- 3. Enter the XIRR formula: Type =XIRR( and select your cash flow values range, followed by a comma.
- 4. Select the dates: Select the corresponding transaction dates range, type a closing parenthesis ), and press Enter.

Frequently Asked Questions
Why does XIRR need both positive and negative numbers?
The internal rate of return represents the profitability of an investment. It mathematically requires an initial outflow (represented by a negative number) and subsequent inflows (positive numbers) to calculate a meaningful rate of return.
Does the chronological order of dates affect the XIRR function?
Yes. While XIRR is designed to handle dates that are not perfectly ordered, extremely disjointed dates or future dates mixed improperly with past dates can cause the iterative calculation to fail, resulting in a #NUM! error.
What does it mean when there is no mathematical solution for XIRR?
If your cash flows fluctuate wildly between positive and negative values multiple times across the timeline, the underlying polynomial equation used by XIRR may have multiple solutions or no real solution at all, prompting the application to return a #NUM! error.




