Sub topic 3
Giving credit for what you already have
This chapter assumes you know basic algebra, percentages, and how compound interest works. It also assumes you have a nest egg target in future dollars and an assumed annual return. The code uses Python 3.
Existing savings grow on their own, so they reduce the monthly amount you need to save. The formula below finds that amount.
def monthly_saving(target, years, annual_return, current_balance=0.0):
"""Level monthly contribution, paid at the end of each month, that reaches target."""
n = years * 12
r = annual_return / 12
balance_future = current_balance * (1 + r) ** n
gap = max(target - balance_future, 0.0)
if r == 0:
return gap / n
return gap * r / ((1 + r) ** n - 1)
print(round(monthly_saving(1_000_000, 25, 0.05, 50_000)))The output is 1387. Your $50,000 balance grows to about $174,000 by retirement, so you need to save only the remaining $826,000.
Solving for the monthly saving target
The function does three things. It grows the current balance to the retirement date. It subtracts that amount from the target to find the gap. Then it divides the gap by the growth factor of a monthly payment stream.
Raising contributions each year
A flat contribution assumes your savings never increase. If your pay rises 3 percent a year, you can start with a smaller contribution and still reach the target. Test this with a month-by-month simulation rather than the closed-form formula.
Account types, taxes and employer match
Taxes and account type change the real return you keep. An employer match adds money to your account, so subtract the expected match from the gap before you divide. Check your plan rules for vesting before counting on a match.
Stress-testing the assumptions
Run the formula at several return rates. The table below uses a $50,000 starting balance, a $1,000,000 target, and 25 years.
| Annual return | Monthly saving needed |
|---|---|
| 4% | $1,682 |
| 5% | $1,387 |
| 6% | $1,120 |
> Small changes in the assumed return move the monthly target a lot. Use a conservative return for planning.
Reviewing and adjusting the target over time
Recheck the target once a year, and after any major change in income, spending, or inflation. Update the inputs, rerun the formula, and compare the new monthly amount with what you actually save.
Exercise
Exercise
Your target is $1,000,000 in 25 years, your current balance is $50,000, and you assume a 5% return. If your employer will add $100 a month to your account, what is the monthly amount you must save yourself? Use the function above and subtract the match from the result.
Show answer
The function gives about $1,387 for the full amount. Subtracting the $100 match leaves about $1,287 per month from you.