# Find number of periods from annuity formula

• Aug 22nd 2011, 05:20 AM
dexteronline
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? (Thinking)

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
• Aug 22nd 2011, 07:58 AM
SpringFan25
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?

Quote:

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:

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

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

$\displaystyle 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 $\displaystyle 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.
• Aug 22nd 2011, 08:02 AM
dexteronline
Re: Find number of periods from annuity formula
Quote:

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
• Aug 24th 2011, 09:25 AM
dexteronline
Re: Find number of periods from annuity formula
Finally got it working

Thanks
• Aug 24th 2011, 09:33 AM