IRR / XIRR Calculator (Excel-Style)
Paste your cash flows and instantly calculate the annual return. Use dates to calculate XIRR for irregular timing.
How to calculate IRR in Excel formula (step-by-step)
If you want to calculate irr in excel formula quickly, use the built-in IRR function when your cash flows happen in equal periods (monthly, yearly, etc.). Internal Rate of Return (IRR) is the discount rate that makes the net present value (NPV) of all cash flows equal to zero.
In plain English: IRR tells you the annualized return implied by your investment cash flows.
Excel IRR syntax
=IRR(values, [guess])
- values: A range or array of cash flows (must include at least one negative and one positive).
- guess (optional): Your starting estimate. Default is 10% (
0.1).
Simple IRR example in Excel
| Year | Cash Flow |
|---|---|
| 0 | -10,000 |
| 1 | 3,000 |
| 2 | 4,200 |
| 3 | 6,800 |
If these values are in cells B2:B5, your formula is:
=IRR(B2:B5)
Excel returns a rate that you can format as a percentage.
When to use XIRR instead of IRR
Use XIRR when cash flows are not equally spaced in time. For example, if money enters and leaves your account on random dates, XIRR gives a more accurate annual return.
Excel XIRR syntax
=XIRR(values, dates, [guess])
- values: Cash flow amounts
- dates: Matching dates for each cash flow
- guess: Optional starting rate
Example:
=XIRR(B2:B6, A2:A6)
Common mistakes that cause #NUM! or wrong answers
- All values are positive (or all negative): IRR cannot be found.
- Dates and values count mismatch in XIRR.
- Text values in range that Excel cannot interpret.
- Bad initial guess when cash flows are unusual.
- Multiple sign changes can lead to multiple possible IRRs.
How to interpret IRR for decision-making
IRR is most useful when compared against a hurdle rate (required return). A quick decision rule:
- If IRR > required return, the project is generally acceptable.
- If IRR < required return, the project may destroy value.
Still, do not rely on IRR alone. Pair it with NPV, payback period, risk analysis, and scenario testing.
Related Excel finance formulas
NPV
=NPV(rate, value1, [value2], ...)
Use NPV to calculate dollar value created at a chosen discount rate.
MIRR
=MIRR(values, finance_rate, reinvest_rate)
MIRR can be more realistic than IRR because it separates borrowing cost and reinvestment rate assumptions.
Best practices for cleaner IRR models
- Keep signs consistent: investments as negative, returns as positive.
- Document assumptions next to formulas.
- Use named ranges for readability.
- Run sensitivity checks (low/base/high cash flow scenarios).
- Validate with both IRR and NPV before making decisions.
Quick recap
To calculate irr in excel formula, use =IRR(values) for equally spaced periods and =XIRR(values, dates) for irregular timing. The calculator above follows the same logic so you can test ideas quickly before moving them into your spreadsheet model.