# Find ending balance given return rate and amount added each year

If I have an investment that grows 10% per year, and every year I add an amount, is there a formula that can be used to find my ending balance after n years?

The following demonstrates this:

``````year 0: B = s*1.1^0 + a*1.1^0 = s + a
year 1: B = s*1.1 + a*1.1 + a
year 2: B = s*1.1^2 + a*1.1^2 + a*1.1 + a
year 3: B = s*1.1^3 + a*1.1^3 + a*1.1^2 + a*1.1 + a
year n: B = s*1.1^n + a*1.1^n + a*1.1^(n-1)... + a

where
B is the balance at the start of the year
s is the starting amount
a is the amount added each year
``````

You could use

``````B = ((a + a*r + r*s)*(1 + r)^n - a)/r
``````

For example, the OP's calculation with `s = 1000` and `a = 100`

``````year 3: B = s*1.1^3 + a*1.1^3 + a*1.1^2 + a*1.1 + a = 1795.10
``````

Using the formula arrives at the same result

``````n = 3
r = 0.10

B = ((a + a*r + r*s)*(1 + r)^n - a)/r = 1795.10
``````

Derivation

The OP requires the sum of the compounding amounts, plus `s` with interest, plus `a` Replacing the summation with the closed-form expression

from Wikipedia Geometric series formulae (which confusingly also uses `r`)   From Investopaedia

Compound interest = [S (1 + i) ^ n] – S

• S = Principal
• n = number of years
• i = interest rate