Skip to content
Hands-on Mentor
ENTR
Back to blog

Simple vs compound interest: formulas, examples and the rule of 72

Simple interest grows on the original amount only. Compound interest also earns interest on past interest. See formulas, a Python example and the rule of 72.

4 min read

With simple interest, you earn interest only on the original amount, called the principal. With compound interest, the interest you earn is added to the principal, and the next period's interest is calculated on that larger amount. So you earn interest on your interest. In a short time the difference is small. Over many years, compound interest grows much faster than simple interest. The same math applies to debt.

What is the compound interest formula?

Here are both formulas side by side:

  • Simple interest: final amount = principal × (1 + rate × years)
  • Compound interest: final amount = principal × (1 + rate) ^ years

The rate is written as a decimal: 6% is 0.06.

What are some compound interest examples?

Take $1,000 and a yearly rate of 6%. The rate is a made-up example, chosen only to show the calculation.

principal = 1000
rate = 0.06

for years in [1, 2, 3, 5, 10, 20, 30]:
    simple = principal * (1 + rate * years)
    compound = principal * (1 + rate) ** years
    print(f"Year {years:>2}  simple: ${simple:>8,.2f}  compound: ${compound:>9,.2f}")

Running it gives this table:

YearSimple interestCompound interest
1$1,060.00$1,060.00
2$1,120.00$1,123.60
3$1,180.00$1,191.02
5$1,300.00$1,338.23
10$1,600.00$1,790.85
20$2,200.00$3,207.14
30$2,800.00$5,743.49

In year 1 the two are the same. In year 10 the compound amount is $190.85 higher. In year 30 it is more than twice the simple amount.

Why is the difference so big?

With simple interest, you add the same amount every year: $1,000 × 0.06 = $60. Growth is linear.

With compound interest, year 2 pays interest on $1,060, which is $63.60. Year 3 pays interest on $1,123.60, which is $67.42. The amount you add each year is larger than the year before. Growth is exponential.

How often is interest added?

Compounding needs the interest to be added to the balance. If you take the interest out and spend it every time, you are back to simple interest.

The number of times per year that interest is added also matters. A rate of 6% a year, added every month, is 0.5% each month:

once_a_year = principal * (1 + 0.06)
every_month = principal * (1 + 0.06 / 12) ** 12

print(f"Once a year: ${once_a_year:,.2f}")
print(f"Every month: ${every_month:,.2f}")

The results are $1,060.00 and $1,061.68. Two offers that both say "6% a year" are not the same if one adds interest monthly. When you compare offers, check how often interest is added. Taxes on interest income also differ by country, so check the rules where you live.

What is the rule of 72?

The rule of 72 estimates how many years it takes to double an amount with compound interest. Divide 72 by the yearly rate as a percentage:

  • 6% gives 72 / 6 = 12 years
  • 9% gives 72 / 9 = 8 years

You can check the first one:

import math

years_to_double = math.log(2) / math.log(1.06)
print(round(years_to_double, 2))

The exact answer is 11.9 years, so the shortcut is close. It works best for rates between about 4% and 15%. For a rate of 30%, it gives 2.4 years, while the exact answer is 2.64.

How does it work for saving and for debt?

The math works in both directions:

  • Saving: when you leave the interest in the account, time works for you.
  • Debt: when you do not pay a debt, interest is added to it and then earns more interest. The longer the debt stays, the more it costs.

This is why delaying a debt payment is expensive.

Does inflation matter?

Yes. If you have $5,743.49 after 30 years, it will not buy what $5,743.49 buys today, because prices rise over time. To see what interest really gives you, compare the growth with the rise in prices.

What mistakes should you avoid?

  • Treating compound interest like simple interest. Over 30 years at 6%, $1,000 becomes $5,743.49. Simple interest would give only $2,800.00.
  • Mixing up periods. A monthly rate of 1% is not a yearly rate of 12%. Compounded, it is about 12.68%.
  • Ignoring inflation. Growth in dollars is not the same as growth in what you can buy.

What to read next

Two lessons in the Economics and Finance course cover this topic: [Simple interest](/learn/economics-finance/simple-interest) and [Compound interest](/learn/economics-finance/compound-interest). See the full [course page](/courses/economics-finance) for more. If you want to write loops like the one above, read [Python for loops](/blog/python-for-loop), and for the number formatting, see [Python f-strings](/blog/python-f-strings).

*This article is not investment advice.*

  • #personal finance
  • #interest
  • #compound interest
  • #python
All posts