{"id":2440,"date":"2025-08-12T14:35:38","date_gmt":"2025-08-12T18:35:38","guid":{"rendered":"https:\/\/sanimortgage.com\/?page_id=2440"},"modified":"2025-08-12T14:39:05","modified_gmt":"2025-08-12T18:39:05","slug":"first-time-buyer-2-2","status":"publish","type":"page","link":"https:\/\/sanimortgage.com\/fa\/first-time-buyer-2-2\/","title":{"rendered":"Refinance Calculator"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"2440\" class=\"elementor elementor-2440\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b6e9766 e-flex e-con-boxed e-con e-parent\" data-id=\"b6e9766\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-823a96d elementor-widget elementor-widget-html\" data-id=\"823a96d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  \/* Reuse the existing styles from the mortgage calculator *\/\n  .refinance-calculator {\n    display: flex;\n    gap: 40px;\n    width: 100%;\n    box-sizing: border-box;\n    padding: 20px 0;\n  }\n\n  \/* Left column: Refinance Inputs *\/\n  .refinance-inputs {\n    flex: 1 1 50%;\n    background: #fff;\n    border-radius: 25px;\n    padding: 30px 35px;\n    box-shadow: 0 10px 30px rgba(0,0,0,0.1);\n    box-sizing: border-box;\n    min-width: 0;\n  }\n  .refinance-inputs h2 {\n    font-weight: 700;\n    margin-bottom: 25px;\n    color: #007a3e;\n    text-align: center;\n    font-size: 28px;\n  }\n  .refinance-inputs label {\n    font-weight: 600;\n    margin-top: 18px;\n    display: block;\n    margin-bottom: 6px;\n    color: #333;\n    font-size: 15px;\n  }\n  .refinance-inputs input[type=\"number\"],\n  .refinance-inputs select {\n    width: 100%;\n    padding: 11px 14px;\n    font-size: 16px;\n    border: 1.8px solid #ccc;\n    border-radius: 10px;\n    transition: border-color 0.3s ease;\n    box-sizing: border-box;\n  }\n  .refinance-inputs input[type=\"number\"]:focus,\n  .refinance-inputs select:focus {\n    border-color: #007a3e;\n    outline: none;\n  }\n  .refinance-inputs .row {\n    display: flex;\n    gap: 20px;\n    margin-top: 12px;\n    flex-wrap: wrap;\n  }\n  .refinance-inputs .row > div {\n    flex: 1 1 200px;\n    min-width: 140px;\n  }\n  .refinance-inputs button {\n    margin-top: 30px;\n    width: 100%;\n    padding: 14px;\n    font-size: 18px;\n    font-weight: 700;\n    color: white;\n    background-color: #007a3e;\n    border: none;\n    border-radius: 10px;\n    cursor: pointer;\n    transition: background-color 0.3s ease;\n  }\n  .refinance-inputs button:hover {\n    background-color: #005b28;\n  }\n\n  \/* Right column: Refinance Results *\/\n  .refinance-results {\n    flex: 1 1 50%;\n    background-color: #e6f4ea;\n    border-radius: 25px;\n    padding: 30px 35px;\n    box-sizing: border-box;\n    color: #005b28;\n    font-weight: 700;\n    font-size: 18px;\n    display: flex;\n    flex-direction: column;\n    justify-content: flex-start;\n    gap: 20px;\n    min-width: 0;\n  }\n  .refinance-results p {\n    margin: 0;\n  }\n\n  \/* Large estimated savings at top center *\/\n  .estimated-savings-large {\n    font-size: 60px;\n    text-align: center;\n    font-weight: 900;\n    color: #004b1a;\n  }\n\n  \/* Label + value row *\/\n  .result-row {\n    display: flex;\n    justify-content: space-between;\n    font-size: 20px;\n    padding: 6px 0;\n    border-bottom: 1px solid #b5d6b4;\n  }\n\n  \/* Responsive for mobile *\/\n  @media (max-width: 760px) {\n    .refinance-calculator {\n      flex-direction: column;\n      gap: 25px;\n    }\n    .refinance-inputs, .refinance-results {\n      flex: none;\n      width: 100%;\n      min-width: auto;\n    }\n    .estimated-savings-large {\n      font-size: 60px;\n    }\n  }\n<\/style>\n\n<div class=\"refinance-calculator\" role=\"main\" aria-label=\"\u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0648 \u0646\u062a\u0627\u06cc\u062c \u0628\u0627\u0632\u067e\u0631\u062f\u0627\u062e\u062a\">\n  <form class=\"refinance-inputs\" role=\"form\" aria-label=\"\u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u067e\u0631\u062f\u0627\u062e\u062a \u0628\u0627\u0632\u067e\u0631\u062f\u0627\u062e\u062a\" onsubmit=\"return false;\" action=\"\">\n    <h2>\u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u067e\u0631\u062f\u0627\u062e\u062a \u0628\u0627\u0632\u067e\u0631\u062f\u0627\u062e\u062a<\/h2>\n\n    <label for=\"current-mortgage-balance\">\u0645\u0627\u0646\u062f\u0647 \u0648\u0627\u0645 \u0645\u0633\u06a9\u0646 \u0641\u0639\u0644\u06cc (\u062f\u0644\u0627\u0631)<\/label>\n    <input type=\"number\" id=\"current-mortgage-balance\" min=\"0\" step=\"0.01\" value=\"300000\" required aria-required=\"true\" \/>\n\n    <label for=\"current-monthly-payment\">\u067e\u0631\u062f\u0627\u062e\u062a \u0645\u0627\u0647\u0627\u0646\u0647 \u0641\u0639\u0644\u06cc (\u062f\u0644\u0627\u0631)<\/label>\n    <input type=\"number\" id=\"current-monthly-payment\" min=\"0\" step=\"0.01\" value=\"1500\" required aria-required=\"true\" \/>\n\n    <label for=\"current-home-value\">\u0627\u0631\u0632\u0634 \u0641\u0639\u0644\u06cc \u062e\u0627\u0646\u0647 (\u062f\u0644\u0627\u0631)<\/label>\n    <input type=\"number\" id=\"current-home-value\" min=\"0\" step=\"0.01\" value=\"400000\" required aria-required=\"true\" \/>\n\n    <label for=\"credit-profile\">\u0645\u0634\u062e\u0635\u0627\u062a \u0627\u0639\u062a\u0628\u0627\u0631\u06cc<\/label>\n    <select id=\"credit-profile\" aria-required=\"true\">\n      <option value=\"excellent\">\u0639\u0627\u0644\u06cc (750+)<\/option>\n      <option value=\"good\">\u062e\u0648\u0628 (\u06f7\u06f0\u06f0\u2013\u06f7\u06f4\u06f9)<\/option>\n      <option value=\"fair\">\u0645\u0646\u0635\u0641\u0627\u0646\u0647 (\u06f6\u06f5\u06f0\u2013\u06f6\u06f9\u06f9)<\/option>\n      <option value=\"poor\">\u0636\u0639\u06cc\u0641 (\u0632\u06cc\u0631 \u06f6\u06f5\u06f0)<\/option>\n    <\/select>\n\n    <button id=\"calculate-btn\" type=\"button\" aria-label=\"\u0645\u062d\u0627\u0633\u0628\u0647 \u062a\u0627\u0645\u06cc\u0646 \u0645\u0627\u0644\u06cc \u0645\u062c\u062f\u062f\">\u0645\u062d\u0627\u0633\u0628\u0647 \u06a9\u0646\u06cc\u062f<\/button>\n  <input type=\"hidden\" name=\"trp-form-language\" value=\"fa\"\/><\/form>\n\n  <section class=\"refinance-results\" aria-live=\"polite\" aria-atomic=\"true\" aria-label=\"\u0646\u062a\u0627\u06cc\u062c \u0645\u062d\u0627\u0633\u0628\u0647 \u0628\u0627\u0632\u067e\u0631\u062f\u0627\u062e\u062a\">\n    <div class=\"estimated-savings-large\" id=\"estimated-savings-large\">$0<\/div>\n    <div class=\"result-row\">\n      <div>\u067e\u0631\u062f\u0627\u062e\u062a \u0645\u0627\u0647\u0627\u0646\u0647 \u062c\u062f\u06cc\u062f \u062a\u062e\u0645\u06cc\u0646\u06cc<\/div>\n      <div id=\"new-monthly-payment\">$0<\/div>\n    <\/div>\n    <div class=\"result-row\">\n      <div>\u0635\u0631\u0641\u0647\u200c\u062c\u0648\u06cc\u06cc \u062a\u062e\u0645\u06cc\u0646\u06cc \u0628\u0647\u0631\u0647 \u062f\u0631 \u0637\u0648\u0644 \u0645\u062f\u062a<\/div>\n      <div id=\"interest-savings\">$0<\/div>\n    <\/div>\n    <div class=\"result-row\">\n      <div>\u0645\u062f\u062a \u0648\u0627\u0645 \u062a\u062e\u0645\u06cc\u0646\u06cc<\/div>\n      <div id=\"loan-term\">0 Years<\/div>\n    <\/div>\n  <\/section>\n<\/div>\n\n<script>\n  const currentMortgageBalanceInput = document.getElementById('current-mortgage-balance');\n  const currentMonthlyPaymentInput = document.getElementById('current-monthly-payment');\n  const currentHomeValueInput = document.getElementById('current-home-value');\n  const creditProfileSelect = document.getElementById('credit-profile');\n  const calculateBtn = document.getElementById('calculate-btn');\n\n  const newMonthlyPaymentSpan = document.getElementById('new-monthly-payment');\n  const interestSavingsSpan = document.getElementById('interest-savings');\n  const loanTermSpan = document.getElementById('loan-term');\n  const estimatedSavingsLarge = document.getElementById('estimated-savings-large');\n\n  function formatCurrency(num) {\n    return num.toLocaleString('en-CA', { style: 'currency', currency: 'CAD', minimumFractionDigits: 0, maximumFractionDigits: 0 });\n  }\n\n  function getCreditProfileMultiplier(profile) {\n    switch(profile) {\n      case 'excellent': return 0.8;\n      case 'good': return 0.9;\n      case 'fair': return 1.0;\n      case 'poor': return 1.1;\n      default: return 1.0;\n    }\n  }\n\n  function calculateRefinance() {\n    const currentMortgageBalance = parseFloat(currentMortgageBalanceInput.value);\n    const currentMonthlyPayment = parseFloat(currentMonthlyPaymentInput.value);\n    const currentHomeValue = parseFloat(currentHomeValueInput.value);\n    const creditProfile = creditProfileSelect.value;\n\n    const creditProfileMultiplier = getCreditProfileMultiplier(creditProfile);\n\n    const newLoanAmount = currentMortgageBalance;\n    const newInterestRate = 0.03; \/\/ Example: 3% interest rate\n    const newLoanTerm = 25; \/\/ Example: 25-year term\n\n    const monthlyInterestRate = newInterestRate \/ 12;\n    const numberOfPayments = newLoanTerm * 12;\n\n    const newMonthlyPayment = (newLoanAmount * monthlyInterestRate) \/ (1 - Math.pow(1 + monthlyInterestRate, -numberOfPayments));\n    const totalInterestPaid = newMonthlyPayment * numberOfPayments - newLoanAmount;\n    const interestSavings = totalInterestPaid * creditProfileMultiplier;\n\n    estimatedSavingsLarge.textContent = formatCurrency(interestSavings);\n    newMonthlyPaymentSpan.textContent = formatCurrency(newMonthlyPayment);\n    interestSavingsSpan.textContent = formatCurrency(interestSavings);\n    loanTermSpan.textContent = `${newLoanTerm} Years`;\n  }\n\n  calculateBtn.addEventListener('click', calculateRefinance);\n\n  \/\/ Calculate once on page load with default values\n  window.addEventListener('DOMContentLoaded', calculateRefinance);\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-126fca1 elementor-widget elementor-widget-text-editor\" data-id=\"126fca1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u062a\u0648\u062c\u0647: *\u062a\u0645\u0627\u0645 \u0627\u0639\u062f\u0627\u062f \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u062f\u0631 \u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0641\u0648\u0642 \u062a\u062e\u0645\u06cc\u0646\u06cc \u0647\u0633\u062a\u0646\u062f \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0633\u062a\u0647 \u0628\u0647 \u0634\u0631\u0627\u06cc\u0637 \u0645\u062a\u0641\u0627\u0648\u062a \u0628\u0627\u0634\u0646\u062f.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Refinance Payment Calculator Current Mortgage Balance ($) Current Monthly Payment ($) Current Home Value ($) Credit Profile Excellent (750+)Good (700\u2013749)Fair (650\u2013699)Poor (below 650) Calculate $0 Estimated New Monthly Payment $0 Estimated Interest Savings Over Term $0 Estimated Loan Term 0 Years NOTE: *All provided numbers in the above calculator are estimated and can vary based [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2440","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/pages\/2440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/comments?post=2440"}],"version-history":[{"count":4,"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/pages\/2440\/revisions"}],"predecessor-version":[{"id":2447,"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/pages\/2440\/revisions\/2447"}],"wp:attachment":[{"href":"https:\/\/sanimortgage.com\/fa\/wp-json\/wp\/v2\/media?parent=2440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}