How to solve for $i$ and $n$ in compound interest formula? Given that $$F = A{ (1+i)^n - 1  \over i}$$
How can you solve for $i$ or $n$?
 A: As far as $i$, numerically.  The formula you give is the future value of an annuity that pays $A$ at the end of every time period for $n$ periods.  There isn't really a good way to solve for it.  But, there is guaranteed to be one unique value for $i$, so you can use a financial calculator to solve for it or use numerical methods like Newton's method.
Solving for $i$ is equivalent to solving for $i$ in the $n$th degree polynomial:
$$A(1+i)^n - Fi - A = 0$$
Solving for $n$ is possible.
$$\begin{align*}
&\frac{Fi}{A} = (1+i)^n - 1 \\
\Rightarrow &(1+i)^n = 1 + \frac{Fi}{A} \\
\Rightarrow &n \ln (1+i) = \ln(1 + \frac{Fi}{A}) \\
\Rightarrow &n = \frac{\ln(1 + \frac{Fi}{A})}{\ln(1+i)}
\end{align*}$$
A: You can solve for $n$ if you know $i$ with $$F = A{ (1+i)^n - 1  \over i}$$ $$\frac{iF}{A} +1 = (1+i)^n $$  $$n= \frac{\log\left(\frac{iF}{A} +1\right)}{\log (1+i)}= \frac{\log\left(iF +A\right) - \log(A)}{\log (1+i)}. $$  
Solving for $i$ if you know $n$ requires numerical methods except for some special cases for $n$.
