\n"; */ $mort_tmp_dir = "/tmp"; Function Power ($a, $b) { $i = 0; $sum = 1.0; while ($i < $b) { $sum = $sum * $a; $i++; } return $sum; }; ?>
This is a financial calculator that calculate U.S. mortgage payments schedule.
The formula used is as follows:
r = (interest_rate / 1200) + 1
t = ( r ** 12) ** desired_number_of_years_to_pay_down
monthly_payment = ( mortage_balance * t * (r - 1) ) / ( t - 1)
DISCLAIMER
Although I believe the formula to be correct, and the program to be working, I disclaim all responsibilities for the usage of its results. You should always double check the numbers before making purchasing decisions.Net Images disclaims any and all warranties with regard to these software, including all express warranties and all implied warranties of merchantability and fitness, for any particular purpose. In no event shall Net Images be liable for damages of any kind, including but not limited to special, indirect or consequential damages resulting from loss of use, data or loss of any past, present, or prospective profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of these software.
Results of previous calculations.
*/ ?>
0) { $r = (doubleval($interest) / 1200.0) + 1.0; $t = Power($r, 12); $t = Power(doubleval($t), $years); $tmp1 = ((doubleval($sbalance) - doubleval($ebalance)) * $t); $tmp2 = ($tmp1 * $r) - $tmp1; $monthly = $tmp2 / ($t - 1.0); /* print out results */ /* $fp = fopen("/home/tin/public_html/calc/mortgage_res.inc", "a+"); $buff = sprintf("%16.2f", $sbalance); fputs($fp, "
\n"); $buff = sprintf("%10.4f", $interest); fputs($fp, "
\n"); $buff = sprintf("%6u", $years); fputs($fp, "
\n"); $buff = sprintf("%16.2f", $ebalance); fputs($fp, "
\n"); $buff = sprintf("%10.2f", $monthly); fputs($fp, "
\n"); fputs($fp, "
\n"); fclose($fp); */ ?>
| Mortgage Payments Schedule Calculator | |
|---|---|
| Starting Balance | |
| Interest Rate | |
| Term (years) | |
| Ending Balance | |
| Monthly Payment |
Tin "Tin Man" Le / tin@le.org