Sub topic 7
How Money Grows: Compounding and Future Value
This chapter assumes you are comfortable with percentages and exponents and have a rough idea of what interest is. You do not need to know the annuity formula yet. It comes in a later chapter. Here you build the single-balance engine that the rest of the tutorial reuses: how one sum of money grows when its earnings are reinvested.
Why this step matters
Earlier chapters produced a required nest egg in future dollars. To turn that number into a monthly saving amount, you need to know how much a dollar saved today, or next month, will be worth on the retirement date. That value is its future value. The monthly target formula is built from it.
Simple interest versus compound interest
Simple interest pays a return only on the original amount. Compound interest pays a return on the original amount plus all earnings already added. Retirement accounts behave like compound interest, because dividends, interest, and price gains stay invested and earn further returns.
Take $10,000 at 6% per year for 30 years:
- Simple interest adds $600 each year, so the result is $10,000 + 30 × $600 = $28,000.
- Compound interest grows the balance by 6% of the current balance each year, so the result is about $57,435.
The gap of about $29,000 is the return earned on earlier returns.
The future value formula
For a lump sum, the future value (FV) is:
FV = PV × (1 + r)^n
- PV is the present value, the amount you have now.
- r is the rate per period.
- n is the number of periods.
The rate and the periods must use the same unit. With a yearly rate and a count of years, use yearly periods. With a monthly rate and a count of months, use monthly periods.
The table shows $10,000 at 6% compounded annually:
| Years | Balance | Multiple of the start |
|---|---|---|
| 10 | $17,908 | 1.79× |
| 20 | $32,071 | 3.21× |
| 30 | $57,435 | 5.74× |
| 40 | $102,857 | 10.29× |
The last ten years add more than $45,000, which is more than the first twenty years combined. Growth is exponential, so time at the end of the horizon counts for more than time at the start. This is why delaying saving costs more than most people expect.
Compounding frequency and monthly periods
Your contributions are monthly, so this tutorial uses a monthly rate. The usual shortcut divides the annual rate by 12:
rmonthly = annualrate / 12, n = years × 12
For $10,000 at a stated 6% annual rate over 30 years:
- Annual compounding gives 1.06^30 × $10,000 = $57,435.
- Monthly compounding gives 1.005^360 × $10,000 = $60,226.
The monthly version is higher because earnings begin to compound sooner. A stated rate of 6% compounded monthly is really an effective annual rate of 1.005^12 − 1 = 6.17%.
You must decide which meaning your return assumption has. If someone says "the market returns 6% a year," that usually means the balance grows by 6% over a year. In that case the matching monthly rate is the twelfth root:
rmonthly = (1 + annualeffective)^(1/12) − 1
For 6% this is 0.4868% per month, not 0.5%. With this rate, monthly compounding gives exactly the same $57,435 after 30 years.
Computing future value in code
The function below computes the future value of a lump sum for any compounding frequency. It also includes a helper for the effective-rate conversion and one for doubling time.
import math
def future_value(present, annual_rate, years, periods_per_year=12):
"""Future value of a single lump sum with periodic compounding."""
r = annual_rate / periods_per_year
n = years * periods_per_year
return present * (1 + r) ** n
def monthly_rate_from_effective(annual_effective):
"""Monthly rate that compounds to a given effective annual return."""
return (1 + annual_effective) ** (1 / 12) - 1
def doubling_time(annual_effective):
"""Years for a balance to double at an effective annual return."""
return math.log(2) / math.log(1 + annual_effective)
if __name__ == "__main__":
pv = 10_000
print(round(future_value(pv, 0.06, 30, periods_per_year=1), 2)) # 57434.91
print(round(future_value(pv, 0.06, 30, periods_per_year=12), 2)) # 60225.75
print(round(pv * math.exp(0.06 * 30), 2)) # 60496.47 (continuous)
r_m = monthly_rate_from_effective(0.06)
print(round(pv * (1 + r_m) ** 360, 2)) # 57434.91
print(round(doubling_time(0.06), 2)) # 11.9The continuous-compounding line shows the limit as the frequency grows without bound. Going from annual to monthly adds about $2,800 here, but going from monthly to continuous adds only about $270. Past monthly, extra frequency barely matters.
The rule of 72
A quick mental check for doubling time is 72 divided by the rate in percent. At 6%, 72 / 6 = 12 years, close to the exact 11.9. The rule works well between about 4% and 12%. It is useful for checking a result by eye, for example "at 6%, 30 years is between two and three doublings, so about 4× to 8×." The exact answer of 5.74× fits that range.
How sensitive is growth to the rate?
The rate sits in the base of the exponent, so a small change compounds heavily. For $10,000 over 30 years with annual compounding:
| Annual return | Balance | Multiple |
|---|---|---|
| 4% | $32,434 | 3.24× |
| 6% | $57,435 | 5.74× |
| 8% | $100,627 | 10.06× |
Two points of return changes the final balance by roughly 75% in one direction and 40% in the other. The later chapter on stress-testing builds on this. Because the target you compute depends on these assumptions, a single return figure should be treated as a plausible estimate, not a fact.
Nominal and real growth
All the numbers above are nominal: they count dollars with no adjustment for rising prices. A balance of $57,435 in 30 years will buy less than $57,435 does today. A real return is the nominal return after subtracting inflation, roughly. The next chapters decide which kind of return to use and keep the choice consistent with how spending is measured.
Edge cases to handle
- Zero return. With r = 0, (1 + r)^n equals 1, so FV = PV. The formula still works. Later formulas that divide by r need a special case for r = 0, as the
monthly_savingfunction in this tutorial does. - Negative returns. A loss of 20% followed by a gain of 20% does not return you to the start: 0.8 × 1.2 = 0.96. The formula with a single constant r hides this. Real markets vary from year to year, and the average of the returns is higher than the compound growth rate they produce.
- Fractional years. The formula accepts a non-integer n, which is convenient. For a horizon of 27.5 years with monthly compounding, use n = 330 months. Keep n an integer when you use the monthly simulation loops later.
- Fees. An annual fee of 0.5% lowers the effective return. Subtract it from the assumed return before applying the formula.
- Floating-point precision. Python floats give roughly 15 significant digits, which is plenty. Round only when displaying the result, not between steps.
Where this leads
The lump-sum formula covers a balance you already hold, and the existing-savings chapter uses it directly. Regular contributions are different: each monthly payment has a different amount of time to grow. The next chapter sums those payments into one closed-form expression, called the future value of an annuity. That expression is what the monthly target formula rearranges.
Exercise
You have $5,000 today. Assuming a 5% annual return compounded monthly (monthly rate = 0.05 / 12), about how much will it be worth in 20 years? Then say whether annual compounding at the same stated 5% would give a higher or lower result.
Show answer
Use FV = 5,000 × (1 + 0.05/12)^240. The factor is about 2.7126, so FV is about $13,563. Annual compounding gives 5,000 × 1.05^20 = 5,000 × 2.6533, about $13,266. That is lower, because earnings start compounding later within each year.
Exercise
A balance grows at an effective 7% per year. Using the rule of 72, about how long does it take to double? Then calculate the exact value with the formula ln(2) / ln(1.07) and compare the two.
Show answer
The rule of 72 gives 72 / 7, about 10.3 years. The exact value is 0.6931 / 0.0677, about 10.24 years. The two agree to within a tenth of a year.