Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 · Exponential and Logarithmic Functions

Compound Interest and the Number e

Derive compound interest, discover the number e as a limit, and model continuous growth and decay with Pe^(rt), with runnable Python simulations.

When you deposit money in a savings account, the interest itself starts earning interest. This is compound interest, and it is the most common real-world exponential function. Asking "what if the bank compounded more and more often?" leads to one of the most important constants in mathematics, e, and to the natural logarithm. This lesson follows that path.

Simple versus compound interest

With simple interest at rate r per year, you earn P·r every year on the original amount P. After t years: A = P(1 + rt). That is linear growth.

With compound interest each year's interest joins the balance. At 5% per year starting from 1000:

  • After 1 year: 1000 × 1.05 = 1050
  • After 2 years: 1050 × 1.05 = 1102.50
  • After t years: 1000 × 1.05ᵗ

So the formula is exponential.

Compounding n times a year

If the annual rate is r and interest is added n times per year, each period gains r/n, and there are nt periods:

A = P (1 + r/n)^(nt)

For P = 1000, r = 6%, t = 10 years:

Compounding n Balance after 10 years
Yearly 1 1790.85
Monthly 12 1819.40
Daily 365 1822.03

More frequent compounding gives more money, but the gains shrink quickly.

Python A compound interest calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The number e

Let the annual rate be 100% (r = 1), start with 1, and compound n times a year for one year: (1 + 1/n)ⁿ.

n (1 + 1/n)ⁿ
1 2
2 2.25
10 2.5937...
100 2.7048...
10,000 2.7181...

The values do not blow up. They creep towards a limit called e:

e = lim (1 + 1/n)ⁿ as n → ∞ ≈ 2.718281828...

Like π, e is irrational and never ends. It is the natural base for exponential growth, which is why ln (the log base e) is called the natural logarithm. In calculus, eˣ is the one exponential whose rate of change equals its own value.

Python Watch (1 + 1/n)^n approach e

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Continuous compounding

Letting n → ∞ in A = P(1 + r/n)^(nt) gives the continuous compounding formula:

A = P·e^(rt)

For P = 1000, r = 6%, t = 10: A = 1000·e^0.6 ≈ 1822.12, just above daily compounding. This is the ceiling: no amount of extra compounding can beat it.

The same formula models any quantity growing at a rate proportional to its size: N(t) = N₀·e^(kt). If k > 0 it is growth; if k < 0 it is decay. Example: a sample decays with k = -0.05 per day starting from 80 g. After 10 days: 80·e^(-0.5) ≈ 48.5 g.

To find k from data, use the natural log. If a population goes from 500 to 800 in 4 hours: 800 = 500·e^(4k), so e^(4k) = 1.6, so k = ln(1.6)/4 ≈ 0.1175 per hour.

Python Fit a continuous growth rate and predict

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The doubling time is ln 2 / k and the half-life is ln 2 / |k|, no matter where you start.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the balance of 2000 at 4% compounded yearly for 3 years?

    2000 × 1.04³ = 2000 × 1.124864 = 2249.73.
  2. 2. What does (1 + 1/n)ⁿ approach as n grows without bound?

    The expression increases but converges to the constant e.
  3. 3. Which formula is continuous compounding?

    Continuous compounding is the limit of compounding n times per year as n → ∞, giving P e^(rt).
  4. 4. A quantity follows N = N₀e^(kt) with k < 0. What does it model?

    A negative k makes e^(kt) shrink as t increases, so the quantity decays.

Summary

  • Simple interest is linear; compound interest A = P(1 + r/n)^(nt) is exponential.
  • More frequent compounding helps, but with diminishing returns.
  • e = lim (1 + 1/n)ⁿ ≈ 2.71828; continuous growth is A = P e^(rt) and N = N₀ e^(kt).
  • Use natural logs to find rates and doubling times.

That completes this part of the course. Return to the Pre-Calculus track page for the remaining chapters.