Quick Answer

XIRR Function

Calculates the internal rate of return for a schedule of cash flows that is not necessarily periodic.

✓ Excel✓ Google SheetsExcel All versions

Syntax

XIRR
(values, dates, [guess])

Parameters

ParameterDescriptionRequired
valuesSeries of cash flows corresponding to the dates.Required
datesSeries of dates corresponding to the cash flows.Required
guessInitial guess for the rate (default 10%).Optional

Basic Example

IRR for irregular cash flows

=XIRR(B2:B5, A2:A5)
ResultAnnual IRR

A2:A5 contains dates, and B2:B5 contains the corresponding cash flows.

Advanced Examples

Example 1: Add a guess

Non-converging IRR

Provide a guess to help the solver converge

=XIRR(B2:B5, A2:A5, 0.2)
Result: Annual IRR
A 20% guess can help when the default guess fails.

How XIRR Works

XIRR solves for the rate that makes the net present value of the irregular cash flows equal to zero. It uses an annualized rate based on the 365-day year.

1
Enter values
Type the values
2
Enter dates
Type the dates
3
Enter guess
Type the guess
4
Calculate
Press Enter to get the result.

Important Notes & Limitations

  • Dates must be valid and in chronological order.

  • Requires at least one positive and one negative cash flow.

  • Result is an annualized rate.

Common Errors & Fixes

#NUM! errorThe solver cannot converge or the cash flows have the same sign.

Fix: Add a guess or check that cash flows have both signs.

#VALUE! errorDates are not valid or do not align with values.

Fix: Ensure dates are valid Excel dates and match the values array.

Download Practice File

Practice XIRR with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the XIRR function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

What is the difference between IRR and XIRR?
IRR assumes equal-period cash flows. XIRR uses actual dates for irregular intervals.
Can XIRR handle monthly contributions?
Yes, as long as the dates are provided, the intervals can be any length.