#!/usr/bin/perl # canadian payemnts using table from Pat Pelletier print "Content-type: text/html\n\n"; print "Car Lease Calculator\n"; print "\n"; $args = $ENV{'QUERY_STRING'}; $args =~ s/\+/ /g; $args =~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig; if (length($args) < 2) { print <How much does it cost to lease? This calculator takes a MSRP, bargained discount (%), down payment, lease length and lending rate to calculate estimated lease payments. The details for this calculation can be found at Al Hearn's Automobile Leasing Page

UPDATE: July 25, 1996 - Changed to be more realistic!


Enter the MSRP:
Final Negotiated Price:
Down Payment:
Usage Tax (Sales Tax) (%)
Length of Lease (months):
New Car Lending Rate (%):
Car Value at End of Loan

EmptyForm } else { print "

Car Lease Final Numbers

"; @f = split("&",$args); for ($i=0; $i<=$#f; $i++) { $av = @f[$i]; if ($av =~ /^msr/) { $msr = substr($av,4); } if ($av =~ /^neg/) { $neg = substr($av,4); } if ($av =~ /^dwn/) { $dwn = substr($av,4); } if ($av =~ /^lln/) { $lln = substr($av,4); } if ($av =~ /^int/) { $int = substr($av,4); } if ($av =~ /^res/) { $res = substr($av,4); } if ($av =~ /^tax/) { $tax = substr($av,4); } } print "\n"; print "
Capitalized Cost: \$ $neg ($msr MSRP minus discount)"; $lp = $neg - $dwn; $mf = $int/2400; printf("
Lease Price: \$ %9.2f (above minus \$ $dwn down payment)\n",$lp); printf("
Residual Value: \$ %9.2f (after $lln months)\n",$res); $df = ( $lp - $res ) / $lln; printf("
Depreciation Fee: \$ %6.2f- part of lease payment", $df); $lf = ( $lp + $res) * $mf; printf("
Lease Fee: \$ %6.2f - part of lease payment",$lf); $mp = $df + $lf; printf("
Monthly Payment : \$ %6.2f without tax",$mp); # $utax = ($tax/100) * ($lp - $res); $utax = ($tax/100) * $mp; printf("
Usage Tax: \$ %6.2f over full loan (%4.2f %% of %6.2f)", $utax,$tax,$lp-$res); printf("
Total Monthly Payment: \$ %6.2fWHAT YOU PAY", $mp+$utax); } print<
back to Mortgage Home Page
back to Mortgage Links Page

Hugh Chou TailEnd