Last Updated on

Excel’s IRR and XIRR functions are often used to calculate the rate of investment returns. In this post, let us discuss the limitations of XIRR and IRR functions.

**Credit:** This discussion is inspired by financial planner Mr. Hari who posted a video describing the limitations of IRR and XIRR on my **XIRR calculator page**. The video (a must watch for finance professionals) is linked below.

A couple of weeks ago, when the **Chit fund returns calculator** was published, I had mentioned that, for any investment, if the amount invested is *less* than the amount received, it might not be possible to calculate the rate of return.

Excels XIRR and IRR functions, or any other code for that matter, cannot handle such situations because there is more than one rate of return possible!

In order to understand what this means, let us review some basic definitions.

**Cash flow: ** For the purposes of this post, we define cash flow as *receipts – payments*.

So if you make a profit in any investment the cash flow is positive and if you incur a loss, the cash flow is negative.

**IRR:** IRR or *internal rate of return* is a function in Excel used to calculate the return for any periodic cash flow entries. For example, if you pay insurance premium for 12 months and receive some cash back in the 13^{th} month, you could calculate the monthly IRR **and then convert to a CAGR** (compounded annual growth rate)

**XIRR:** If the cash flow entries are not periodic, then XIRR may be used to compute CAGR straightaway using the dates of payments and receipts.

Both IRR and XIRR are approximation methods (we will see why this is necessary below). Therefore, you may have to help them out buy entering a *guess *for the return.

Let us start a simple situation.

**Lump sum investment**

Suppose I invest Rs. 100 for 5 years and get Rs. 150 at the end of 5 years, what is the rate of return?

To determine this, we calculate

Compound Interest Formula

Here, *rate* is the rate of return we need to calculate. First, we rewrite

That is, we can pull the *rate* to one side of the equation.

When this is possible, we can always determine the rate *uniquely. *That is, there will only be one answer.

**SIP investment**

Suppose I run a monthly SIP of Rs. 1000 for 5 years and obtain a corpus of say, Rs. 70,000, what is the rate of return?

In this case, the formula gets a bit **complicated**!

Here, 12000 is the annual investment. Unfortunately, in this case the *rate* **cannot be pulled to one side of the equation**.

**Join our 1500+ Facebook Group on Portfolio Management!**Losing sleep over the market crash? Don't! You can now reduce fear, doubt and uncertainty while investing for your financial goals! Sign up for our

**lectures on goal-based portfolio management**and join our exclusive Facebook Community. The 1st lecture is free!

**Did you miss out on the lockdown discount? You can still avail it! Follow instructions in the above link!**

- Therefore, we have to estimate the rate of returns and cannot determine it as mentioned in my post on
**generating MF account statement with returns** - Therefore, we need to
*estimate*the returns from a SIP as mentioned in post on**SIP account statement from NAV history**

To do this, let us first denote

Here *f*(*rate*) simply means a quantity which depends on the *rate*.

We can now write the SIP formula as

C – *f*(*rate*) =0

Here C is the corpus accumulated (Rs. 70, 000 in our example). Now we start *guessing *the* rate.*

**If our guess is incorrect, C –***f*(*rate*) ≠ 0**If our guess if correct, C –***f*(*rate*) =0

Suppose I draw a graph between C – *f*(*rate*) versus all possible reasonable for the *rate *(say between -100% and +100%) then we might get something like this.

Notice that curve cuts the *x-*axis at only point. At this point the value of the *y*-axis is zero (that is C – *f*(*rate*) =0).

The corresponding value of the *x*-axis is **the rate of return**.

While this is a simple graphical way of calculating the return, there are many mathematical methods to calculate return. Excel’s IRR and XIRR uses a method known as **Newton –Raphson method**. Here is an **excellent review** on the subject (strongly recommend resource for all finance professionals)

Calculating *rate* using such methods work fine, provided the cash flow is positive. That is receipts should be greater than payments.

When the cash flow becomes negative (loss in investment) and in particular a large negative number (huge loss), the plot between C – *f*(*rate*) versus *rate* may look like this.

Notice that the curve intersects the *x*-axis at three points. This means that there are 3 solutions. That is three different *rates* correspond to our cash flow entries.

Many find this impossible to believe. Unfortunately, this is not only possible but also quite natural.

If we knew what the three solutions are, we could check them using Excels XNPV function. This function returns a value of zero if the right rate of return is chosen. XPNV will be zero for all possible solutions!

Next week I will post an Excel tool by which we can determine *all possible solutions* for a given cash flow statement.

**Video mentioned above**

**A look at Excel’s XIRR function**

If you read the comments below the video, you may notice that I had an interesting discussion with the author.

**Bottomline:**

- When the investment loss is huge, multiple
*rate**of returns*is possible. - All such solutions are
*equally correct* - You cannot pick and choose a solution that you like!
- Typically, for such situations, IRR and XIRR will return an error.
- An error is better because, for some situations IRR and XIRR can produce one of the many possible solutions! This is unfortunate because the user believes the answer without realizing that the result is wrong!

**The solution: Do not lose money! ** That way the cash flow is positive and the return will always be unique. Excels IRR and XIRR are then dependable!

**Your view:** Do spare a moment to let me know if you were able to follow the discussion. What do you make out of all this? If you can add to this discussion in any way, please let me know.

**Join our 1500+ Facebook Group on Portfolio Management!**Losing sleep over the market crash? Don't! You can now reduce fear, doubt and uncertainty while investing for your financial goals! Sign up for our

**lectures on goal-based portfolio management**and join our exclusive Facebook Community. The 1st lecture is free!

**Did you miss out on the lockdown discount? You can still avail it! Follow instructions in the above link!**

**Use our market valuation tool**(will work with any index!)

**About the Author**

M. Pattabiraman(PhD) is the founder, managing editor and primary author of freefincal. He is an associate professor at the Indian Institute of Technology, Madras. since Aug 2006. Connect with him via Twitter or Linkedin
Pattabiraman has co-authored two print-books, You can be rich too with goal-based investing (CNBC TV18) and Gamechanger and seven other free e-books on various topics of money management. He is a patron and co-founder of “Fee-only India” an organisation to promote unbiased, commission-free investment advice.He conducts free money management sessions for corporates and associations on the basis of money management. Previous engagements include

*World Bank*, RBI,

*BHEL*, Asian Paints, Cognizant, Madras Atomic Power Station, Honeywell, Tamil Nadu Investors Association.

**For speaking engagements write to pattu [at] freefincal [dot] com**

**About freefincal & its ****content policy**

Freefincal is a News Media Organization dedicated to providing original analysis, reports, reviews and insights on developments in mutual funds, stocks, investing, retirement and personal finance. We do so without conflict of interest and bias. We operate in a non-profit manner. All revenue is used only for expenses and for the future growth of the site. Follow us on **Google News**

Freefincal serves more than one million readers a year (2.5 million page views) with articles based only on factual information and detailed analysis by its authors. All statements made will be verified from credible and knowledgeable sources before publication.Freefincal does not publish any kind of paid articles, promotions or PR, satire or opinions without data. All opinions presented will only be inferences backed by verifiable, reproducible evidence/data.

**Contact information:**letters {at} freefincal {dot} com (sponsored posts or paid collaborations will not be entertained)

**Connect with us on social media**

**Twitter @freefincal****Facebook**- Subscribe to our
**Youtube Videos** - Posts feed via:
**Feedburner** **Pinterest**

**Our Publications**

**You Can Be Rich Too with Goal-Based Investing**

**This book is meant to help you ask the right questions, seek the right answers and since it comes with nine online calculators, you can also create custom solutions for your lifestyle!**

**Get it now**. It is also available in Kindle format.

**Gamechanger: Forget Startups, Join Corporate & Still Live the Rich Life You Want**

**This book is meant for young earners to get their basics right from day one! It will also help you travel to exotic places at low cost!**

**Get it or gift it to a young**

**earner**

**Your Ultimate Guide to Travel
**

**Get the pdf for Rs 199 (instant download)**

**Free Apps for your Android Phone**

**All calculators from our book, “You can be Rich Too” are now available on Google Play!****Install Financial Freedom App! (Google Play Store)****Install Freefincal Retirement Planner App! (Google Play Store)****Find out if you have enough to say "FU" to your employer (Google Play Store)**

**Comment Policy**

Your thoughts are the driving force behind our work. We welcome criticism and differing opinions.**Please do not include hyperlinks or email ids in the comment body**. Such comments will be moderated and I reserve the right to delete the entire comment or remove the links before approving them.

Sir, Thank you very much. Of course it’s too technical. Hence wait for your next post.:)

“Next week I will post an Excel tool by which we can determine all possible solutions for a given cash flow statement.”

Thanks Hari. We could only determine all possible solutions. Does not mean it would be helpful to us 🙂

Sir, Thank you very much. Of course it’s too technical. Hence wait for your next post.:)

“Next week I will post an Excel tool by which we can determine all possible solutions for a given cash flow statement.”

Thanks Hari. We could only determine all possible solutions. Does not mean it would be helpful to us 🙂

Dear Pattu, Thanks for sharing. I was also finding it tough to calculate real return if losses are huge. 🙂

I’ll wait for your next post.

Thanks

Ashal

LOL. Good one Ashal! ‘Real return’ can be negative even for positive cash flows 🙂

Dear Pattu, Thanks for sharing. I was also finding it tough to calculate real return if losses are huge. 🙂

I’ll wait for your next post.

Thanks

Ashal

LOL. Good one Ashal! ‘Real return’ can be negative even for positive cash flows 🙂

Dear Pattu, many thanks for sharing

I want to know how we can calculate composite XIRR and CAGR for a portfolio.

Let say, I have a portfolio consisting of three different funds with uneven inflows and outflows.

I find out XIRR and CAGR for all three funds separately. How these individual returns will be composite to show a return (XIRR and CAGR) on Portfolio.

Hi Gaurav, There are two ways one can do it.

(1) Fund A gives 10% return and constitutes 40% of investment value

fund B 11% return and 30% weight

fund C 12% return and 30 weight

So net XIRR is = 10%*0.4+11%*0.3+12%*0.3

This is known as a weighted sum

(2) The other way is to integrate the cash flow for all funds get a single XIRR. This is what I do for my NPS account.

if you send me a file with sample data, I can show you how to put it together.

Keep visiting.

Dear Pattu, many thanks for sharing

I want to know how we can calculate composite XIRR and CAGR for a portfolio.

Let say, I have a portfolio consisting of three different funds with uneven inflows and outflows.

I find out XIRR and CAGR for all three funds separately. How these individual returns will be composite to show a return (XIRR and CAGR) on Portfolio.

Hi Gaurav, There are two ways one can do it.

(1) Fund A gives 10% return and constitutes 40% of investment value

fund B 11% return and 30% weight

fund C 12% return and 30 weight

So net XIRR is = 10%*0.4+11%*0.3+12%*0.3

This is known as a weighted sum

(2) The other way is to integrate the cash flow for all funds get a single XIRR. This is what I do for my NPS account.

if you send me a file with sample data, I can show you how to put it together.

Keep visiting.

Dear Pattu,

I think the second way is the correct method to find out exact return on a portfolio. In most of the cases the investment date or withdrawal date of various assets is different. Then how we can get actual return via using simple weighted average method.

Please provide you e-mail id so that I can send you a sample excel sheet which comprises of three funds having different inflows & outflows and have different dates of contribution and withdrawal.

Dear Pattu,

I think the second way is the correct method to find out exact return on a portfolio. In most of the cases the investment date or withdrawal date of various assets is different. Then how we can get actual return via using simple weighted average method.

Please provide you e-mail id so that I can send you a sample excel sheet which comprises of three funds having different inflows & outflows and have different dates of contribution and withdrawal.

Finally, an explanation of the “XIRR bug”. You might be the only one to have explained it.

Now I can sleep again.

Thanks

Thanks. There are two issues:

1> Multiple solutions which make XIRR return an error. this is not a bug.

2> incorrect convergence. This is a bug.

I will soon be post a XIRR solution validator. Stay tuned!

Finally, an explanation of the “XIRR bug”. You might be the only one to have explained it.

Now I can sleep again.

Thanks

Thanks. There are two issues:

1> Multiple solutions which make XIRR return an error. this is not a bug.

2> incorrect convergence. This is a bug.

I will soon be post a XIRR solution validator. Stay tuned!

sir, send me your file.

Sent to your email Email.

http://freefincal.com/can-help-test-mutual-fund-financial-goal-tracker/

sir, send me your file.

Sent to your email Email.

http://freefincal.com/can-help-test-mutual-fund-financial-goal-tracker/