if you are really set on doing this then the easiest way is to decide what index you will base a 'stock market return' on...say the S&P 500, and then download an .xls or .csv file that has the values on a monthly basis. These are easy to find, for example from this website:
http://datahub.io/dataset/standard-and-poors-500-shillerFrom there it is relatively easy to construct a column that shows what the % return was from some past date to the present and should allow you to enter the various amounts that you gave him and at which dates, and have it calculate the present value of that money based on the return from those dates. You could create a spreadsheet like this after downloading the seed data in maybe half an hour if you wanted to. To keep it up all you have to do is update the spreadsheet monthly with a new value for the S&P and it will automatically update.
However, I would echo the others that this isn't probably the best way to handle it. For one you started loaning him money at a time when hard interest rates were almost zero and the market has about doubled since 2010 so even if you do get him to pay you double, he probably wont be a friend for long even if he agreed to it.
In this case your arrangement will work out to your huge advantage but just as easily could have been reversed. For that matter if he waits long enough with his repayment and you did not agree to set terms on repayment time, if i was him i would just wait until there is a market correction and then pay you back while the markets are down. Turnabout is fair play.
The easiest and perhaps most fair way to handle this is to just go by the 'historic market return' and have him pay you back at a 10-12% rate and agree on a repayment schedule. This is advantageous for both of you, this is a far better rate than you would likely have gotten by lending to anybody that wasn't a moron about the terms (with all due respect to your friend). He would have taken a cash advance on a low interest CC for the money and been better off than the terms you offered (in hindsight, as i mentioned it could have worked out great for him if the market had tanked).