2018-06-30

Some Ways To Think About Work, Savings, And Expenses

Scope And Purpose Of This Post

This post covers some new formulas that I came up with on my own that deal with a quantity (like the monetary value of your retirement portfolio) that experiences both exponential growth and regular contributions.  It is very unlikely I am the first to come up with these formulas, but it has been hard for me to find these formulas on the internet.  This post also covers some implications of these formulas, and some ways to think about the opportunity costs of savings and expenses, especially in terms of work until retirement.

Most notably, Example 5 tries to answer whether using a toll road increases or decreases the amount of time spent working/commuting until retirement.  The math/logic in the example can be used more generally to think about whether any expense is worth the extra work you must do to pay the expense.

You do not have to do any of the math yourself; you can make a copy of my Money Formula Demo Google Sheet and change some of the inputs.  To make a copy, go to the "File" menu at the top of the spreadsheet and select "Make a copy".



The Math Of Value Over Time With Growth And Contributions

It is fairly easy to calculate how money would grow with compound growth over time, or how money would grow with regular contributions, but it is harder to take both into account at the same time.  Googling on the topic will get you results that give you formulas or the FV Excel function (one, two) for the discrete case (actually two discrete cases; contributions are either made just after beginning of every period or just before end of every period).

I much prefer the continuous case (math is much cleaner, don't have to scale by contribution period).  I have derived formulas for the continuous case from the formulas for the discrete cases with the help of Wolfram Alpha for taking limits.

Here are the shorthand symbols I'll be using...
  • f: future amount, like how much money you'll need to retire
  • p: present amount, like how much money you have now in your portfolio
  • c: contribution rate, like how much you save each year
  • t: time, usually time to get from present value to future value, often in units of years
  • g: growth factor (1.05 means 5% growth over a unit of t)
  • x: some expense that decreases your present amount ('e' is already taken by Euler's constant)
  • d: the time delay that the expense adds to the time to get from present value to future value
  • ln: natural logarithm
  • ( ) [ ]: various ways to do parentheses so that nested parentheses are more readable
  • : the symbol used for partial derivatives.


Formula for FutureAmount given other parameters:
f = f(p,c,g,t) = p*g^t + c*[g^t - 1]/ln(g)

Note: when g = 1 (no growth), the future value formula needs to be simplified to avoid division by zero:
f = p + c*t


Formula for ContributionRate given other parameters (conceptually, what contribution rate is required to hit your goal future amount within the goal time frame:
c = [f - p*g^t] * ln(g)/[g^t - 1]

 

Formula for TimeNeeded to get to future value given other parameters:
t = t(p,c,g,f) = ln( [c + f*ln(g)] / [c + p*ln(g)] ) / ln(g)


If you have an expense "x" that decreases your present value, then you experience an additional time delay "d" getting to your future value.  The following is an approximation (the smaller x is compared to p*ln(g), the better):
d x / [c + p*ln(g)]

Note that the delay is inversely related to p, c, and g.  So, perhaps some $100 expense today delays your retirement too much (several days) to be worth it, but as your p, c, and/or g increase, the delay decreases and maybe the expense will become worthwhile.  This relationship is yet another manifestation of how investing/saving a dollar is more powerful the younger/poorer you are.

Furthermore, note that the additional delay in getting to your desired future value does not depend on what the future value is.  This independence from future value makes intuitive sense because the time delay should be equal to the time taken to get back to your original present value before the expense.  So, we can use the TimeNeeded function to calculate how long it will take to get back to [PresentValue] if we start at [PresentValue-Expense].  This is an exact formula for delay.
d = d(p,c,g,x) = t(p-x,c,g,p)
d = d(p,c,g,x) = ln( [c + p*ln(g)] / [c + (p - x)*ln(g)] ) / ln(g)

We also might ask the flip question: if we are willing to endure a given delay "d" to buy something, what expense "x" does that translate into?
x ≈ d * [c + p*ln(g)]
x = [g^d - 1] * g^-d * [c + p*ln(g)] / ln(g)

Pretty picture of the important formulas (see this online tool for how I generated the picture; unfortunately it seems to be broken as of 2023-11-21 and I can not generate a new picture with the 'c' equation):


Again, you can use my Money Formula Demo Google Sheet if you want to do some calculations merely by copying the Google Sheet and changing some of the inputs.


Example 1: How Much Money Will You Have In 20 Years?

Imagine you have an account that gives 9% annual growth.  You have $70K in the account right now.  You'll be contributing $30K annually, continuously over time.  Assuming continuous growth and contributions, how much money will the account have in 20 years?

Known values: {p = $70K; c = $30K; g = 1.09; t = 20 yrs}
Use the FutureAmount formula.

f = p*g^t  + c*(g^t - 1)/ln(g)
f = 70000*1.09^20 + 30000*(1.09^20 - 1)/ln(1.09)
f = $1,995,186.63

Given these very specific and possibly over-generous assumptions, you'll have $1,995,186.63 in the account after 20 years.



Example 2a: Handle Inflation For Example 1

What if annual inflation is 2%?  Let's think of money as purchasing power, and calculate everything in terms of present real dollars; that way, all money amounts are put in something that is useful and intuitive: current purchasing power.  The 9% nominal annual growth becomes 1.09/1.02 = 1.0686 ≈ 1 + 0.09 - 0.02 = 1.07, so ~7% real annual growth.

Also, it is reasonable to suppose that our nominal contributions will grow in line with inflation (hopefully inflation happens to our wages as well as the price of bread), so we don't need to change our math on the contributions.


FutureAmount(p=$70K, c=$30K, g=1.07, t=20 yrs)  =  $1,543,302.59

Given these very specific and possibly over-generous assumptions, you'll have $1,543,302.59 (in terms of current purchasing power) in the account after 20 years.


Example 2b: Handle Growth Uncertainty For Example 2a


The assumption we should question the most in these calculations is the rate of return (growth factor, g) of our money.  Not only do stock markets defy confident predictions, the future of interest rates is also murky.  One thing I like to do is to see what range of results I get if I look at a conservative forecast and a historically-average forecast.  For someone like me who is mostly in equities and has long time frames, I use 1.02 and 1.07 for inflation-adjusted growth factors.  For a shorter time frame, I would be tempted to use a wider range of values for g.

FutureAmount(p=$70K, c=$30K, g=1.07, t=20 yrs)  =  $1,543,302.59
FutureAmount(p=$70K, c=$30K, g=1.02, t=20 yrs)  =  $840,202.57

So, maybe we'll have somewhere around $840K to $1.5M in 20 years.  Things could go better, things could go worse, but these calculated ranges are better than nothing when it comes to making life plans.


Example 3: How Long Until I Retire?

Imagine you have an account that gives 7% real annual growth.  You have $70K in the account right now.  You'll be contributing an inflation-adjusted $30K annually, continuous over time.  If you feel you need $1.5M to retire, how long will you need to keep this up?

Known values: {p = $70K; c = $30K; g = 1.07; f = $1.5M}
Use the TimeNeeded formula.

t = ln( [c + f*ln(g)] / [c + p*ln(g)] ) / ln(g)
t = ln( [30000 + 1500000*ln(1.07)] / [30000 + 70000*ln(1.07)] ) / ln(1.07)
t = 19.67 years


But like in Example 2b, let's also look at what we get with a more conservative growth forecast.

TimeNeeded(p=$70K, c=$30K, g=1.07, f=$1.5M)  =  19.67 years
TimeNeeded(p=$70K, c=$30K, g=1.02, f=$1.5M)  =  32.47 years

So, you could be easily working anywhere from two to three decades, and other time frames are still very possible.


Example 4: How Powerful Is That Raise?


Perhaps you're thinking about some lifestyle changes so you can save an additional $5K/year, or you're thinking about a career move that can increase your income and savings by $20K/year.  How "worth it" is this lifestyle change?  How powerful is this raise?  One way is to see how much you speed up getting to retirement, thus we can use the TimeNeeded formula while playing with the ContributionRate parameter.  Let's look at how the $20K/year raise changes things from Example 3.

TimeNeeded(p=$70K, c=$30K, g=1.07, f=$1.5M)  =  19.67 years
TimeNeeded(p=$70K, c=$50K, g=1.07, f=$1.5M)  =  15.05 years
Difference = 4.63 years

In theory, without the raise you could retire in 19.67 years, and the raise reduces that time span to 15.05 years, a reduction of ~4.6 years.  Maybe this way of thinking about the raise can help you appreciate on a gut level how big of a deal that raise is.


Example 5: Does This Toll Decrease My Toil?

Imagine there is a toll road that costs $2 and saves you 4 minutes on your commute to work.  The overall pros and cons of the toll road are complicated, but maybe we can answer one important question quantitatively: does taking the toll road increase or decrease the amount of toil (work) you must do before you retire?

Each toll of $2 saves you 4 minutes of toil during your drive, but you become $2 poorer, and must work longer to get to your savings big enough to support retirement.  Let's see how long this delays retirement for a person with {p = $70K; c = $30K; g = 1.07, e = $2}.


d ≈ x / [c + p*ln(g)]
d ≈ 2 / [30000 + 70000*ln(1.07)]
d ≈ 0.00005758 ExtraWorkYears

Let's turn that into extra work minutes by assuming you have an annual equivalent of 5 work weeks of vacation and holidays, and you have 8 hours of office toil and 1 hour of commute toil per work day.

(52 - 5) WorkWeeks * 5 WorkDays * 9 WorkHours * 60 Minutes = 126900 WorkMinutesPerYear
0.00005758 ExtraWorkYears * 126900 WorkHoursPerYear = 7.31 ExtraWorkMinutes
7.6 ExtraWorkMinutes * 8/9 OfficeTimeProportion =  6.49 ExtraOfficeMinutes
7.6 ExtraWorkMinutes * 1/9 DriveTimeProportion =  0.81 ExtraDriveMinutes

So, paying the toll saves you 4 minutes of driving immediately, but you must spend an extra 6.49 minutes in the office and 0.81 minutes driving before you can retire, so taking the toll increases your total working minutes until retirement.  Well, maybe the toll road also makes you appreciably safer and less stressed, so maybe the toll is still worth it.  We still have to do a subjective judgment, but maybe our calculation has put the trade off into terms that are easier to deal with.

We can also do some math to see under what conditions the toll will decrease our toil.  The retirement delay is roughly inversely proportional to how much money you have, so you could wait until "p" grows enough such that the toll starts to decrease your toil.  In other words, let's find the "p" that leads to a "d" of 4 minutes.

d ≈ x / [c + p*ln(g)]
4 ExtraWorkMinutes / 126900 WorkMinutesPerYear = 2 / [30000 + p*ln(1.07)]
p ≈ (2*126900/4 - 30000) / ln(1.07)
p ≈ $494,394

Okay, once we have $494,394 growing in our retirement portfolio (~9 years from now, using the TimeNeeded formula), the toll road will start decreasing our toil.  Note that increases to our annual contributions or growth factor can also make the toll road decrease our toil.


Appendix A: Supporting Formulas and Less Satisfying Derivatives

Formula for the partial derivative of "TimeNeeded" function with respect to PresentAmount: (WolframAlpha result using Mathematica syntax; Symbolab step-by-step solution)
∂t/∂p = -1 / [c + p*ln(g)]

The above partial derivative is telling you for small changes in your present value, how much you're changing time needed to get to future value.  This is how we got the delay approximation formula.

The math related to changes in desired FutureAmount is very similar to changes in PresentAmount:
∂t/∂f = 1 / [c + f*ln(g)]
Δt = t(f,c,g,f+Δf)


Taking the partial derivative of TimeNeeded with respect to PresentAmount got a very interesting and useful result; other partial derivatives of TimeNeeded are not so satisfying/useful.

The WolframAlpha result for ∂t/∂c:

The WolframAlpha result for ∂t/∂g:

The partial derivative of FutureAmount with respect to Time might be a little useful if someone wants to ponder about their "money accumulation speed".  WolframAlpha result for ∂f/∂t:

Which is perhaps useful enough to put into large text:
∂f/∂t = g^t * [c + p*ln(g)]

If you're wondering about some sort of quantity/formula/relationship I haven't mentioned, feel free to ask about it and I might incorporate it into this post or another post.

No comments:

Post a Comment