In case Carla deposits every year 3000$. Then pretty much, just the depostis will be 120.000$ during the 40years. If the average earning 8% per year, the first deposit has 40times this earning, the second 39times and so on...so it will be 3000 * (1,08 + 1,08^2 + 1,08^3 + ... + 1,08^40) and that is 839.343,12$.