Sub topic 9
What Regular Monthly Contributions Grow Into
This chapter covers the future value of a stream of equal monthly deposits. It assumes you know the compound growth formula from the earlier chapter, balance × (1 + r)^n, and can read short Python functions. It also assumes you have a return assumption in hand. Here we only apply it.
The problem: many deposits, each growing for a different time
A lump sum has one growth period. A monthly contribution plan has hundreds. The deposit you make in month 1 compounds for almost the whole horizon. The deposit you make in the last month does not compound at all. To find the final balance, you add up every deposit's own future value.
With n deposits of size P made at the end of each month, the balance is:
FV = P × [(1+r)^(n-1) + (1+r)^(n-2) + ... + (1+r)^1 + 1]This is a geometric series. Its sum has a closed form, called the future value of an ordinary annuity:
FV = P × ((1 + r)^n − 1) / rIn this formula:
Pis the monthly contribution.ris the monthly rate, which is the annual return divided by 12.nis the number of months, which is years × 12.
A worked example
Suppose you contribute $500 a month for 30 years and assume a 6% annual return.
r = 0.06 / 12 = 0.005n = 30 × 12 = 360(1.005)^360 ≈ 6.0226(6.0226 − 1) / 0.005 ≈ 1004.5FV ≈ 500 × 1004.5 ≈ $502,258
You deposited $500 × 360 = $180,000. The other $322,258 is growth. Most of the final balance comes from compounding, and most of that compounding happens late, when the balance is already large.
Implementing and checking it
The closed form is easy to mistype, so it helps to verify it against a loop. The loop mirrors what an account does: grow the balance for a month, then add the deposit.
def fv_annuity(payment, years, annual_return, due=False):
"""Future value of equal monthly contributions.
due=False: deposits at the end of each month (ordinary annuity).
due=True: deposits at the start of each month (annuity due).
"""
n = years * 12
r = annual_return / 12
if r == 0:
fv = payment * n
else:
fv = payment * ((1 + r) ** n - 1) / r
return fv * (1 + r) if due else fv
def fv_loop(payment, years, annual_return, due=False):
"""Same quantity computed month by month."""
r = annual_return / 12
balance = 0.0
for _ in range(years * 12):
if due:
balance = (balance + payment) * (1 + r)
else:
balance = balance * (1 + r) + payment
return balance
for due in (False, True):
closed = fv_annuity(500, 30, 0.06, due=due)
looped = fv_loop(500, 30, 0.06, due=due)
print(f"due={due!s:5} closed form {closed:12,.2f} loop {looped:12,.2f}")Both lines should agree. The ordinary annuity gives about $502,258 and the annuity due gives about $504,769. The two methods match to within floating-point error. If they diverge in your own variations, the formula or the loop has a bug.
The r == 0 branch matters. At a zero return, the formula divides by zero, so you handle it separately. The balance is then just payment × n.
How the horizon changes the result
The table shows $500 a month at a 6% annual return, with end-of-month deposits. The figures are rounded to the nearest dollar.
| Years | Total deposited | Future value | Growth |
|---|---|---|---|
| 10 | $60,000 | $81,940 | $21,940 |
| 20 | $120,000 | $231,020 | $111,020 |
| 30 | $180,000 | $502,258 | $322,258 |
| 40 | $240,000 | $995,745 | $755,745 |
Going from 30 to 40 years adds only $60,000 in deposits, yet it raises the balance by about $493,000. The balance grows faster than the horizon does. That is why the time horizon matters as much as the contribution when you solve for a target.
Timing: end of month or start of month
The standard formula assumes each deposit is made at the end of the month, so it earns no interest in the month it is deposited. This is the ordinary annuity. If you deposit at the start of each month, every deposit earns one extra month of growth. The result is the ordinary-annuity value multiplied by (1 + r).
The gap is small. In the example it is about 0.5%, or $2,500 on $500,000. Payroll deposits usually arrive during the month, so the end-of-month convention is a slightly conservative and simple choice. Use it unless you have a reason not to, and use it consistently. The rest of this tutorial's code assumes end-of-month deposits.
Which monthly rate to use
There are two ways to turn an annual return into a monthly rate.
- Nominal division:
r = annual / 12. A "6% annual return" becomes 0.5% a month. Compounded for a year, this gives 6.168%. - Effective conversion:
r = (1 + annual)^(1/12) − 1. A 6% return becomes about 0.4868% a month. Compounded for a year, it gives exactly 6%.
The two conventions give different answers. At 6% over 30 years with $500 a month, the effective conversion gives roughly $487,000, compared with $502,258 from nominal division. That is a gap of about 3%.
Neither is wrong. They answer different questions: "6% compounded monthly" versus "6% for the year". Pick one and state it. This tutorial uses annual / 12, which matches how most calculators and the code above work. If you take return figures from a historical source such as annual index returns, the effective conversion is the more faithful choice.
Common errors
- Using years where months are expected. If
n = 30andr = 0.005, the answer is far too small. The rate period and the count period must match. - Using the annual rate with monthly deposits. Computing
((1.06)^360 − 1) / 0.06produces a number that is wildly too large. Divide the rate by 12 first. - Mixing nominal and real returns. If your target is in future dollars, the return should be nominal. If your target is in today's dollars, the return should be real. The target and the return must use the same kind of dollars.
- Forgetting the zero-rate case. A function that is tested only at positive returns will crash when someone enters 0%.
- Treating the result as a forecast. The formula gives the balance if returns are the same every month. Real returns vary, so the formula describes a central estimate.
Where this fits in the plan
This chapter answers the forward question: given a contribution, what balance do I reach? The saving target needs the reverse question: given a balance I need, what contribution reaches it? Solving the formula for P gives that answer. The next chapters credit your existing savings and then rearrange the formula to solve for the monthly amount. The two chapters after that handle contributions that rise each year, which the formula above cannot represent directly because it assumes a flat P.
Exercises
Exercise
You plan to contribute $300 at the end of each month for 25 years and assume a 5% annual return, using r = annual / 12. Write the values of r and n, set up the formula, and estimate the future value.
Show answer
r = 0.05 / 12 ≈ 0.0041667 and n = 25 × 12 = 300. FV = 300 × ((1 + 0.0041667)^300 − 1) / 0.0041667. Since (1.0041667)^300 ≈ 3.481, the fraction is about (2.481 / 0.0041667) ≈ 595.5, so FV ≈ 300 × 595.5 ≈ $178,650. Total deposits are $90,000, so about $88,650 is growth.
Exercise
A colleague's script returns $9.2 million for $500 a month over 30 years at 6%. It uses payment * ((1 + 0.06) ** 360 - 1) / 0.06. What are the two mistakes, and what is the correct approach?
Show answer
The rate and the period count do not match. The script uses the annual rate of 0.06 with 360 monthly periods. It should use the monthly rate r = 0.06 / 12 = 0.005 with n = 360, or the annual rate with n = 30 years and annual deposits. The correct monthly version is 500 × ((1.005)^360 − 1) / 0.005 ≈ $502,258. The second mistake is not guarding the r = 0 case, which would divide by zero if someone entered a 0% return.
Exercise
If you switch from end-of-month to start-of-month deposits with the same payment, rate and horizon, by what factor does the future value change, and why?
Show answer
It is multiplied by (1 + r), where r is the monthly rate. Each deposit earns one extra month of interest, so every term in the sum is multiplied by (1 + r). With r = 0.005, the increase is 0.5%.