# Future wealth calculation with investment

Task: The student is 25 years old now. He say, that next year his salary will be 15000€ per year. His salary will grow +5% each year until his pension (when he will be 65 years old). Calculate how much money this person will save if each year he will save 5% from his salary and will invest it with 4% yield. The answer: 167936 Euros. So, it's quite obvious that this person will save money during 40 years. I believe that in this calculation could use this formula: $$s_{n,i}=15000\frac{(1+i)^n-1}{i}$$, where $$s_{n,i}$$ - future wealth, n=40 (years), i=5%. But in this way I will find how much he will have at all, but don't know how to use 4% etc. in this case.