IRR/XIRR – Excel – Limitations of Calculating Complex Cash Flow Returns

Published: September 15, 2013 at 6:08 pm

Last Updated on October 26, 2020

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 13th 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-1

Compound Interest Formula

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

compound-interest-2

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!

SIP-compound-interest-4

compound-interest-3

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

  • 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

SIP-compound-interest-5

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.

Estimating-investment-returns-postive-cash-flow

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.

Estimating-investment-returns-negative-cash-flow

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.

Do share if you found this useful

We now publish both equity fund and debt fund (+ hybrid fund) screeners each month!
Use our Robo-advisory Excel Template for a start-to-finish financial plan! Now with a new demo video!  More than 415 investors and advisors use this!
Unlock the secrets of successful financial advisors and entrepreneurs with our new course!
My new book for kids: “Chinchu gets a superpower!” is now available!
Both boy and girl version covers of Chinchu gets a superpower
Both boy and girl version covers of Chinchu gets a superpower.
Most investor problems can be traced to a lack of informed decision making. We have all made bad decisions and money mistakes when we started earning and spent years undoing these mistakes. Why should our children go through the same pain? What is this book about? As parents, if we had to groom one ability in our children that is key not only to money management and investing but for any aspect of life, what would it be? My answer: Sound Decision Making. So in this book, we meet Chinchu, who is about to turn 10. What he wants for his birthday and how his parent’s plan for it and teach him several key ideas of decision making and money management is the narrative. What readers say!
Feedback from a young reader after reading Chinchu gets a Superpower (small version)
Feedback from a young reader after reading Chinchu gets a Superpower!
Must-read book even for adults! This is something that every parent should teach their kids right from their young age. The importance of money management and decision making based on their wants and needs. Very nicely written in simple terms. - Arun.
Buy the book: Chinchu gets a superpower for your child!
How to profit from content writing: Our new ebook for those interested in getting side income via content writing. It is available at a 50% discount for Rs. 500 only!
Did you know? We have more than 1000+ videos on YouTube to explore! Join our YouTube Community!

Join our courses in exclusive Facebook Groups!

  • 550+ members are now part of our new course: How to get people to pay for your skills! (watch 1st lecture for free). Learn how to get people to pay for your skills! Whether you are a professional or small business owner who wants more clients via online visibility or a salaried person wanting a side income or passive income, we will show how to achieve by showcasing your skills and building a community that trusts you and pays you!
  • Goal-based portfolio management! Join 2220+ members and get clarity on how to plan for your goals and achieve the necessary corpus no matter what the market condition is!! Watch the first lecture for free!  One-time payment of Rs. 3000 only. No recurring fees! Life-long access to videos (10+ hours content)  in an exclusive Facebook Group! Reduce fear, uncertainty and doubt while investing! Learn how to plan for your goals before and after retirement with confidence.

Want to check if the market is overvalued or undervalued? Use our market valuation tool (will work with any index!), or you buy the new Tactical Buy/Sell timing tool!
We publish mutual fund screeners and momentum, low volatility stock screeners .every month.
About the Author Pattabiraman editor freefincalM. 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 money management topics. 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 based on money management. Previous engagements include World Bank, RBI, BHEL, Asian Paints, Cognizant, Madras Atomic Power Station, Honeywell, Tamil Nadu Investors Association, IIST Alumni 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. 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 paid articles, promotions, 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
Our publications

You Can Be Rich Too with Goal-Based Investing

You can be rich too with goal based investingPublished by CNBC TV18, this book is meant to help you ask the right questions, seek the correct 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 Gamechanger: Forget Start-ups, Join Corporate and Still Live the Rich Life you wantThis book is meant for young earners to get their basics right from day one! It will also help you travel to exotic places at a low cost! Get it or gift it to a young earner.

Your Ultimate Guide to Travel

Travel-Training-Kit-Cover-new This is an in-depth dive analysis into vacation planning, finding cheap flights, budget accommodation, what to do when travelling, how travelling slowly is better financially and psychologically with links to the web pages and hand-holding at every step. Get the pdf for Rs 199 (instant download)
Free android apps