How compound interest works

The formula, a worked example, and why the compounding frequency matters less than time.

•

Published on

•

How compound interest works
Do not index
Do not index
Compound interest is interest earned on interest. Each period, the interest you earn is added to the balance, and the next period's interest is calculated on that larger balance. Over short periods the difference from simple interest is small. Over decades it is most of the result.

The formula

  • A is the final amount.
  • P is the starting amount, the principal.
  • r is the yearly interest rate as a decimal, so 7% is 0.07.
  • n is how many times a year interest is added.
  • t is the number of years.
Simple interest has no compounding, so its formula is just .

A worked example

Take $1,000 at 7% a year, compounded once a year.
Years
Simple interest
Compound interest
0
$1,000
$1,000
10
$1,700
$1,967
20
$2,400
$3,870
30
$3,100
$7,612
$1,000 at 7% a year. Simple interest grows in a straight line; compound interest curves upward.
$1,000 at 7% a year. Simple interest grows in a straight line; compound interest curves upward.
After 30 years, simple interest has added $2,100. Compounding has added $6,612, more than three times as much.
💡
Time does more than the rate. Starting ten years earlier at 7% roughly doubles the final amount, because the money gets one more doubling.

How often interest is added

Once a year
$1,000 at 7% for 30 years becomes $7,612.
Every month
The same money becomes $8,116. Daily compounding gives $8,165, barely more.
More frequent compounding helps, but the gains shrink fast. Going from yearly to monthly is worth about 7% more over 30 years. Going from monthly to daily is worth less than 1%.

The rule of 72

To estimate how long money takes to double, divide 72 by the interest rate in percent. At 7%, that is about 10.3 years. The exact answer is 10.2 years, so the shortcut is close enough for planning.
The shortcut works best for rates between about 6% and 10%.
Why 72?
The exact doubling time is ln(2) divided by ln(1 + r). For small rates, ln(1 + r) is close to r, and ln(2) is about 0.693, which gives 69.3 divided by the rate in percent. People use 72 instead because it divides evenly by 2, 3, 4, 6, 8, 9 and 12, and because it is slightly more accurate for the rates most people care about.

Try it yourself

def compound(principal, rate, years, times_per_year=1):
    return principal * (1 + rate / times_per_year) ** (times_per_year * years)

print(round(compound(1000, 0.07, 30), 2))      # 7612.26
print(round(compound(1000, 0.07, 30, 12), 2))  # 8116.5
  1. Pick a starting amount and a rate.
  1. Run the function for 10, 20 and 30 years.
  1. Compare the results with the simple-interest line.

A short checklist

Know the rate as a yearly figure
Check how often interest is added
Start as early as you can
This post explains the arithmetic. It isn't financial advice.