# Calculating Annuliased Portfolio Returns using XIRR

When we invest in stocks, knowing the profit and loss for each individual stock alone is not enough. We have to know our annual portfolio returns so that we will know whether we have beaten inflation, we are on track to our financial goals and if we have beaten the market. If we have not beaten the market, it will be better off  buying the market itself by investing in exchange traded funds (ETFs). So how do we calculate our annualised portfolio returns when we have cash flow coming in and going out at random time periods? One of the ways to do that is to use internal rate of return, XIRR.

Calculating XIRR is actually very straightforward. When I was reading up on it, it sounded complicated but to the contrary, it is very simple. In this post, I will provide a step-by-step method to calculate your returns.

Things you need before calculating XIRR:

• A computer with Microsoft Excel
• Transaction dates and amounts (i.e. the date you bought/sold and the amount you bought/sold it for, including commissions)
• Portfolio market value as of the date you are calculating
• That’s all!

Method:

1. Open Microsoft Excel.
2. Type in the transaction dates in chronological order and the corresponding amounts. Note that all buys (cash flow in) should be entered as a positive amount and all sells (cash flow out) should be entered as a negative amount.
3. For dividends, if they are not reinvested, enter the dividend paid date and the amount as a negative number. Ensure that the dividend paid dates are in chronological order with your transaction dates as in point 2. If the dividends are reinvested, you do not have to account for it at all (as they are staying inside the portfolio itself).
4. Then, enter the portfolio’s market value as of the date you are calculating and add in the corresponding date. The market value must be entered as negative.
5. Double-check and triple-check to make sure the  positive and negative signs are entered correctly as a small mistake can mean that the portfolio return can vary widely.
6. After you have keyed in all the required information, type in an empty cell “=XIRR” (without the “”) and type in “(” to open the bracket, highlight all the transaction amounts, add a “,” highlight all the dates and then close the bracket, “)” and hit “Enter”.
7. Viola! Your yearly portfolio returns are shown.

You can refer to the screenshot below for a summary on what to do:

Calculating my own portfolio returns has been very helpful as it gives me the impetus to improve myself further after knowing the figure. I also know where I’m heading and am able to plan for my retirement better. Do feel free to ask me any questions you have regarding calculating your own portfolio’s XIRR, by leaving a reply below.

## 11 thoughts on “Calculating Annuliased Portfolio Returns using XIRR”

1. Hi FFN,

calculation of XIRR must be based on historical transactions? for example, can i just calculate for year 2012? If a bought a stock say in 2010, but have been holding in till now, so there is no cash in or out in 2012, but the portfolio value should reflect the market value of that stock right?? or leave that out???

SInce the ending portfolio will changes everyday due to the volaility of market, do we need to look at average over a number of years??

Or it must be done with all tranactions logged to be accurate??

1. Hi sillyinvestor,

XIRR can be used for single stock performance but it is best to measure your portfolio performance.of stocks and invertible cash.

We are looking for rising trend or stability in our XIRR performance over market cycles and learn to improve and adjust our investing strategies to meet our long term investing goals.

2. Hi sillyinvestor,

Yes historical transaction. If you bought in 2010 and didn’t buy in between and want to calculate your returns as of today, it’s very simple as you don’t have cash flow in (i.e. you didn’t buy more). In that case, you don’t have to use XIRR. You can just use a compound interest calculator at http://www.1728.org/compint.htm or use a physical financial calculator under the “Compound” mode. Excel can do it too but I don’t know the formula for it. You can Google it.

You don’t have to look at average over a number of years as you want to know your yearly returns as of the current date.

Don’t understand your last question. Mind elaborating?

Cheers!

3. actually, i was trying to key in the data when i realised .. hey, i start trading shares some 10 years ago,and there was a period of time, i am trading more than investing, so its quite a tedious task to key in all my trades, that is why i ask if we could just key in the trades by year, but i realised there is a end portiflio figure.. thus my previous questions

1. Upon a time, I was also crazy over day trading and thinking of trading for a living.

XIRR is a good performance measurement tool for long term investors.

I used to measure trading performance in terms of

1) No of trades in ROC Banding,
2) Total Number of Wins / Total Number of Losses, and
3) Total Win \$ / Total Loss \$, etc

4. Newbie says:

Hi FFN,

From earlier of March (this month), people saying there might be some correction in the market. True enough, most of the stock has gone down after a bull run for about 2 months.

I have a stock which is asset play (currently traded about 28% of its Nta), PE of about 5.8x, the main business is improving (based on their latest HY2012 in Nov 2012), there is some good prospect which the company is working into.

When i first bought the stock, it was traded at about 9.6 cents. It has reached its peak at 18.3cents last month. I did not sell my shares as i thought the stock is still undervalued. And i was actually hoping to see the FY2012 report which is to be released in May 2013.

But since March 2013, the price has been dropped tremendously to lowest 11.8cents, and currently is traded at about 12.5cents.

Do you think what i am doing to right? Or would not better if i have just sold my shares when it reached about its peak (it was traded at about 16 – 17cents for quite some weeks last month) and had bought it back now?
Is this the way an investor should do? Or can you give me some of your advise on this?

Many thanks.

1. Hi Newbie,

I don’t pay attention to market predictions. It’s hard to predict the market and no one can predict the markets accurately all the time. Even professional analysts who look at the stock market 24/7 have failed many a times.

If I were you, I would keep the business if it was still undervalued. It’s hard to predict the top and sell exactly at the top. If the price drops, I would buy more if the fundamentals are still intact as when I first bought it. You have to re-evaluate the business from this point on.

If the business is overvalued and the market is overheated, you could sell in tranches if you have a substantial number of lots. For example, if you have 10 lots, you can sell 5 lots this week and 5 two weeks later, or something like that. If you don’t, you can sell all at one shot. The price may go up after selling and no one can stop it from doing so (unless you manipulate the markets) and in that instance, you shouldn’t kick yourself for selling early. I have made such mistakes of selling early too. In one instance, I sold and the price shot up to around 2x a year later!

Hope this helps! Do feel free to ask any other questions you may have and I will be glad to answer those.

5. Newbie says:

hi FFN,

I will ask you if i have such questions in future!. Cheers.

6. aashesh says:

How does XIRR change if there are bonus and split transactions in a portfolio, I am calculating XIRR for my stock portfolio, any help would be much appreciated.

1. Hi aashesh,

I believe when you put the ending amount of your portfolio, the bonus and stock splits will take care of themselves. There’s no cash flow in or out per se. Only if there is cash flow, you need to account for it. Otherwise, you don’t have to.