Compound interest is interest earned not just on the initial amount (principal), but also on the accumulated interest.
The formula for calculating compound interest is:
A = P (1 + r/n)^(nt)
Where:
Example 1: You invest $1000 at an annual interest rate of 6% compounded annually for 5 years.
A = 1000 (1 + 0.06/1)^(1*5) = 1000 (1.06)^5 = $1338.22
Example 2: You invest $5000 at an annual interest rate of 8% compounded monthly for 3 years.
A = 5000 (1 + 0.08/12)^(12*3) = 5000 (1 + 0.006667)^(36) = $5769.68