Let's assume that a 6 years old little Bella has saved $500.00 dollars from her allowances. Then Mateus, her older brother, decides to make a fixed deposit at the local Bank who promised to pay 5% annual interest rate in return, compounded monthly.
Little Bella's Father likes the idea so He decides to add periodic monthly payments of 100.00 dollars, made at the end of each month, to the savings account. If Mateus had to leave that money at the Bank for the next 13 years, at the time Bella is 19 years old, they would have saved about $22,867.42 dollars.
The formula for Compound Interest Calculator with Additional Deposits is a combination of: Compound Interest Formula " P(1+r/n)^(nt) " and Future Value of Series Formula " PMT × (((1 + r/n)^(nt) - 1) ÷ (r/n)) ", as explained at The Calculator Site.
Please note that ^ means "to the power of", and if you were to use that code on the above formula, it should look as follows:
Compound Interest Formula
Future Value of Series Formula
A= PMT*((Math.pow((1+r/100/n),(n*t))-1)/(r/100/n)) =>> Assuming that deposits are made at the end of each period (month, year, etc).
A= PMT*((Math.pow((1+r/100/n),(n*t))-1)/(r/100/n))*(1+r/100/n) =>> Deposits made at the beggining of each period (month, year, etc).
A- the future value of the investment, including interest;
P = the principal investment amount (the initial deposit or loan amount);
PMT = periodic monthly payments;
r = the annual interest rate (decimal);
n = the number of times that interest is compounded per unit t;
t = the time the money is invested or borrowed for.
Please also note that I have divided r by a 100 so it may return the value (rate) in percentage.