Sub topic 2
A Quick Refresher on Compounding
This chapter assumes you are comfortable with percentages and annual rates of return, and that you can read short Python programs. Compounding is the mechanism behind every fee calculation later in this tutorial. The goal here is a working model of it, plus the usual mistakes people make when they apply it.
What compounding means
Compounding means that each period's growth is calculated on the original amount plus all growth earned so far. Gains earn their own gains.
Take $10,000 growing at 7% a year:
- After year 1 you have $10,700. The gain is $700.
- In year 2 the 7% applies to $10,700, so the gain is $749, not $700.
- In year 3 it applies to $11,449, and the gain is about $801.
The yearly gain rises every year even though the rate never changes. The contrast is simple growth, where the gain is always calculated on the starting amount only.
The core formula
For a single lump sum with no further deposits:
future value = initial * (1 + r) ** n
Here r is the annual rate as a decimal (0.07 for 7%) and n is the number of years. The exponent is the important part. Growth is multiplicative, so time acts on the result far more strongly than the rate does.
The following program compares simple and compound growth for the same $10,000 at 7%.
principal = 10_000
rate = 0.07
for years in (10, 20, 30):
simple = principal * (1 + rate * years)
compound = principal * (1 + rate) ** years
print(f"{years:>2} years: simple {simple:>9,.0f} compound {compound:>9,.0f}")The results are:
| Years | Simple growth | Compound growth |
|---|---|---|
| 10 | $17,000 | $19,672 |
| 20 | $24,000 | $38,697 |
| 30 | $31,000 | $76,123 |
Simple growth adds the same $700 every year. Compound growth adds more each year, so the gap widens. By year 30, about $45,000 of the compound result comes from growth on earlier growth.
The curve is the point. Most of the final balance arrives in the last decade. Anything that reduces the rate early, such as a fee, has its effect multiplied across every year that follows.
Time matters more than it feels like it should
Growth is exponential, so each extra decade multiplies the balance by a similar factor. At 7%, every 10 years multiplies your money by about 1.97. The first 10 years add $9,672 to the $10,000. The last 10 years add $37,426.
This has two consequences for fees:
- A fee charged in year 1 costs far more than the same dollar amount charged in year 29. The year-1 dollar would have compounded for decades.
- Fees cannot be judged by looking at one year. A cost that looks trivial in the first statement can grow into a large share of the final balance.
The rule of 72
The rule of 72 estimates how long money takes to double. Divide 72 by the annual percentage rate.
| Annual return | Rule of 72 estimate | Exact doubling time |
|---|---|---|
| 3% | 24 years | 23.4 years |
| 5% | 14.4 years | 14.2 years |
| 6% | 12 years | 11.9 years |
| 7% | 10.3 years | 10.2 years |
| 10% | 7.2 years | 7.3 years |
The rule is accurate enough for rates between about 2% and 12%. It gives you a quick way to feel what a one-point change does. At 7%, money doubles in about 10 years. At 6%, it takes about 12. Over 30 years that is three doublings against two and a half.
Compounding with regular contributions
Most savers keep adding money. Each contribution starts its own compounding clock, so the earliest deposits do the most work.
If you deposit a fixed amount at the end of each year, the balance after n years is:
future value = contribution * ((1 + r) ** n - 1) / r
This program calculates it two ways, by looping year by year and by using the formula, to show they agree.
def future_value_loop(annual_contribution, rate, years):
balance = 0.0
for _ in range(years):
balance = balance * (1 + rate) + annual_contribution
return balance
def future_value_formula(annual_contribution, rate, years):
return annual_contribution * ((1 + rate) ** years - 1) / rate
loop_result = future_value_loop(6_000, 0.07, 30)
formula_result = future_value_formula(6_000, 0.07, 30)
print(f"Loop: {loop_result:,.0f}")
print(f"Formula: {formula_result:,.0f}")
print(f"Deposited: {6_000 * 30:,.0f}")Both methods print 566,765. You deposited $180,000, so about $387,000 of the balance is growth. That is roughly two thirds of the final amount, and it is the part that fees erode.
The loop version is the one to remember. It mirrors how an account actually works: grow the balance by the year's return, then add the deposit. The next chapters reuse this loop and subtract the expense ratio from the rate.
Why this matters for fees
A fund's expense ratio is deducted from the fund's assets, so it lowers the return you receive. A simple model subtracts it from the gross return:
net return = gross return - expense ratio
This is a close approximation, and it is the model used for the examples in this tutorial. Compare a 7% gross return with a 1-point fee against the same return with almost no fee:
- At 7.0% for 30 years, $10,000 becomes $76,123.
- At 6.0% for 30 years, $10,000 becomes $57,435.
A fee of one percentage point removes about a quarter of the final balance. The fee is only one seventh of the return, but it takes a quarter of the outcome because it acts on the rate inside the exponent. The next chapters work through this in detail.
Common errors
Averaging returns instead of compounding them
Yearly returns do not combine by simple averaging. Gains and losses multiply. A fall of 50% followed by a gain of 50% does not return you to where you started. It leaves you at 75% of the original amount.
The right measure of a multi-year return is the geometric average, also called the compound annual growth rate.
returns = [0.30, -0.20, 0.10, 0.15, -0.05]
growth = 1.0
for r in returns:
growth *= 1 + r
arithmetic = sum(returns) / len(returns)
geometric = growth ** (1 / len(returns)) - 1
print(f"Arithmetic average: {arithmetic:.2%}")
print(f"Geometric average: {geometric:.2%}")
print(f"$10,000 becomes: {10_000 * growth:,.0f}")The arithmetic average is 6.00%. The geometric average is 4.56%, and $10,000 becomes $12,498. If you project the future with 6.00% you will overestimate. The gap between the two averages widens as returns become more volatile.
Treating projected returns as certain
The 7% used throughout this tutorial is an assumption chosen to make the arithmetic clear. Actual stock returns vary a great deal from year to year and from decade to decade. Fees, however, are close to certain. That is why they are worth examining even though future returns are not known.
Ignoring inflation
The $76,123 figure is in future dollars. If inflation averages 3% a year, prices rise by a factor of about 2.43 over 30 years. In today's purchasing power, the balance is roughly $31,400. The real return is about 3.9%, from (1.07 / 1.03) - 1. Fee comparisons still hold in real terms, but the absolute amounts look smaller.
Mixing up compounding frequency
A rate of 7% compounded monthly is not the same as 7% compounded yearly. Monthly compounding of a 7% nominal rate gives about $81,100 after 30 years from $10,000, against $76,123 with annual compounding. This tutorial uses annual compounding everywhere so that results are comparable. A fund's return is not an interest rate in the strict sense, so treat the annual model as a simplification.
Confusing percentage points and percent
Moving from a 7% to a 6% return is a drop of one percentage point. It is also a drop of about 14% in the return itself. Fee discussions mix the two senses constantly, so check which one is meant.
Summary of the working model
- Final value depends on
(1 + r) ** n, so both rate and time matter, and time often matters more. - Most of the growth comes late, so early costs and early contributions have the largest effect.
- Use the geometric average, not the arithmetic average, for multi-year returns.
- Subtracting a fee from the rate changes the exponent's base, which is why small percentages become large dollar amounts.
Exercise
Using the rule of 72, roughly how many years does it take for money to double at 4% a year? Then use the formula initial * (1 + r) ** n to check whether $10,000 at 4% has more than doubled after 18 years.
Show answer
The rule of 72 gives 72 / 4 = 18 years. The formula gives 10,000 1.04 * 18, which is about $20,258. That is just over double, so the estimate is close. The exact doubling time is about 17.7 years.
Exercise
An investment returns +40% in year 1 and -40% in year 2. What is the arithmetic average return, and what is the actual total change in value?
Show answer
The arithmetic average is (40% + (-40%)) / 2 = 0%. The actual change is 1.40 * 0.60 = 0.84, so the investment ends 16% lower than it started. The geometric average is about -8.3% a year.
Exercise
You deposit $6,000 at the end of each year for 30 years at a 7% annual return, with no initial balance. Roughly how much of the final balance is your own deposits, and how much is growth?
Show answer
The final balance is about $566,765. Your deposits total 6,000 * 30 = $180,000, so about $386,765 (roughly 68%) is growth.