" method="post">
Purchase and Rental Details
Buy Lease
Negotiated price * *
Sales Tax (%)
Term in months * *
Interest rate (%) * *
Other fees
Down payment * *
Residual value *
Annual depriciation (%) *
Trade-in value
Rebates

* required information

$_POST[Price]) $error[] = "Please check Negotiated price and/or Down payment."; elseif($_POST[interestRate_l]>30 || $_POST[interestRate]>30 || $_POST[interestRate_l]<1 || $_POST[interestRate]<1) $error[] = "Please make sure that the Interest rate is between 0 to 30."; elseif($_POST[leaseMonths]>60 || $_POST[loanMonths]>60 || $_POST[leaseMonths]<1 || $_POST[loanMonths]<1) $error[] = "Please make sure that the Term in months is between 0 to 60."; elseif($_POST[annualDepriciation]>25) $error[] = "Please fill-up the the Annual depriciation (%) field with appropriate value."; if(count($error)) { echo '
'; echo "$input"; } $error = ob_get_clean(); if(empty($error)) { ob_start(); //---Lease Calculation $capitalized = $_POST[Price] - $_POST[downPayment_l]; if($_POST[tradinValue_l]) $capitalized = $capitalized - $_POST[tradinValue_l]; if($_POST[rebate_l]) $capitalized = $capitalized - $_POST[rebate_l]; $residualValue = $_POST[residual]; $monthlyDepriciation = ($capitalized - $residualValue)/$_POST[leaseMonths]; $leaseInterest = ($capitalized + $residualValue)*$_POST[interestRate_l]/100/12; $leasePayment = (($monthlyDepriciation + $leaseInterest) * (1 + ($_POST[lTax]/100))); //----Purchase Calculation $marketValue = $_POST[Price] - (($_POST[Price]*$_POST[annualDepriciation]/100)*($_POST[loanMonths]/12)); $loanAmount = $_POST[Price] - $_POST[downPayment]; if($_POST[tradinValue]) $loanAmount = $loanAmount - $_POST[tradinValue]; if($_POST[rebate]) $loanAmount = $loanAmount - $_POST[rebate]; $i = ($_POST[interestRate]/12)/100; $n = $_POST[loanMonths]; $r = (1+$i); $loanMonthlyPay = ($loanAmount*$i*pow($r, $n)/((pow($r, $n))-1) * (1 + ($_POST[bTax]/100))); ?>

Results

Your monthly loan payment will be if you buy, or if you lease the car.

Buy Lease
Loan Monthly Payment Lease Monthly Payment
Down payment Total Up front Cost
Total Loan Payments Total Lease Payments
Market Value of Vehicle    
Net Cost of Buying Net Cost of Lease