Fix Excel XIRR Returning Zero or a #NUM! Error
Question details
Determine why an Excel XIRR or IRR formula returns a near-zero rate or a #NUM! error.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Calculating the annualized return on an investment with deposits, withdrawals, and a final value over several years.
- Observed behavior
- The formula returns zero, a near-zero result, or a #NUM! error despite substantial growth in the investment's displayed value.
Gather the dates and amounts of actual deposits and withdrawals, plus the investment value on the calculation end date. Identify which entries are cash flows and which are annual gains or losses so they are not counted twice.
Correct the cash flows and dates used by XIRR
Use this approach when the result seems inconsistent with the investment history or XIRR returns #NUM!.
In the cash-flow column, enter the initial investment and later deposits as negative amounts. Enter withdrawals and the ending investment value as positive amounts. Include at least one positive and one negative value.
Compare each entry with the actual transactions. Exclude annual gains or losses that are already reflected in the ending value, and include the ending value only once.
Enter a valid Excel date next to each cash flow and ensure the date and value ranges contain the same number of cells. Put the initial investment date first and arrange later transactions chronologically.
For values in B2:B10 and dates in A2:A10, enter =XIRR(B2:B10,A2:A10) in an empty cell. Adjust both ranges to include every cash flow.
Select the result and use Home > Number to apply Percentage formatting and increase the decimal places. A very small valid return may otherwise appear as zero.

Try a different XIRR guess or use IRR for regular periods
Use an optional guess if XIRR cannot converge, or use IRR when cash flows are equally spaced.
Calculate XIRR in WPS Spreadsheets
Use WPS Spreadsheets to review dated cash flows and calculate an annualized return with XIRR.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook, or create a new spreadsheet.
- 2. Enter dates and cash flows: Place transaction dates in column A and corresponding amounts in column B. Enter deposits as negative values and withdrawals and the ending value as positive values.
- 3. Enter XIRR: Select an empty cell and enter =XIRR(B2:B10,A2:A10,0.1), adjusting the ranges to match your data.
- 4. Format and review the result: Select the result, apply percentage formatting from the Home tab, and increase the displayed decimal places if needed.

Frequently Asked Questions
Why can XIRR be close to zero when my investment balance grew?
The ending balance may include additional deposits. XIRR considers the timing and amount of every cash flow, not just the initial deposit and final balance. Check all contributions and withdrawals in the formula range.
Do I include annual gains and losses in XIRR?
Usually not as separate cash flows. Enter actual deposits and withdrawals, then include the investment's ending value as a positive amount. Adding gains already reflected in that value can double-count them.
What causes XIRR to return #NUM!?
Possible causes include missing positive or negative cash flows, invalid date ordering, or failure to find a result. Check the inputs and try a reasonable guess, such as =XIRR(B2:B10,A2:A10,0.1).
Should I use IRR or XIRR for annual deposits?
Use IRR if cash flows are equally spaced and you want a rate per period. Use XIRR if the actual dates are irregular or you want the calculation to account for specific dates.
Why does XIRR show 0%?
The result may be small enough to round to 0%. Select the result and use Home > Number to increase the displayed decimal places, then review the underlying cash flows.




