Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

Java Script Loan Payment Calculator

The goal for any Web site owner is to attract visitors to their Web site and get them to stick around. This is referred to as making your Web site "sticky". One way to do this is to provide useful features like online calculators.

In this article, I provide you with Java Script code for a loan payment calculator. The process of designing a loan payment calculator, like any calculator, can be divided into the five steps listed below.

  1. Acquire the proper formula.
  2. Design an html form to get input values from the user.
  3. Code the basic calculation function.
  4. Add Code to format the output to the user.
  5. Add Code to handle errors.

Click here to view the working Loan Payment Calculator

The Loan Payment Formula

The loan payment formula is well known and can be found in many mathematics textbooks and at many locations on the Web. The formula is shown below.

monthlypayment = loanAMT x ----------------------------------
                           1  - ( 1 + monthlyRate) ^ -numPayments

loanAMT = The initial amount of the loan.
monthlyRate = The monthly interest (the annual interest rate / 12).
numPayments = number of payments (made monthly).

The important point about this formula is that it calculates the payment with compound interest. With compound interest you pay interest not only on the principal, but also on the accumulated interest. Yearly Compounding is the number of times per year that the compound interest calculation is performed. Interest is usually compounded monthly.

• In case you're not familiar with the syntax,
^ -numPayments means raise it to the negative power of the number of payments.

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro

Web Design Sections

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2017 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268