SteveGibson said:
Alternatively, you could use a more complex equation where you live of a mixture of interest and capital so that the balance goes down to 0 at some pre-determined point in the future (e.g. when you're 100).
Yes. This is the same idea used for the amortization of principal and interest loans. It could be used to find how much per period you can spend, over a given number of years before the wad of cash is spent. Here's an example of how a formula can be obtained. I've used small numbers to make it easier. The final formula, (equation
[1]) is given below if you can't be bothered to read the working.
Say you have 10,000 in the bank (call the "fund"), and 5% interest is added to it at the end of each year. You want to take out 700 at the end of each year. What will be the value of the fund after n years?
After the first year, you will have 10,000 plus (0.05 times 10,000) minus 700. That is...
1.05(10000) - 700
Let n be a variable to denote a number of years (n = 1, 2, 3, ...) and let Fn be the value of the fund after n years. Then...
YEAR 1...
F1 = 10000(1.05) - 700
YEAR 2...
F2 = 1.05(F1) - 700
= 1.05( 10000(1.05) - 700 ) - 700
= 10000(1.05)^2 - 700(1.05) - 700
= 10000(1.05)^2 - 700(1.05 + 1)
YEAR 3...
F3 = 1.05(F2) - 700
= 1.05( 10000(1.05)^2 - 700(1.05 + 1) ) - 700
= 10000(1.05)^3 - 700(1.05 + 1)1.05 - 700
= 10000(1.05)^3 - 700(1.05^2 + 1.05) - 700
= 10000(1.05)^3 - 700(1.05^2 + 1.05 + 1)
...
Fn = 10000(1.05)^n - 700( 1 + 1.05 + 1.05^2 ... + 1.05^(n-1) )
There is a pattern emerging in the brackets of the second term. It is easier to see if you write it out with paper and pencil in standard algebra. The indexes (powers) form the pattern 0,1,2,3, and so on, because the expression in those brackets is equivalent to...
1.05^0 + 1.05^1 + 1.05^2 + ... + 1.05^(n-1)
This is a sequence (called a geometric progression) where each term has a common ratio r = 1.05, and the first term is denoted by a = 1. The formula for the sum S of a geometric progression is...
Sn = a( (1 - r^n) / (1 - r) )
(This is a result. If you want to see how it is derived, let me know.)
So therefore the formula for the fund amount after n years, Fn, is...
Fn = 10000(1.05)^n - 700( (1 - 1.05^n) / (1 - 1.05) )
Replacing 10000 with p the principal; 1.05 with r the interest rate; 700 with w the wage, then we have a formula which can be solved for any variable...
Fn = pr^n - w( (1 - r^n) / (1 - r) )
[1]
We can use this to, for example, find how much we can take out of a 1,000,000 fund each year over 30 years, before the fund reaches zero. Rearranging the equation with algebra to make w the dependant variable we have...
w = pr^n( (1 - r) / (1 - r^n) )
Plugging in our values gives...
w = 1000000(1.05)^30( (1 - 1.05) / (1 - 1.05^30) ) = 65,051.44
This means we can spend 65,051.44 each year, for 30 years, before the wad is gone.
Plugging 65,051.44 back into the original equation
[1], serves as a check for the formula for w, and should show that Fn is zero...
Fn = 1000000(1.05)^30 - 65051.44( (1 - 1.05^30) / (1 - 1.05) ) = -0.32682
...which is close enough to zero for a calculator.
I have this implemented in Perl and C++. The Perl/CGI program works nicely on a web site. If anyone wants a copy, just let me know and I'll dig it out of my archives. You will have to wait a few days though, because it's on another machine somewhere else.
Dave