# Finding the future value when investing a single sum and then an annuity

If I invest amount A today for N years and then invest amount B every year for the same N years (as an ordinary annuity), then to find the future value at the end of N years should I treat the first investment as a single lump sum investment, calculate its future value, and then calculate the future value of the annuity separately?

• Why not treat this as two completely separate problems and add the two values? – RonJohn Nov 18 '19 at 14:23
• That's what I was thinking I needed to do; find the two future values (one from the first sum and then the annuity's) and combine them. This is what you're saying, yes? – user91685 Nov 18 '19 at 14:34
• "This is what you're saying, yes?" Yup. – RonJohn Nov 18 '19 at 14:40

I use GNU Octave for problems like these:

``````octave:1> A=1000
A =  1000
octave:2> N=10
N =  10
octave:3> B=200
B =  200
octave:4> k=1.08
k =  1.0800
octave:5> A*k^N + sum(B*k.^[1:N])
ans =  5288.0
``````

Here I invested 1000 EUR for 10 years at rate of 8% = 0.08, and 200 EUR every year for 10 years at the same rate. At this rate, it will be 5288.0 EUR. (To find the missing decimal, use `format long` to get a more accurate answer.)