1. Kevin Mann Guest

ASP does not support the PMT, NPER, and RATE functions. If someone has a DLL or has written out the function I would greatly appreciate it if we could use it.<BR><BR>Thanks,<BR>Kevin Mann<BR>kmannjr@inofin.com

2. Senior Member
Join Date
Dec 1969
Posts
96,118

&nbsp;<BR>You mean like this:<BR><BR>http://www.clearviewdesign.com/5k/LoanCalculator.html<BR><BR>That was done for a contest where the maximum HTML page size had to be less than 5K bytes, so it&#039s kind of unreadable. I think I have a more readable form lying around somewhere if you need it. But it&#039s all JS code (why would you want to get ASP involved for something this simple? and you *certainly* don&#039t need a DLL for something so trivial!), so you might prefer to start from the basics and redo it in VBS.<BR><BR>The formula is easy (in VBScript code):<BR><BR>PV = PMT * ( (1 - (1+RATE)^(-NPER) ) / RATE )<BR><BR>And you can then use a little algebra to figure out PMT and NPER.<BR><BR>PMT = PV / ( (1 - (1+RATE)^(-NPER) ) / RATE )<BR><BR>NPER = Log( 1 / (1 - PV * RATE / PMT) ) / Log( 1 + RATE)<BR><BR>RATE, however, can only be calculated using an iterative algorithm where you use a "binary search" type of operation to move closer and closer to the answer.<BR><BR>Note that RATE in the formula is expressed as a fraction, not as percent. And note that RATE and NPER must "match" (for example, if you want to figure something for monthly payments--so that NPER is a number of months--then RATE must be given as the rate *per month*).<BR><BR>

3. Kmann Guest

Thanks for the help Bill<BR><BR>I actually just wrote a DLL to use all of Visual Basics finance functions.

4. Senior Member
Join Date
Dec 1969
Posts
96,118