Compound interest formula (annual)
A = P(1 + i)^n
where A = total/final amount
P = principal/initial/beginning amount
i = interest rate
n = number of years
OR if interest was calculated in different time periods such as monthly, semiannually, fortnightly, weekly, daily etc
A = P(1 + i/k)^n
where k = number of periods in that year
n = kt = number of periods * number of years
e.g. if interest was calculated monthly for 2 years
k would be 12 & n would be 12*2 = 24