Karl wrote...
....
However, plugging in values, I can't get your equation to match the results
from Excel.
I'm using these values:
periodic rate= 0.008333333 ( which is 10% / 12 )
pmt= -100
pv= 100000
fv= -109,214.75
type= 0
When you plug the above into Excel's NPer() function, you get 12.
If I understand your equation, when I plug the same values in, the result I
get is -251.96580....
....
Your original equation:
PV*(1+Rate)^Nper + Pmt*(1+(Rate*Type))*((1+Rate)^Nper-1)/Rate + FV = 0
rearranges as
FV = Pmt*(1+(Rate*Type))*(1-(1+Rate)^Nper)/Rate - PV*(1+Rate)^Nper
Since type = 0, this reduces to
FV = Pmt*(1-(1+Rate)^Nper)/Rate - PV*(1+Rate)^Nper
= Pmt/Rate - (Pmt/Rate + PV)*(1+Rate)^Nper
Pmt/Rate - FV = (Pmt/Rate + PV)*(1+Rate)^Nper
Log(Pmt/Rate - FV) = Log((Pmt/Rate + PV)*(1+Rate)^Nper)
= Log(Pmt/Rate + PV) + Nper * Log(1+Rate)
So
Nper = (Log(Pmt/Rate - FV) - Log(Pmt/Rate + PV)) / Log(1+Rate)
= Log((Pmt/Rate - FV) / (Pmt/Rate + PV)) / Log(1+Rate)
And the formula
=LOG((-100/(10%/12)+109214.75)/(-100/(10%/12)+100000))/LOG(1+10%/12)
does return 12.00000008, just like
NPER(10%/12,-100,100000,-109214.75,0).