XIRR: annual rate of return calculator

A few days ago, I was checking my Fidelity 401(k) account and was surprised by following statement:

The total money I invested into the account was 10729.32 + 5364.66 = 16093.98. The net present value of the account was 17107.33. Fidelity's calculator showed my rate of return as -24.4%. Without a doubt, that is plain wrong. So I had to write my own calculator after many futile attempts to find an online one that I could trust.

If you have a 401(k) with Fidelity, and are using a modern browser such as Chrome 7 or Firefox 3.6, you can use the calculator below to calculate your annual rate of return. Simply download your transaction history as a CSV file, and input it together with total value of your account as of today. The rate of return calculation that this calculator uses is described at http://www.gummy-stuff.org/Rate-of-Return.htm. The XIRR function in Excel, if used properly, should give the same answer as this calculator.

There are a few assumptions you should be aware of before using this calculator. Basically we assume that if you sell any assets in the account, the money coming from the sale is re-invested into the account. The program only considers those rows in your CSV file that are marked as CONTRIBUTION, while calculating the rate of return. It skips all other rows. If you are making withdrawals/distributions from your account, these withdrawals need to appear as negative CONTRIBUTIONs in your CSV file, otherwise your rate of return won't be accurate. If you open the CSV file in a text editor, it should look something like this:

Date Range,10/01/2007 - 09/16/2009,,,
Date,Investment,Transaction Type,Amount,Shares/Unit
10/31/2007,VANG SM GR IDX INST,CONTRIBUTION,"63","2.91"
10/31/2007,VANG INST INDEX PLUS,CONTRIBUTION,"63","0.444"
10/31/2007,VANG GRTH INDEX INST,CONTRIBUTION,"63","1.831"

This is the format the calculator expects. It only uses the first, third, and fourth columns of the file in the calculation. Submit any questions, comments, or bug reports here.

Legal Disclaimer: This software is provided "AS IS" without any warranties, express or implied. The author will not be responsible for any damages arising from the use of this software.

Select CSV file containing your contributions

Enter total value of the account as of today (e.g., 10000):

Tweet