
Calculator
I have to build a financial planning calculator for a project. It should allow people to calculate their debt, etc. Can someone help me in telling me how to go about doing this or if there is some code out there. Thanks in advance.

RE: Calculator
Sounds like homework to me. <BR><BR>Your "specifications" are so vague that the answer could be anything from a complete "we recommend that you invest in 47 shares of Underwater Explorations, Inc." type of financial planning site to something as simple as a loan calculator.<BR><BR>If this is *not* homework, then how about some *real* specifications?<BR><BR>

RE: Calculator
Sorry for that, but I don't have much to go on either. From the gest of it I think it's similar to a loan calculator.

RE: Calculator
A loan calculator is easy.<BR><BR>You really don't even need ASP, at all. In fact, it kind of gets in the way.<BR><BR>See here:<BR> http://www.clearviewdesign.com/5K/<BR>for one that I did for the "5K Byte HTML Page" competition that was held by http://www.sylloge.com<BR><BR>Try it out. In order to make it fit in 5K bytes, I made the code pretty ugly, but I think I have an unuglified version sitting around somewhere.<BR><BR>But I really do recommend *not* using ASP for something as simple as this.<BR><BR><BR>

RE: Calculator
Thanks. I saw it. Now how do I go about making one of my own?

RE: Calculator
What do you need to know???<BR><BR>The basic formula you need to know is<BR><BR>LoanAmount = PaymentAmount * ( ( 1  (1 + ratePerPeriod)^(NumberOfPeriods) ) ) / ratePerPeriod;<BR><BR>Usually expressed more simply as<BR><BR> v = p * ( ( 1  ( 1 + i ^ n ) ) / i )<BR><BR>From that, you derive all the other values. It's just math. Such as:<BR><BR> p = v / ( ( 1  ( 1 + i ^ n ) ) / i )<BR><BR>I always forget the formula for numberofperiods and have to rederive it. Sigh. Just algebra, though. I think it's this:<BR> n = Log( 1 / ( 1  ( v * i / p ) ) ) / Log( 1 + i )<BR>but test it out, please!<BR><BR>NOTE: There is no way to calculate the interest rate directly. That is, there is no way to extract "i" from the equation. The only way to calculate "i" is to make a guess, try it, see if the resultant "pv" is too high or too low, and adjust it. <BR><BR>I usually start with 50% per year for both the guess and an adjustment increment. I divide the increment by 2 each time and add or subtract it, as needed, to the APR. Note that you cannot get APRs <= 0 or >= 100 this way. So what.<BR><BR>But the other values require none of that. Just use the basic equations. And most sites don't bother to present more than that. In fact, most don't let you calculate number of periods.<BR><BR>Do note that the rate must be a decimal, not a percent, and it must be matched to the periods. So if you are doing a monthly payment, then the rate must be the permonth rate (typically, you get it from the APR by dividing by 1200). The number of periods is then given in months, as well (e.g., 360 for a 30 year loan).<BR><BR>*Send* me (don't reply here) your email address if you want a somewhat more easily read version of that JavaScriptbased page.<BR><BR>billw@chilisoft.com
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

