# Math Help - Find number of periods from annuity formula

1. ## Find number of periods from annuity formula

I have attempted to separate the number of periods (n) from the following equation

pv (1 + i)^n + pmt (1 + i * type) [{(1 + i)^n - 1}/i] + fv = 0

Have I done this correctly?

type has either a value of 0 for end of period payments and 1 for start of period payments

n = log[ { pmt * ( 1 + i * type) - fv * i } / { pmt * ( 1 + i * type) + pv * i } ] / log( 1 + i * type)

Thanks

2. ## Re: Find number of periods from annuity formula

I dont want to discourage questions, but wouldn't it be easier to test this yourself by substituting values, rather than ask us to repeat the algebra looking for errors?

n = log[ { pmt * ( 1 + i * type) - fv * i } / { pmt * ( 1 + i * type) + pv * i } ] / log( 1 + i * type)
log( 1 + i * type)

if type=0, then this is log(1). Log(1)=0 and so your expression is undefined (anything divided by 0 is undefined).

My suggested approach to recover n would be to re-factorise your expression into the form:

$(1+i)^n(\text{stuff}_1) + \text{stuff}_2 =0$

$(1+i)^n =\frac{-\text{stuff}_2}{\text{stuff}_1}$

$n \ln (1+i)=\ln \left(\frac{-\text{stuff}_2}{\text{stuff}_1} \right)$
...and finish. Depending on your level of study you may impress your teacher by noticing that $ln(1+i) = \delta$

PS: I have NOT checked that the equation can be re-written in the form i mentioned, but at first glance it looks like it can.

3. ## Re: Find number of periods from annuity formula

Originally Posted by SpringFan25
I dont want to discourage questions, but wouldn't it be easier to test this yourself by substituting values, rather than ask us to repeat the algebra looking for errors?

log( 1 + i * type)

if type=0, then this is log(1). Log(1)=0 and so your expression is undefined (anything divided by 0 is undefined)./
I had a hunch there was something I did wrong
Well time to go back to the paper and pencil and redo the math
Will let you know if I come up with a correct solution
Thanks

4. ## Re: Find number of periods from annuity formula

Finally got it working

Thanks

5. ## Re: Find number of periods from annuity formula

My site provides complete access Edmonton Real Estate