The Internal Rate of Return indicates the profitability of an investment and therefore is commonly used in business, when choosing between investmentments.
This calculation uses a schedule of payments (including an initial investment, along with the net income payments), to calculate the compounded return, assuming the Net Present Value of the investment is zero.
The value of the XIRR is calculated as the value of rate that satisfies the following equation:
where Pj is the j'th payment, dj is the j'th payment date and d1 is the 0'th payment date.
The Excel XIRR function returns the Internal Rate of Return for a supplied series of cash flows (ie. a set of values, which includes an initial investment value and a series of net income values).
Unlike the Excel IRR function, the series of cashflows for the XIRR calculation do not necessarily have to be periodic.
The syntax of the function is:
Where the arguments are as follows:
values    A reference to a range of cells containing the series of cash flows (the initial investment and the net income values). (Must contain at least one negative and at least one positive value). 
dates    A series of dates, corresponding to the cash flows. The first date is the start of the loan/investment period and the subsequent dates refer to the income values. Therefore, subsequent dates must be later than the first date. 
[guess]    An initial guess at what you think the IRR might be. This is an optional argument, which, if omitted, takes on the default value of 0.1 (=10%). (Note: the [guess] is only a value for Excel to start off working with  Excel then uses an iterative procedure to converge to the XIRR). 
Note that the dates should be input as either:
Warning: If you attempt to input the dates in text format, there is a risk that Excel may misinterpret them, due to different date systems, or date interpretation settings.
In the spreadsheet below, the cashflow for an investment is shown in cells B2  B7. The initial investment of $100 is shown in cell B2 and the net income over 5 periods is shown in cells B3  B7.
Cells C2  C7 show the dates for the cashflows.
The XIRR function in cell D2 shows the calculation of the Internal Rate of Return after 3 periods and the function in cell D4 shows the Internal Rate of Return after 5 periods.
Formulas:  Results: 
Further information and examples of the Excel Xirr function can be found on the Microsoft Office website.
If you get an error from the Excel Xirr function this is likely to be one of the following:
#NUM!    Occurs if either:

#VALUE!    Occurs if any of the supplied dates can't be recognised as dates in Excel 