Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Solve for IRR in Excel: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To solve for IRR in Excel, use the IRR function: enter your cash flows in chronological order in a single column or row, then in an empty cell type =IRR(range) and press Enter. The result is the internal rate of return as a decimal; format the cell as a percentage to read it easily. If you have dates instead of periods, use XIRR instead. That is the whole answer in one line — the rest of this guide covers setup, edge cases, and what to do when Excel returns an error or a suspiciously round number.

What You'll Need

  • Microsoft Excel (desktop or web) or a spreadsheet app that supports IRR — the function is standard in Excel 2010 and later, including Microsoft 365.
  • Your cash flow data: one initial investment (usually negative) followed by a series of positive or negative cash flows at regular intervals.
  • An empty cell for the formula result.
  • Optional but helpful: a guess rate if Excel struggles to converge (more on that below).

Note that menu labels and function names can differ slightly by Excel version, platform, or region. The steps below use the desktop Excel interface; the web version works the same way for the formulas.

Step-by-Step

  1. Lay out your cash flows in order. Put each period's cash flow in its own cell down a single column (or across a single row). The first value should be the initial investment as a negative number (for example, -10000). Subsequent values are the net cash flow for each period — positive for inflows, negative for outflows. Do not skip periods; if a period has zero cash flow, enter 0.
  2. Confirm the intervals are equal. The IRR function assumes each cash flow occurs at the end of a period of equal length (monthly, quarterly, annually). If your periods are irregular, skip to the XIRR method below.
  3. Select an empty cell where you want the result to appear.
  4. Type the formula. Enter =IRR( and then select the range of cells containing your cash flows, or type the range manually, for example =IRR(A1:A6). Close the parenthesis and press Enter.
  5. Read the result. Excel returns a decimal such as 0.12. Select the cell, then on the Home tab click the percentage format button (or press Ctrl+Shift+%) to display it as 12%.
  6. If Excel returns #NUM! or an unexpected value, add a guess. The IRR function accepts an optional second argument: =IRR(A1:A6, 0.1). The guess is a starting point for Excel's iterative calculation. Try 0.1 (10%), -0.1, or another plausible rate. This is the most common fix for convergence errors.
  7. For irregular dates, use XIRR. Put your cash flows in one column and the corresponding dates in the next column. Then use =XIRR(values, dates), for example =XIRR(B1:B6, A1:A6). XIRR returns an annualized rate and does not require equal intervals. Format the result as a percentage the same way.
  8. Double-check the sign convention. At least one cash flow must be negative and at least one positive for IRR to exist. If all values are positive or all negative, Excel returns #NUM!.

Common Mistakes

  • Forgetting the negative initial investment. If you enter the initial outlay as a positive number, IRR will be meaningless or return an error. The first cash flow is money going out, so it should be negative.
  • Mixing up rows and columns. The range you pass to IRR must be a single row or a single column. A rectangular range that spans multiple rows and columns will return #VALUE!.
  • Including text or blank cells in the range. IRR ignores text and logical values, but blank cells can shift the period count. Make sure every period has a numeric value, even if it is 0.
  • Using IRR for irregular cash flow dates. IRR assumes equal periods. If your cash flows arrive on uneven dates, use XIRR; otherwise the result will be wrong.
  • Expecting a unique answer. If your cash flows change sign more than once (for example, negative, positive, negative), there can be multiple IRRs. Excel returns the one closest to your guess. This is a known limitation of the IRR calculation, not an Excel bug.
  • Formatting the result as a number instead of a percentage. A result of 0.08 means 8%, not 0.08%. Apply percentage formatting to avoid misreading it.

Tips

  • Label your cash flow column clearly (for example, "Year 0", "Year 1") so the order is obvious to anyone reviewing the sheet.
  • Use a named range for your cash flows if you will reuse the formula. Select the cells, type a name in the Name Box, and then use =IRR(MyCashFlows).
  • If you need to compare projects, calculate IRR for each in separate cells and line them up next to NPV results. IRR alone can mislead when project sizes differ.
  • For a quick sanity check, IRR is the rate at which NPV equals zero. You can verify by calculating NPV at the returned rate; it should be very close to zero.
  • Keep the guess argument in a separate cell if you are experimenting, so you can change it without editing the formula each time.

Troubleshooting

If the formula does not work as expected, work through these checks in order:

  • #NUM! error: Add or adjust the guess argument. Try 0.1, then -0.1, then 0.5. Also confirm you have at least one negative and one positive cash flow.
  • #VALUE! error: Check that your range is a single row or column and contains only numbers (or blanks). Remove any text entries.
  • Result looks wrong (for example, 0% or an absurdly high rate): Verify the sign of the initial investment and that all periods are included. A missing period changes the answer.
  • Formula returns a value but you expected a different one: You may have multiple sign changes in your cash flows. Try different guesses to see the range of possible IRRs, and consider whether IRR is the right metric for that project.
  • XIRR returns #NUM!: Check that the first date is the earliest and that all dates are valid Excel dates. Also ensure at least one negative and one positive cash flow.
  • Nothing happens when you press Enter: Make sure the cell is not formatted as Text. Change the format to General or Number and re-enter the formula.

Frequently Asked Questions

What is the difference between IRR and XIRR in Excel?

IRR assumes cash flows occur at regular, equal intervals. XIRR accepts specific dates for each cash flow and returns an annualized rate, so it is the correct choice when periods are irregular.

Why does Excel return #NUM! for IRR?

Usually because Excel cannot converge on a result within its iteration limit. Supplying a guess rate as the second argument often fixes it. It can also happen if all cash flows have the same sign.

Can IRR be negative?

Yes. A negative IRR means the investment is expected to lose money at that rate. Excel will return a negative decimal if that is the mathematical result.

How do I format the IRR result as a percentage?

Select the cell and click the percentage style button on the Home tab, or press Ctrl+Shift+%. You can also use Format Cells and choose Percentage with the number of decimal places you want.

Does IRR work in Excel for the web?

Yes, the IRR and XIRR functions are available in Excel for the web and behave the same as in the desktop version.

What if my cash flows have more than one sign change?

There may be multiple valid IRRs. Excel returns the one closest to the guess you provide. In that situation, NPV is often a more reliable decision tool than IRR.