I need a formula to calculate the appreciation of my pension fund where I have made an initial investment and then additional investments at later times. For example, I start with $10,000 which after five years appreciates to $14,000, a 40% gain. I then invest another $10,000 to make my holding worth $24,000 and after a further five years it appreciates to $36,000, a further 50% gain. If I had not added the second investment after five years my $14,000 would have appreciated to $21,000 after the second five year period, an overall gain over ten years of 110%. But I need to know how I reach that conclusion by using the two separate figures of 40% and 50% gains. Also, is there a way to continue building the formula to make it account for 3rd, 4th, 5th… amounts that I invest?