%@ Language = VBScript %> <% Option Explicit %> <% response.buffer = true response.expiresAbsolute = #1/1/2000# response.CacheControl = "Private" dim relative_path_to_database relative_path_to_database = "../2020applications.mdb" %> <% IF request.querystring("ID") <> "" THEN set rs = cn.Execute("SELECT listing_price, property_taxes FROM properties WHERE propertyID = "& request.querystring("ID") &";") response.cookies("visitor_info")("current_mortgage_amount") = rs("listing_price") response.cookies("visitor_info")("property_taxes") = rs("property_taxes") rs.close set rs = nothing END IF IF request("current_mortgage_amount") <> "" THEN response.cookies("visitor_info")("current_mortgage_amount") = request("current_mortgage_amount") END IF IF request("current_term_length") <> "" THEN response.cookies("visitor_info")("current_term_length") = request("current_term_length") END IF IF request("current_interest_rate") <> "" THEN response.cookies("visitor_info")("current_interest_rate") = request("current_interest_rate") END IF IF request("property_taxes") <> "" THEN response.cookies("visitor_info")("property_taxes") = request("property_taxes") END IF IF request("monthly_property_taxes") <> "" THEN IF request("monthly_property_taxes") <> "" THEN response.cookies("visitor_info")("monthly_property_taxes") = request("monthly_property_taxes") ELSEIF request.cookies("visitor_info")("property_taxes") <> "" THEN response.cookies("visitor_info")("monthly_property_taxes") = request.cookies("visitor_info")("property_taxes")/12 END IF END IF IF request("annual_insurance") <> "" THEN response.cookies("visitor_info")("annual_insurance") = request("annual_insurance") END IF IF request("current_monthly_payment") <> "" THEN response.cookies("visitor_info")("current_monthly_payment") = request("current_monthly_payment") END IF cn.close set cn=nothing %>
<% IF request.querystring("action") = "" THEN %>
Select a Calculator!To help you make the right decision buying a new home, we have provided these helpful calculators. <% ELSEIF request.querystring("action") = "mortgage_calc" THEN %> <% IF len(request.form) > 0 THEN dim current_mortgage_amount, current_term_length, current_interest_rate, property_taxes, annual_insurance IF Len(request.form("current_mortgage_amount")) = 0 THEN CALL HandleError("Please enter the total amount of your mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF current_mortgage_amount = request.form("current_mortgage_amount") IF Len(request.form("current_term_length")) = 0 THEN CALL HandleError("Please enter the term length of your mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF current_term_length = request.form("current_term_length") IF Len(request.form("current_interest_rate")) = 0 THEN CALL HandleError("Please enter the current interest rate of your mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF current_interest_rate = request.form("current_interest_rate") IF Len(request.form("property_taxes")) = 0 THEN CALL HandleError("Please enter the amount of property tax you pay annually.",request.servervariables("HTTP_REFERER")) response.end END IF property_taxes = request.form("property_taxes") IF Len(request.form("annual_insurance")) = 0 THEN CALL HandleError("Please enter the amount of property or home insurance you pay annually.",request.servervariables("HTTP_REFERER")) response.end END IF annual_insurance = request.form("annual_insurance") dim mi, base, mbase, pi, monthly_property_taxes, current_monthly_payment, i, monthlyi, dasum mi = current_interest_rate/1200 base = 1 mbase = 1 + mi FOR i = 1 TO current_term_length * 12 base = base * mbase NEXT pi = Round((current_mortgage_amount * mi/(1-(1/base)))*(10^2)/(10^2),2) monthly_property_taxes = Round(property_taxes/12,2) monthlyi = Round(annual_insurance/12,2) dasum = current_mortgage_amount * mi/(1-(1/base)) + (property_taxes/12) + (annual_insurance/12) current_monthly_payment = Round(dasum,2) %>Results
Click here to see how much you might save if you pay >bi-weekly! <% ELSE %>Please note: This calculator uses common formulas for calculating principal vs. interest payment but actual figures may differ depending on the country you are living in. <% END IF %> <% ELSEIF request.querystring("action") = "bi-weekly_mortgage_calc" THEN %> <% IF len(request.form) > 0 THEN dim pmt1, pmt2, prin1, prin2, intPort1, intPort2, prinPort1, prinPort2, accumInt1, accumPrin1, accumInt2, accumPrin2 IF Len(request.form("current_monthly_payment")) = 0 THEN CALL HandleError("Please enter the amount of your current monthly payment.",request.servervariables("HTTP_REFERER")) response.end END IF pmt1 = request.form("current_monthly_payment") pmt2 = request.form("current_monthly_payment")/2 IF Len(request.form("current_mortgage_amount")) = 0 THEN CALL HandleError("Please enter the total amount of your mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF prin1 = request.form("current_mortgage_amount") prin2 = request.form("current_mortgage_amount") intPort1 = 0 intPort2 = 0 prinPort1 = 0 prinPort2 = 0 accumInt1 = 0 accumPrin1 = 0 accumInt2 = 0 accumPrin2 = 0 IF Len(request.form("current_interest_rate")) = 0 THEN CALL HandleError("Please enter the current interest rate of your mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF i = request.form("current_interest_rate") IF i > 1.0 THEN i = i/100.0 dim i1, i2 i1 = i/12 i2 = i/26 dim count1, count2 count1 = 0 count2 = 0 DO WHILE prin1 > 0 intPort1 = prin1 * i1 prinPort1 = pmt1 - intPort1 prin1 = prin1 - prinPort1 accumPrin1 = accumPrin1 + prinPort1 accumInt1 = accumInt1 + intPort1 count1 = count1 + 1 IF count1 > 600 THEN EXIT DO LOOP IF count1 > 600 THEN CALL HandleError("At that rate, you will never pay off this loan.\n\nYou will have to either:\n\n1. Lower the loan amount.\n2. Lower the interest rate.\n3. Increase the Monthly Payment.",request.servervariables("HTTP_REFERER")) response.end ELSE dim original_int original_int = DisplayCurrency(accumInt1) DO WHILE prin2 > 0 intPort2 = prin2 * i2 prinPort2 = pmt2 - intPort2 prin2 = prin2 - prinPort2 accumPrin2 = accumPrin2 + prinPort2 accumInt2 = accumInt2 + intPort2 count2 = count2 + 1 IF count2 > 600 THEN EXIT DO LOOP dim biwkInt, intSave biwkInt = DisplayCurrency(accumInt2) intSave = DisplayCurrency(accumInt1 - accumInt2) END IF %>ResultsBi-weekly plans are generally an excellent way to decrease the interest charges on your loan. Instead of monthly payments of <%=DisplayCurrency(pmt1)%>, you would have 26 payments of <%=DisplayCurrency(pmt2)%> per year. What this means is that you'll pay an average of <%=DisplayCurrency(pmt1 / 26)%> more per month, but you'll pay the loan off <%=count1 - FormatNumber(count2/26*12)%> months sooner and therefore save <%=DisplayCurrency(intSave)%> in interest charges.
Click here to see if you should re-finance your current mortgage! <% ELSE %>Please note: This calculator uses common formulas for calculating total_amount vs. interest payment but actual figures may differ depending on the country you are living in. <% END IF %> <% ELSEIF request.querystring("action") = "refinancing_calc" THEN %> <% IF len(request.form) > 0 THEN IF Len(request.form("current_monthly_payment")) = 0 THEN CALL HandleError("Please enter the amount of your current monthly payment.",request.servervariables("HTTP_REFERER")) response.end END IF pmt1 = request.form("current_monthly_payment") IF Len(request.form("current_mortgage_amount")) = 0 THEN CALL HandleError("Please enter the total amount of your current current mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF prin1 = request.form("current_mortgage_amount") intPort1 = 0 prinPort1 = 0 accumInt1 = 0 accumPrin1 = 0 IF Len(request.form("current_interest_rate")) = 0 THEN CALL HandleError("Please enter the interest rate of your current current mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF i1 = request.form("current_interest_rate") IF i1 > 1.0 THEN i1 = i1/100.0 END IF i1 = i1/12 IF Len(request.form("current_interest_rate")) = 0 THEN CALL HandleError("Please enter the interest rate of the new or proposed mortgage.",request.servervariables("HTTP_REFERER")) response.end END IF i2 = request.form("n_int_rate") IF i2 > 1.0 THEN i2 = i2/100.0 END IF i2 = i2/12 count1 = 0 DO WHILE prin1 > 0 intPort1 = prin1 * i1 prinPort1 = pmt1 - intPort1 prin1 = prin1 - prinPort1 accumPrin1 = accumPrin1 + prinPort1 accumInt1 = accumInt1 + intPort1 count1 = count1 + 1 IF count1 > 600 THEN EXIT DO LOOP original_int = DisplayCurrency(accumInt1) dim pow, new_mpayment, fmoSave, ftotInt2, closing, fnetSave pow = 1 i = 0 DO WHILE i < (request.form("current_term_length") * 12) pow = pow * (1 + i2) i = i + 1 LOOP new_mpayment = (request.form("current_mortgage_amount") * pow * i2)/(pow - 1) fmoSave = request.form("current_monthly_payment") - new_mpayment ftotInt2 = (new_mpayment * (request.form("current_term_length") * 12)) - request.form("current_mortgage_amount") intSave = accumInt1 - ftotInt2 closing = DisplayCurrency(request.form("closing")/fmoSave) fnetSave = DisplayCurrency(intSave - request.form("closing")) %>ResultsBased on the period of <%=request("current_term_length")%> years, you currently spend <%=DisplayCurrency(request("current_monthly_payment"))%> per month. With your current interest rate at <%=FormatNumber(request("current_interest_rate"))%> you will pay <%=original_int%> in interest charges. If you refinance your mortgage at the interest rate of <%=FormatNumber(request("n_int_rate"))%>, then over the same period you will pay <%=DisplayCurrency(new_mpayment)%> per month and pay a total of <%=DisplayCurrency(ftotInt2)%>. A difference of <%=DisplayCurrency(fmoSave)%> per month and <%=DisplayCurrency(intSave)%> in interest charges. However, when considering the closing costs of <%=DisplayCurrency(closing)%> per month (<%=DisplayCurrency(request("closing"))%> averaged over the life of the mortgage), you need to stay in this new mortgage scenario for at least <%=FormatNumber(request.form("closing")/fmoSave)%> months to offset the cost of closing your current mortgage and your total net savings will be <%=DisplayCurrency(fnetSave)%>. <% ELSE %>Please note: This calculator uses common formulas for calculating total_amount vs. interest payment but actual figures may differ depending on the country you are living in. <% END IF %> <% END IF %> |