Let's check this function using an example (taken from a ``real life'' experience
of one of the authors). You want to buy a house for $85,000 dollars, and will be putting
$9000 down. You have negotiated with the bank for thirty year fixed rate mortgage
at an 8% annual rate. What will your monthly payment be? Click here for answer.


The initial balance is $85000 - $9000. The interest rate r is the annual rate divided
by the twelve months in a year, and the number of time periods T is given by 30 years
times 12 months in a year, or 360 time periods. Hence the monthly payment is

payment[85000-9000, .08/12, 360]

about $560. You might want to play with this formula a bit more. For
example, using it you can see why people in the real estate industry worry about
rising interest rates affecting people's abilities to buy a home. Recalcualte the payment
above at annual interest rates of 9, 10, 11 and 12% and see how the payment changes.

In the 80's there were times when fixed rate mortgages hit as high as 18%. See how much
bigger this makes the monthly payment!