The Retirement Equations

I've been saving for retirement since I got my first real job, when I was 22 years old. Over the years since then, I've worked through the math that describes this subject, and it occurs to me that there might be other people who would like to see my results, as an aid to making their own plans.

Any plan that has to be carried out over a long time will be, to some extent, unpredictable. To quote Lex Luthor: "...stocks may rise and fall, utilities and transportation systems may collapse. People are no damn good..." In math and science, the way to deal with unpredictability is to simplify your model. It won't be perfect; it won't tell you what WILL happen, but it can give you a general picture of what to expect. The math I'm presenting here has simplifying assumptions:

The math that follows is simple algebra; at least, it's simple to me (but I'm a math geek). If you've never learned algebra, or you've forgotten it, try to find a friend who'll understand it and can help you do so. If you don't know anyone like that, please try to follow along anyway. I'll take it in small steps.

symbolmeaningexample
Ifirst year's incomeyour income during the first year you save
ssavings rate (fraction of income saved)if you save 10% of your income, s=0.10
ggrowth factor (1 + interest rate)if your savings pays 7%, g = 1.07
iinflation factor (1 + inflation rate)if the inflation rate is 2%, i=1.02
nnumber of yearsif you start saving at age 20, and retire at 68, n=48
Stotal amount saveda number that always comes out too small, somehow

Let's get started. Your "retirement clock" is at zero years. You're fresh out of school, in your late teens or early twenties, and you've just started your first "real" job. At the end of a year, you've saved one year's income (I), times your saving rate (s).

S (1 year) = s*I

In the second year, your income is a little higher, due to an inflation adjustment, so the amount you save is s * i * I. Also the amount you saved the first year produces a return, growing to g times the previous value.

S (2 years) = g*s*I + i*s*I

In the third year, S(2) grows by the factor g, and you save another, even larger amount, i2*s*I.

S (3) = g2*s*I + g*i*s*I + i2*s*I

Keep doing this. After some number of years, which I'll call 't', your total savings will be:

S (t) = gt-1*s*I + gt-2*i*s*I + gt-3*i2*s*I + ... + g*it-2*s*I + it-1*s*I

Well, that's kind of messy. Let's clean it up. Every term in the formula is a multiple of s*I. Let's factor that out.

S (t) = s*I*[gt-1 + gt-2*i + gt-3*i2 + ... + g*it-2 + it-1]

The next step is a little tricky. We factor out it-1. That way, every term inside the brackets is a power of (g/i).

S (t) = s*I*it-1*[(g/i)t-1 + (g/i)t-2 + (g/i)t-3 + ... + (g/i) + 1]

Now we simplify the part in brackets. If the result looks strange, you can look here.

S (t) = s*I*it-1*{[(g/i)t - 1] / [(g/i) - 1]}

And the last step is to multiply the power of i back into the braces.

S (t) = s*I*[(gt - it) / (g - i)]

OK, that's not a terribly complicated formula for how much you'll have saved, but how do you tell if that's enough? Well, first you want to have your nest egg keep growing every year, at least as fast as inflation, because your expenses will increase from year to year. And second, you want to take out enough to match what you would have earned (after saving) if you hadn't retired. The expression for that is:

(g-1) * S = (i-1) * S + (1-s)*in*I

That is, return on your savings equals the amount you reinvest plus the amount you spend.

Now we simplify...

(g-i) * S = (1-s)*in*I

...substitute the formula for S...

(g-i) * s*I*[(gt - it) / (g - i)] = (1-s)*in*I

...cancel out (g-i)...

s*I*(gn - in) = (1-s)*in*I

...cancel out I (income, that is)...

s*(gn - in) = (1-s)*in

...expand both sides.

s*gn - s*in = in - s*in

Now, since we're subtracting the same amount from both sides...

s*gn = in

One final rearrangement...

s = (g/i)-n

...or we can flip it around to calculate the number of years...

n = -log(s) / log(g/i)

What's that mean? Divide your growth factor by the inflation factor. Raise that ratio to the power of the negative of the number of years you're working and saving. The result is the fraction of your income you need to save in order to retire with a large enough pile of assets so that you won't run out, no matter how long you live.

Let's say you can average a 10% return from the stock market (on average), and that the Federal Reserve guys keep inflation at about 2%. If you start working and saving at age 20 (with, say, a two-year certificate in whatever you want to do), and retire at 70. Then you need to save:

s = (1.10/1.02)-50 = 0.0229 = 2.29%

...of your income to be able to retire on schedule. That doesn't look too bad, but small changes in your growth factor or the number of working years can make big changes in how much you need to save.

ROR40455055
4%46.0%41.7%37.9%34.4%
6%21.5%17.7%14.6%12.1%
8%10.2%7.6%5.7%4.3%
10%4.9%3.3%2.3%1.6%

That's it, really. If there's some variant on my assumptions you'd like me to take on, let me know. If I can figure out the answer, I'll update this page and tell you about it.

2018-09-18

mark@mark.hagerman.name