Compound Interest Formula
You might also be interested in reading about:
Simple interest is interest on principal only. Compound interest is interest that is calculated on the principal amount together with accumulated interest.
Suppose you invest $\,\$1000\,$ at $\,5\%\,$ simple annual interest. One year later, you'll have: $$\cssId{s8}{\$1000 + (5\%)(\$1000) = \$1050}$$
Wouldn't it be better to add in $\,\frac{1}{12}\,$ of your annual interest after the first month, giving a slightly greater amount to earn interest for the next month?
Or, why not add in $\,\frac{1}{365}\,$ of your annual interest after the first day, giving a slightly greater amount to earn interest for the next day?
When you add in interest at regular intervals, this is called compound interest. With compound interest, you are earning interest on your interest, not only on your original principal!
The Compound Interest Formula is a nonrecursive formula that is convenient for working with compound interest situations, and is the subject of this section.
Before deriving the compound interest formula, let's go back to that $\,\$1000\,$ with $\,5\%\,$ interest, and see how much benefit is gained from:
 compounding monthly (adding in interest each month): there are $\,12\,$ months in one year, so the monthly interest rate is $\,\frac{1}{12}(0.05)=\frac{0.05}{12}$
 compounding weekly (adding in interest each week): there are $\,52\,$ weeks in one year, so the weekly interest rate is $\,\frac{1}{52}(0.05)=\frac{0.05}{52}$
 compounding daily (adding in interest each day): there are $\,365\,$ days in one year, so the daily interest rate is $\,\frac{1}{365}(0.05)=\frac{0.05}{365}$
Effects of Compounding
$\$1000\,$ initial deposit, $\,5\%\,$ interest rate
(All units are dollars, rounded to the nearest cent.)
Interest is added in at the end of each compounding period.
(Please make screen as wide as possible for best viewing.)
time 
$1\,$ day 
$2\,$ days 
$1\,$ week 
$2\,$ weeks 
$1\,$ month 
$2\,$ months 
$6\,$ months 
$1\,$ year 
$2\,$ years 
$10\,$ years 
compounding annually 
$1000$ 
$1000$ 
$1000$ 
$1000$ 
$1000$ 
$1000$ 
$1000$ 
$\begin{gather} 1000 + 0.05(1000)\cr = 1050.00\end{gather}$ 
$\begin{gather} 1050 + 0.05(1050)\cr = 1102.50\end{gather}$ 
$1628.89$ 
compounding monthly 
$1000$ 
$1000$ 
$1000$ 
$1000$ 
$\begin{gather} 1000+\frac{0.05}{12}(1000)\cr =1004.17\end{gather}$ 
$\begin{gather} 1004.17+\frac{0.05}{12}(1004.17)\cr =1008.35\end{gather}$ 
$1025.26$ 
$1051.16$ 
$1104.94$ 
$1647.01$ 
compounding weekly 
$1000$ 
$1000$ 
$\begin{gather} 1000+\frac{0.05}{52}(1000)\cr =1000.96\end{gather}$ 
$\begin{gather} 1000.96+\frac{0.05}{52}(1000.96)\cr =1001.92\end{gather}$ 
$1004.17$ 
$1008.36$ 
$1025.30$ 
$1051.25$ 
$1105.12$ 
$1648.33$ 
compounding daily 
$\begin{gather} 1000+\frac{0.05}{365}(1000)\cr =1000.14\end{gather}$ 
$\begin{gather} 1000.14+\frac{0.05}{365}(1000.14)\cr =1000.28\end{gather}$ 
$1000.96$ 
$1001.92$ 
$1004.18$ 
$1008.37$ 
$1025.31$ 
$1051.27$ 
$1105.16$ 
$1648.66$ 
The added savings from earning interest on interest is perhaps not quite as much as you'd hope. For example, in one year you'd earn an additional $$\cssId{s42}{\$1051.27  \$1050 = \$1.27}$$ over simple annual interest, by adding in interest daily. In ten years, you'd earn an additional $$\cssId{s46}{\$1648.66  \$1628.89 = \$19.77}$$ by compounding daily versus annually. As the length of time and the amount of money invested increase, though, the savings do go up—and every little bit helps!
Derivation of the Compound Interest Formula
The compound interest formula results from using variables to represent a general investing situation, writing down several computations, and seeing a pattern emerge.
In a nutshell, you're going to invest $\,P\,$ dollars at annual interest rate $\,r\,,$ add in interest $\,n\,$ times per year, and see how much you have after $\,t\,$ years.
Here are the details:
 You are investing $\,P\,$ dollars. You will start the clock at the moment you make this initial investment; i.e., let $\,t=0\,$ correspond to the initial investment time.
 Let $\,r\,$ denote the (simple) annual interest rate for this investment. Express $\,r\,$ as a decimal. For example, $\,5\%\,$ corresponds to $\,r=0.05\,.$

Assume that interest is added
in at regular intervals, $\,n\,$ times per year.
For monthly compounding, $\,n=12\,$.
For weekly compounding, $\,n=52\,$.
For daily compounding, $\,n=365\,$.Thus, $\,n\,$ represents the number of compounding periods per year.
 Let $\,A\,$ represent the total amount of money (principal plus interest) after $\,t\,$ years.
The table below shows the accumulations after various numbers of compounding periods:
(Please make screen as wide as possible for best viewing.)
after this time... 
$1\,$ compounding period 
$2\,$ compounding periods 
$3\,$ compounding periods 
... 
$\begin{gather} n \text{ compounding periods}\cr = 1 \text{ year}\end{gather}$ 
$\begin{gather} 2n \text{ compounding periods}\cr = 2 \text{ years}\end{gather}$ 
$\begin{gather} tn \text{ compounding periods}\cr = t \text{ years}\end{gather}$ 
you'll have this much money... 
$\begin{align} &\cssId{s77}{P+\frac{r}{n}\cdot P}\cr\cr &\quad \cssId{s78}{=P(1+\frac{r}{n})}\cr\cr &\quad \cssId{s79}{=P{(1+\frac{r}{n})}^1} \end{align}$ 
$\begin{align} &\cssId{s82}{P(1+\frac{r}{n})+\frac{r}{n}\cdot P(1+\frac{r}{n})}\cr\cr &\quad \cssId{s83}{=P(1+\frac{r}{n})(1+\frac{r}{n})}\cr\cr &\quad \cssId{s84}{=P{(1+\frac{r}{n})}^2}\end{align}$ 
$\begin{align} &\cssId{s87}{P{(1+\frac{r}{n})}^2+\frac{r}{n}\cdot P{(1+\frac{r}{n})}^2}\cr\cr &\quad \cssId{s88}{=P{(1+\frac{r}{n})}^2(1+\frac{r}{n})}\cr\cr &\quad \cssId{s89}{=P{(1+\frac{r}{n})}^3}\end{align}$ 
... 
$P{(1+\frac{r}{n})}^n$ 
$P{(1+\frac{r}{n})}^{2n}$ 
$\begin{align} \cssId{s98}{A}\ &\cssId{s99}{=P{(1+\frac{r}{n})}^{tn}}\cr\cr &\cssId{s100}{=P{(1+\frac{r}{n})}^{nt}}\end{align}$ 
Note: 
factor out $\,P\,$ 
factor out $\,P(1+\frac{r}{n})$ 
factor out $\,P{(1+\frac{r}{n})}^2$ 
... 
notice the emerging pattern 
The compound interest formula! 
Thus, we have:
The amount, $\,A\,$ (principal plus interest), that you have after $\,t\,$ years is given by the compound interest formula:
$$\cssId{s112}{A=P{(1+\frac{r}{n})}^{nt}}$$Using the Compound Interest Formula
If there were no compounding at all, then in one year the interest would be: $$\cssId{s122}{(3\%)(\$2500) = \$75} $$ Do this for $\,7\,$ years: $$\cssId{s124}{7(\$75) = \$525}$$ Put together the principal plus the interest: $$\cssId{s126}{\$2500 + \$525 = \$3025}$$
You'll do better than this by adding in interest at regular intervals, so you know you'll have more than $\,\$3025\,.$
Now, use the compound interest formula: $$ \begin{gather} \cssId{s130}{P=2500\,,\ \ r=0.03\,,\ \ n=365\,,\ \ t=7}\cr\cr \cssId{s131}{A} \cssId{s132}{=2500{\left(1+\frac{0.03}{365}\right)}^{(365\cdot 7)}} \cssId{s133}{=\ \$3084.17} \end{gather} $$
Compare with $\,\$3025\,$; believable!
If you want, you can do the computation up at WolframAlpha (cutandpaste):
2500(1 + 0.03/365)^(365*7)
(Notice that the exponent computation must be put inside parentheses, to get the correct order of operations.)
Concept Practice
For a simpler presentation, units are suppressed in the calculations, and shown only in the final answer.