Audrey's Investment Calculator
Investment Calculator Copyright 2000 Audrey Beth Stein. All
Rights Reserved.
This calculator may not be copied, reproduced, published, used commercially,
or the like without my explicit written permission. Please contact
me regarding permissions.
disclaimer: i am not a financial advisor, a
mathematician, or a programmer.
this investment calculator is provided on an as-is basis, for informational
purposes only.
i make no warranty regarding its accuracy or results.
please consult a financial professional before you do something rash.
thanks to dad and janice for help on the math.
There are a lot of investment calculators on the web. Most are designed to answer specific questions, but there is one basic equation behind most of these calculators, involving a mere six variables.
Here is the basic equation:
c = x / [(1 + i)/(r(1 - t))]^q
The following variables are involved in the equation:
c = final return (measured in current year spending power)
x = initial investment
i = inflation
r = rate of return
t = tax rate of investment (while it is being invested)
q = length of time of investment
How much money you have at the end of an investment period (your final return) depends on how much you start with (your initial investment), how long you let it grow (length of time of your investment), the rate of return of your investment (how much the stock price is going up or down, what percent interest you are getting, and the like), inflation (that pesky thing that makes milk prices go up as the years go on), and what percentage you are giving away to the government each year(the tax rate of your investment). Please note that you may owe additional taxes on your final return.
How to use the investment calculator: Enter any five variables, and then press "submit" to calculate the sixth.
Some more information....
Here is the basic equation, in PHP format:
c = x / (pow (((1 + i) / (1+r * (1 - t))) , q))
Here is the equation worked out for other variables:
c = x / [(1 + i)/(1 + r(1 - t))]^q
x = c[(1 + i)/(1 + r(1 - t))]^q
t = 1- [((c/x)^(1/q))(1 + i) - 1]/r
q = (log(x/c))/[log((1 + i)/(1+r(1 - t)))]
r = [((c/x)^(1/q))(1 + i) -1]/(1 - t)
i = ((x/c)^(1/q))[r(1 - t) +1] - 1