I need to find a formula which can find the deposit amount needed yearly when you already have a starting amount and you need to reach 'x' amount over 'x' time.
So lets say I have 50000\$ and i need to reach 230000\$ within 8 years and the interest rate is 4.5%, how much do I need to deposit each year? Is there a formula to solve this problem?
PV = 50000\$
FV = 530000\$
i = 4.5% = 0.045
n = 8
Let's call the amount you need to deposit $A$. And let's say you deposit that amount at each year end. Then you have the following equivalence:
$$FV = PV\times(1+i)^n + A\times(1+i)^{n-1} + A\times(1+i)^{n-2} + \ldots + A \times(1+i) + A$$
or written in a more compact form using a polynomial identity:
$$FV = PV\times(1+i)^n + A\times\frac{(1+i)^n-1}{i}$$
from which you can deduce $A$
$$A = \frac{i\times(FV - PV\times(1+i)^n)}{(1+i)^n-1} \; .$$