Formula for compound interest with N withdrawals

2.4k Views Asked by At

I have a calculator that allows users to see how much they need to save per period (month, year, etc) when putting money into a savings account. There are N withdrawals made in the end, with N ranging from 1 to 9, and years ranging from 1 to 22 (making periods range from 1 to 12*22=264). Each withdrawal is made in one period. For example:

Year      : 1  2  3  4  5  6  7
Withdrawal: 0  0  0  0  7  7  9

Users input how much what they're saving for costs now, how much the interest rate on that cost is, the rate their investment will grow, and for how many years they'll be saving. The calculator outputs how much they should save per period.

I am trying to allow for a lump-sum investment though. Setting the period to 1 in the calculator does not output a correct answer. Is there a formula that anyone knows off-hand for this?

To be clear: with the inputs described above, I am looking for the output of what the initial investment amount should

-------------EDIT------------

Example input:

years: 4
# of withdrawals: 2
goal (sum of withdrawals): $22,601
interest rate: 0.06 (6%)

I need it to output the following:

lump sum deposit: $19,454
1

There are 1 best solutions below

3
On BEST ANSWER

You can just discount each of the desired withdrawals. If the initial deposit is at the start of year 1, the withdrawals are at the ends of the years indicated, and the annual interest is $i$, to get that withdrawal of $7$ at year $5$ requires $\frac 7{(1+i)^5}$. To get your whole stream, you must deposit $\frac 7{(1+i)^5}+\frac 7{(1+i)^6}+\frac 9{(1+i)^7}$ at the start. Here is a table showing that $16.15105$ is sufficient $$\begin {array}\ Year&Flow, end of year&Balance, end of year\\0&16.15104502&16.15104502\\1&&17.12010772\\2&&18.14731418\\3&&19.23615303\\4&&20.39032221\\5&-7&14.61374155\\6&-7&8.490566038\\7&-9&0 \end {array}$$