Calculator of Alexandria

Compound interest calculator

See how savings grow with compound interest and regular monthly deposits, with a year-by-year table and the derivation of the formula.

Compounded

Added at the end of each month. Use 0 for a one-off deposit.

Final balanceAA
Interest earned
Total deposited

Formula

A=P(1+rn)ntA = P\left(1 + \frac{r}{n}\right)^{nt}
How it's derived

The formula

A=P(1+rn)ntA = P\left(1 + \frac{r}{n}\right)^{nt}

PP is the starting amount, rr the annual interest rate as a decimal, nn the number of times interest is added per year, tt the number of years and AA the final balance.

Where it comes from

One period. With an annual rate rr compounded nn times a year, each period adds r/nr/n of the current balance. A balance BB becomes

B+B⋅rn=B(1+rn)B + B\cdot\frac{r}{n} = B\left(1 + \frac{r}{n}\right)

Many periods. Interest earned in one period earns interest itself in the next, so each period multiplies the balance by the same factor. After ntnt periods:

A=P(1+rn)ntA = P\left(1 + \frac{r}{n}\right)^{nt}

Adding monthly deposits. Each deposit DD grows for however many months remain. First find the monthly growth factor that matches the compounding schedule, since a year of compounding must give the same result either way:

(1+i)12=(1+rn)n⇒i=(1+rn)n/12−1(1 + i)^{12} = \left(1 + \frac{r}{n}\right)^{n} \quad\Rightarrow\quad i = \left(1 + \frac{r}{n}\right)^{n/12} - 1

A deposit made at the end of month kk grows for m−km - k months, so after mm months the deposits are worth

D[(1+i)m−1+(1+i)m−2+⋯+1]D\left[(1+i)^{m-1} + (1+i)^{m-2} + \dots + 1\right]

That is a geometric series. Multiplying it by (1+i)(1+i) and subtracting the original makes every middle term cancel, leaving

D⋅(1+i)m−1iD \cdot \frac{(1+i)^m - 1}{i}

So the full balance, which is what the calculator computes, is

A=P(1+i)m+D⋅(1+i)m−1iA = P(1+i)^m + D \cdot \frac{(1+i)^m - 1}{i}

The rule of 72

How long does money take to double? Set A=2PA = 2P with yearly compounding: (1+r)t=2(1 + r)^t = 2, so t=ln⁡2/ln⁡(1+r)t = \ln 2 / \ln(1 + r). For small rr, ln⁡(1+r)≈r\ln(1+r) \approx r, giving t≈0.693/rt \approx 0.693/r. Bankers round 69.3 up to 72 because 72 divides evenly by 2, 3, 4, 6, 8, 9 and 12, and the rounding also corrects for the approximation at typical rates. At 6%, money doubles in about 72/6=1272/6 = 12 years.

Worked example

$10,000 at 5% compounded monthly for 10 years with no deposits:

A=10,000(1+0.0512)120=16,470.09A = 10{,}000\left(1 + \frac{0.05}{12}\right)^{120} = 16{,}470.09

Watch out for

  • Rates here are nominal annual rates. A bank’s APY already includes compounding, so enter it with yearly compounding.
  • This ignores inflation, taxes and fees, which can matter more than the compounding frequency.

Last checked