Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 36 ยท Saving and Interest

Compound Interest

See how interest on interest makes savings grow faster than simple interest, learn A = P(1 + r/n)^(nt), and explore growth with runnable examples.

With simple interest you earn the same amount every year. With compound interest, the interest you earn is added to the balance, and next period you earn interest on the larger balance too. It is "interest on interest", and over long periods it makes a dramatic difference.

A first example

Deposit 1,000 at 4% per year, compounded yearly.

Year Start balance Interest (4%) End balance
1 1,000.00 40.00 1,040.00
2 1,040.00 41.60 1,081.60
3 1,081.60 43.26 1,124.86

After three years you have 1,124.86 compared with 1,120 under simple interest. The gap looks small now, but it widens every year.

The formula

A = P ร— (1 + r/n)^(n ร— t)

  • P: principal
  • r: annual rate as a decimal
  • n: number of times interest is compounded per year (1 = yearly, 4 = quarterly, 12 = monthly, 365 = daily)
  • t: years
  • A: final amount

For yearly compounding (n = 1) it becomes A = P ร— (1 + r)^t. Check: 1,000 ร— 1.04ยณ = 1,124.864, which rounds to 1,124.86.

Python 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.

How often does it compound?

More frequent compounding gives slightly more, because interest starts earning interest sooner. Take 1,000 at 6% for 1 year:

Compounding n Result
Yearly 1 1,060.00
Quarterly 4 1,061.36
Monthly 12 1,061.68
Daily 365 1,061.83

The gains flatten as n grows, so the rate and the time matter far more than the compounding frequency.

The annual percentage yield (APY) or effective annual rate (EAR) is the yearly growth including compounding. For 6% compounded monthly it is about 6.17%. When comparing savings accounts, compare APY (or the equivalent figure used in your country), not just the stated rate.

Python Compounding frequency and effective rate

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.

Time is the big lever

Compound growth is slow at first and then speeds up. Starting early matters more than saving a large amount later. Suppose Ana saves 100 a month from age 20 to 30 and then stops, while Ben saves 100 a month from age 30 to 60. At the same return, Ana ends up with almost as much as Ben, even though she paid in only a third as much, because her money had 30 years to compound. (The code below uses an invented 6% yearly return; real returns vary and are never guaranteed.)

Python Early start versus late start

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 dark side

Compounding works against you when you owe money. Credit card debt with a 20% yearly rate grows the same way, and the balance can balloon if you make only small payments. Compound interest is a force: it builds wealth for savers and increases debt for borrowers.

flowchart LR
  A["Balance"] --> B["Interest added"]
  B --> C["Bigger balance"]
  C --> B

Interest on a growing balance makes growth speed up.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. How does compound interest differ from simple interest?

    Compounding adds interest to the balance, so later interest is calculated on more.
  2. 2. Using A = P(1 + r)^t, what is 500 at 10% for 2 years, compounded yearly?

    500 ร— 1.1ยฒ = 500 ร— 1.21 = 605.
  3. 3. Which has the biggest effect on long-term compound growth?

    More time means more compounding periods; rate and time matter much more than frequency.
  4. 4. Why should you compare APY (or EAR) rather than the stated rate?

    APY shows what you really earn in a year including compounding.

Summary

  • Compound interest is interest on interest: A = P(1 + r/n)^(nt).
  • More frequent compounding adds a little; rate and time add a lot.
  • Compare accounts by APY or effective annual rate.
  • Start early: time is the most powerful ingredient.
  • Compounding also makes debts grow, so pay high-interest debt quickly.

Next: The Rule of 72 and Inflation