How to Calculate your Return- The Excel XIRR Function


As you invest, it is important to know about how you are doing.  It is easy to see how your individual investments are doing each year.  They report to you their time-weighted return.  Of course, that isn’t the return you generate.  You get a dollar-weighted return.  It turns out that the dollar-weighted return for most investors is far lower than the time-weighted return of their investments.  This occurs mostly due to performance chasing and the buying high/selling low phenomenon that results from it. While I don’t think you need to look at your investments every day, or even every month, from time to time you ought to check in and see how you are doing.  If you don’t know what returns you have been getting, it is hard to gauge how well you are progressing toward your goals.  It is also easier to get sucked into investments that promise a high return, but don’t actually deliver.  In short, being able to calculate your own return empowers you as an investor.

The best way to calculate your return is to use the Excel XIRR function.  This gives you a dollar-weighted return because it takes into account the timing and amount of your cash flows into and out of your retirement funds.  It is surprisingly easy to calculate.  All you need to know is the amounts you have put in or taken out of the account and the dates on which you did that.  Here’s a quick tutorial:

Put the amounts of your cash flows into column A. Amounts you contributed to retirement and other investment accounts are positive.  Amounts you took out are negative.  The last entry should be the current amount you have, as a negative number.  Put the dates of the cash flows into column B.  You need to use the excel DATE function to do this.  It looks like this: =DATE(2004,8,16) where 2004 is the year, 8 is the month, and 16 is the date.

Now, in another cell, put in the xirr function.  It looks like this: =XIRR(A1:A10, B1:B10, 5%) where your cash flows are in cells A1 to A10, your date functions are in cells B1 to B10, and 5% is your estimated return.  (If left blank, it defaults to 10%.)

Now for an example:

 
If you want, click on the button in the lower right and follow the directions if you want to download this file to play with it.

Remember that 9.75% is an annualized return, so it means that between 7/11/07 and 5/19/11 this investment returned 9.75% PER YEAR. If your period of time is less than one year, it will also annualize the return. For example, if your period is 6 months, and your return is 5%, then XIRR would return 10%.

If you would like to calculate a year to date return and/or calculate out your return for each calendar year you have had the investment, it only gets a little more complicated. First, you’ll need to add in the value of the investment at the end of each year. I use two entries, the first negative and the second positive, both with the date of 12/31 of the given year. Then, run the XIRR function from the positive entry on 12/31 of one year, to the negative entry on 12/31 of the next. See the next spreadsheet for details of how to calculate returns for partial years, full years, and the year to date.

Play around with it for a few minutes and you’ll figure it out. If you’re a spreadsheet junkie, you can also break it down for each retirement account, or even each individual investment. All you need are your inflows and outflows, and the corresponding dates. If you want to calculate the yearly returns or the year to date return, you’ll also need the year end values of the investments. But you don’t have to take into account fees, commissions, or any dividends or capital gains that are reinvested. Of course, if you don’t reinvest dividends, those should be considered withdrawals from the account, just like fees paid from a separate account, should be considered contributions to the account. XIRR is a powerful function that will allow you to calculate your portfolio’s overall returns, no matter how many different retirement accounts you have.

 

Enter Your Mail Address


Comments

How to Calculate your Return- The Excel XIRR Function — 18 Comments

  1. Pingback: Designing a doctor's portfolio- Part 7 | The White Coat Investor- Investing And Personal Finance Information For Physicians, Dentists, Residents, Students, And Other Highly-Educated Busy Professionals

  2. Pingback: A Discussion of the White Coat Investor's Personal Portfolio | The White Coat Investor- Investing And Personal Finance Information For Physicians, Dentists, Residents, Students, And Other Highly-Educated Busy Professionals

  3. That’s one of the beauties of XIRR. You don’t have to deal with reinvested dividends. All you need is the beginning value and ending value. If you’re spending the dividends, count them as withdrawals from the account.

  4. Two questions,
    Why do you have to “guess” a 10% or 5% return? What is that doing in the formula?
    Do you have to put in the date 2012,10,23, or could you put just the cell numbers that the date range is in?
    Thanks, really appreciate the info.

  5. I’m not sure I’m enough of a math whiz to answer your first question. It has to do with the algorithm the function follows. You do have to use the “date” function, but if you put in the cell number and a date function is in the cell that’s okay.

  6. Those who know a little about investing know that 9% consistent returns over 2 years is better than 18% one year and 0% the next, still with an average of 9%. I used this function to help figure out what the equivalent “consistent return” on a mutual fund might be. You know, they will advertise the better of the 2 numbers: The average annual performance. So I took a Vanguard fund (big Vanguard fan) that had 9.02% average annual performance over 10 years, and I used the XIRR function to see what would be the equivalent CONSISTENT return over the 10 years. Turns out it was 7.2%. In other words, a non-volatile fixed investment of 7.2% would return the same as this fund that was volatile but averaged 9% annually. Really hammered home this idea that the stock market has NOT returned 10-11% over time ….. This is the average of its yearly returns, which is not the number we really want when we’re estimating how much our money will grow with time.

  7. An excellent point. The difference between the arithmetic mean and the geometric mean and the significance of it is pretty depressing.

  8. I’ve just discovered XIRR and came across this, which was by far the clearest article on the subject. Thank you!

    I know I don’t have to enter reinvested dividends and that makes sense because it’s not “my” money going in as a contribution and is internal to the account. It’s not clear to me why, then, dividends not reinvested should be removed, but I honestly don’t care about that scenario as all stocks in my portfolio are in DRIPs.

    The article mentions about not having to take fees into account. Consider this: I send in $100. They take $3.10 in fees, etc., actually investing $96.90 for me. Do I enter $96.90 for the amount of that transaction, or $100? My initial thought was $96.90, because that’s what actually went towards the purchase and I continued onward, but I am now second-guessing myself.

  9. I disagree. You should be putting in $100. That’s what it cost you. Otherwise you’re calculating your return without regard to fees, which isn’t really what you should care about.

    Dividends not reinvested don’t stay in the account, that’s why you treat them as withdrawals. As long as they’re reinvested you can ignore them for the calculation.

  10. You make a nice explanation of the XIRR function, but I have a few questions since I’m not a math or Excel whiz, but would love to test it on my DRIP’s and mutual funds. So…my questions:
    1. When explaining above the first spreadsheet, you say “The last entry should be the current amount you have, as a negative number.” What’s the current amount? Is it the market value of my investment on a certain day (e.g. 100 share x $105/sh.on 10/15/12 = $10,500 as a negative value for XIRR funcion)?

    2. PP kind of explained why dividends reinvestments should be excluded from the data input, but even though he/she doesn’t care to know why not reinvested dividends have to be showed as cash out-flows, I would like to know. Why reinvested dividends need to be excluded from the data input, but if I choose to not reinvest, it has to be entered as a negative number (what date to use for it?)?

    . How to calculate a XIRR of a portfolio consisting of say 5 DRIP’s & 3 mutual funds, when weekly and monthly investments occur? Do I have to combine all contibutions in one file in chronological order? What’s the current amount of all 5 investments? Add market values of all?

    I think I’ve got more q. but it’s enough for starters :-)).

    • 1. Yes. Exactly.
      2. If you reinvest the dividend it isn’t money taken out of the investment, so you don’t have to include it. If you don’t reinvest it, it’s money taken out, so you need to include it as a negative number. Use the dividend date.
      3. Yes, you have to include all contributions with their relevant dates. I don’t think they actually have to be in order, but I keep mine in order. The current amount is the market value of all. I keep track of my entire portfolio that way. A separate XIRR for each investment and a grand total XIRR for the total.

          • Whoops, should have been more clear. I was referring to calculating a grand total XIRR across multiple accounts.

          • So, to rephrase the question:

            Say one has three different accounts, each with a different XIRR. HOw does one calculate a “grand total” XIRR, or a return that takes into consideration all of the accounts? Would it be a weighted average the XIRRs of all three accounts?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>