The formula for compound interest is as follows: A = P (1 + r/n)^(nt)
A is the total money, P is the initial amount, r is the annual interest rate, n is the number of times a year the interest is compounded, and t is the years for which the money is invested.