Fix XIRR Returning Different Results for Vertical vs Horizontal Data
Question details
The user is experiencing inconsistent results when using the XIRR function on the same financial dataset depending on whether it is arranged vertically or horizontally.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating the internal rate of return using the XIRR function on cash flows and dates that have been manually copied or rearranged into different layouts.
- Observed behavior
- The XIRR formula calculates different percentage yields for horizontal and vertical data arrays, whereas the standard IRR function remains unaffected.
Verify that your dataset contains valid date formats and that no blank cells exist within the selected ranges of both your dates and cash flows.
Align Dates and Cash Flows Using Paste Special Transpose
Use the Transpose feature to perfectly convert vertical data to horizontal (or vice versa) to prevent manual entry errors that cause XIRR calculation differences.
The XIRR function relies heavily on exact date matching. Unlike the IRR function, which assumes equal intervals and ignores dates, XIRR pairs each cash flow with a specific date. If a vertical range is manually typed into a horizontal range, slight typos in dates or misaligned rows/columns will cause the formula to return different results.
Highlight both the dates and cash flows columns, right-click, and select 'Copy'.
Right-click on the destination cell where you want the horizontal data to begin, and choose 'Paste Special'.
In the Paste Special dialog box, check the 'Transpose' box and click 'OK'. This ensures identical date values and alignment.
Enter your new XIRR formula referencing the perfectly transposed horizontal rows to confirm the result matches the vertical calculation.

Verify Exact Formula Range References
Check that your horizontal and vertical XIRR formulas refer to arrays of the exact same size and starting points.
Calculate Complex Financial Formulas Flawlessly with WPS Spreadsheet
WPS Spreadsheet offers robust financial functions including XIRR and IRR, ensuring precise calculations across all data layouts. Its built-in Paste Special tool makes reformatting large datasets effortless.
- 1. Input your data: Open WPS Spreadsheet and enter your cash flow amounts and corresponding dates in adjacent rows or columns.
- 2. Enter the XIRR function: Type =XIRR( into an empty cell, select your cash flow range, type a comma, and then select your date range.
- 3. Get precise results: Close the parenthesis and press Enter. WPS will instantly compute the accurate internal rate of return for unevenly spaced cash flows.

Frequently Asked Questions
Why does the standard IRR function give the same result regardless of dates?
The standard IRR function assumes that all cash flows occur at regular, identical intervals (like monthly or yearly) and completely ignores specific date values. Therefore, as long as the cash flows are in the same sequence, IRR will produce the same result whether the data is vertical or horizontal.
Does XIRR require dates to be in chronological order?
No, the XIRR function can calculate correctly even if the dates are out of order, as long as every individual cash flow is matched to its correct respective date. However, sorting them chronologically makes it much easier to spot missing values.
What does a #NUM! error mean in my XIRR formula?
A #NUM! error in XIRR typically means the function cannot find a mathematical result within the standard iterations. It can also occur if your date range and cash flow range are different sizes, or if you do not have at least one positive and one negative cash flow.




