If P is the principal, r is the annual rate, n is the number of times compounded per year, and t is years:
Compound interest
A = P(1 + r/n)^(nt)
Why?
Each compounding period multiplies by (1 + r/n). After n·t periods, you've multiplied that many times.
As n → ∞ (continuous compounding), A → P·e^(rt).