This XIRR vs. IRR template allows you to differentiate between the use of IRR and XIRR functions to compute the internal rate of return.
The Internal Rate of Return is the discount rate that sets the Net Present Value (NPV) of all future cash flow of an investment to zero. If the NPV of an investment is zero it doesn’t mean it’s a good or bad investment, it just means you will earn the IRR (discount rate) as your rate of return.
If you use the =IRR() formula in Excel you are using equal time periods between each cell (cash flow). This makes it challenging when you expect to enter an investment in the middle of a year.
If you use the =XIRR() formula in Excel you have complete flexibility over the time periods of the cash flows. In order to do this, enter two series in your formula:
XIRR gives you the flexibility to assign specific dates to each individual cash flow, making it a much more accurate calculation.
Credits to : Corporate Finance Institute