Formula Errors

Fix Excel XIRR Returning Zero or a #NUM! Error

Steve KSteve K Nov 25, 2026 869 views

Question details

Determine why an Excel XIRR or IRR formula returns a near-zero rate or a #NUM! error.

Fix Excel XIRR Returning Zero 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.
Before you start

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.

Solution 1Recommended

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!.

1
Review the cash-flow signs

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.

2
Check the transaction amounts

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.

3
Verify the dates

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.

4
Calculate the return

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.

5
Inspect the displayed rate

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.

Correct the cash flows and dates used by XIRR
A near-zero rate is not automatically an error: If total proceeds are close to total contributions, a near-zero XIRR can be plausible even when the ending balance is much larger than the initial deposit. Check the full cash-flow history before judging the result.
Calculate investment returns

Calculate XIRR in WPS Spreadsheets

Use WPS Spreadsheets to review dated cash flows and calculate an annualized return with XIRR.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook, or create a new spreadsheet.
  2. 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. 3. Enter XIRR: Select an empty cell and enter =XIRR(B2:B10,A2:A10,0.1), adjusting the ranges to match your data.
  4. 4. Format and review the result: Select the result, apply percentage formatting from the Home tab, and increase the displayed decimal places if needed.
Calculate returns for irregularly dated cash flowsOpen and edit Microsoft Excel XLSX and XLS filesReview deposits, withdrawals, and the ending value in one worksheetUse familiar spreadsheet formulas and formatting
microsoft office alternative - wps office

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.