Compound Interest Formula adding annual contributions I'd like to know the compound interest formula for the following scenario:
P = Initial Amount
i = yearly interest rate
A = yearly contribution or deposit added.
n = the deposits will be made for 10 consecutive years.
F = final amount obtained.
I start with an initial amount and an yearly interest rate applied will be applied to it. Then, every year a contribution/deposit is made at the end of the period, that is, after the interest is applied to the previous amount.  No withdrawals are made.
 A: The final value $F=F'+F''$ is the sum of two components:


*

*the initial deposit will produce after $n$ years at the interest rate $i$ the future value
$$F'=P(1+i)^n$$

*the periodic payments are an annuity-immediate (made at the end of each contribution period) the future value is
$$
F''=A\,s_{\overline{n}|i}=A\frac{(1+i)^n-1}{i}
$$
Thus, the future value $F$ is
$$
F=P(1+i)^n+A\frac{(1+i)^n-1}{i}=\left(P+\frac{A}{i}\right)(1+i)^n-\frac{A}{i}
$$
If the additional payments are made at the beginning of each period the annuity is an annuity due and the future value is obtained multiplying by $(1+i) $, that is
$$
F''=A\frac{(1+i)^n-1}{i}(1+i)
$$
and then 
$$
F=P(1+i)^n+A\frac{(1+i)^n-1}{i}(1+i) =\left(P+\frac{A}{d}\right)(1+i)^n-\frac{A}{d}
$$
where $ d=\frac{i}{1+i} $ is the discount rate.

A: See if this helps...
So year 1; I have my initial deposit of $P$.  First I need to compute the interest gained and then I have to add the new yearly contribution $A$.  So by year $1$ I have
$$F_1=P+Pi+A=P(1+i)+A$$
where $F_t$ is the total in the account after $t$ years.  Now that new amount will accrue yearly interest, and then you have to add $A$ to that...
$$F_2=[P(1+i)+A]+[P(1+i)+A]i+A=[P(1+i)+A](1+i)+A$$
$$=P(1+i)^2+A(1+i)+A$$
After year 3, doing the same calculation will yield for year 3
$$F_3=P(1+i)^3+A(1+i)^2+A(1+i)+A$$
$$=P(1+i)^3+A\sum_{k=0}^2(1+i)^k$$
Note that the sum is geometric and yields the formula
$$A\sum_{k=0}^2(1+i)^k=\frac{A(1+i)^3-A}{(1+i-1)}=\frac{A(1+i)^3-A}{i}$$
Thus we can extrapolate and see that for 10 years our formula is 
$$F_{10}=P(1+i)^{10}+\frac{A(1+i)^{10}-A}{i}$$
which can be reduced like @alexjo did in his using annuity formulas as
$$\left(P+\frac{A}{i}\right)(1+i)^{10}-\frac{A}{i}$$
