{"id":10764,"date":"2025-06-10T15:31:25","date_gmt":"2025-06-10T13:31:25","guid":{"rendered":"https:\/\/thorr-vinci.fr\/home-loan-simulator\/"},"modified":"2025-06-22T19:30:27","modified_gmt":"2025-06-22T17:30:27","slug":"home-loan-simulator","status":"publish","type":"page","link":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/","title":{"rendered":"Home loan simulator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"10764\" class=\"elementor elementor-10764 elementor-10578\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-abd907f e-flex e-con-boxed e-con e-parent\" data-id=\"abd907f\" 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-29f50f1 elementor-widget elementor-widget-heading\" data-id=\"29f50f1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Home loan simulator<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c25127a elementor-widget elementor-widget-html\" data-id=\"c25127a\" 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<!-- 1) STYLES (CSS) -->\n<style>\n  \/* Container g\u00e9n\u00e9ral *\/\n  #loan-simulator {\n    max-width: 900px;\n    margin: 40px auto;\n    font-family: 'Roboto', sans-serif;\n    color: #333;\n  }\n  #loan-simulator h2 {\n    text-align: center;\n    font-size: 28px;\n    margin-bottom: 30px;\n  }\n\n  \/* Grille sliders + carte r\u00e9sultat *\/\n  .simu-grid {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 30px;\n    justify-content: space-between;\n  }\n  .controls,\n  .result-card {\n    flex: 1 1 300px;\n    box-sizing: border-box;\n  }\n\n  \/* Labels et inputs *\/\n  .controls label {\n    display: block;\n    margin: 15px 0 5px;\n    font-size: 14px;\n  }\n  .controls label strong {\n    font-weight: 600;\n  }\n  .controls input[type=range] {\n    -webkit-appearance: none;\n    width: 100%;\n    height: 6px;\n    border-radius: 4px;\n    background: #eee;\n    margin-bottom: 5px;\n  }\n  .controls input[type=range]::-webkit-slider-thumb,\n  .controls input[type=range]::-moz-range-thumb {\n    width: 18px;\n    height: 18px;\n    border-radius: 50%;\n    background: #ff9900;\n    cursor: pointer;\n    border: none;\n  }\n  .controls input[type=number] {\n    width: 100%;\n    padding: 6px 8px;\n    border: 1px solid #ddd;\n    border-radius: 4px;\n    font-size: 14px;\n    margin-top: 5px;\n  }\n\n  \/* Carte de r\u00e9sultat *\/\n  .result-card {\n    background: #fff;\n    border-radius: 12px;\n    padding: 24px;\n    box-shadow: 0 4px 12px rgba(0,0,0,0.05);\n  }\n  .result-card h3 {\n    font-size: 16px;\n    color: #666;\n    margin: 0 0 10px;\n    font-weight: 500;\n  }\n  .result-card .big {\n    font-size: 48px;\n    font-weight: 700;\n    color: #ff9900;\n    margin: 5px 0 20px;\n  }\n  .result-card p {\n    margin: 6px 0;\n    font-size: 14px;\n  }\n  .result-card small {\n    color: #999;\n    font-size: 12px;\n  }\n  .result-card a.btn {\n    display: block;\n    text-align: center;\n    width: 100%;\n    margin-top: 20px;\n    background: #AA8353;\n    color: #fff;\n    font-weight: 600;\n    border: none;\n    border-radius: 6px;\n    padding: 12px 0;\n    cursor: pointer;\n    font-size: 16px;\n    text-decoration: none;\n  }\n\n  \/* Conteneur fixe pour le graphique *\/\n  .chart-container {\n    position: relative;\n    width: 100%;\n    height: 260px; \/* hauteur fixe pour \u00e9viter redimensionnement infini *\/\n    margin-top: 40px;\n  }\n<\/style>\n\n<!-- 2) HTML -->\n<div id=\"loan-simulator\">\n  <h2>Calculate your monthly mortgage payments<\/h2>\n\n  <div class=\"simu-grid\">\n    <!-- Contr\u00f4les -->\n    <div class=\"controls\">\n      <label>I borrow <strong><span id=\"amountValue\">\u20ac955,000<\/span><\/strong><\/label>\n      <input type=\"range\" id=\"amount\" min=\"10000\" max=\"2000000\" step=\"5000\" value=\"955000\">\n      <input type=\"number\" id=\"amountInput\" min=\"10000\" max=\"2000000\" step=\"5000\" value=\"955000\">\n\n      <label>Over <strong><span id=\"durationValue\">15<\/span> years<\/strong><\/label>\n      <input type=\"range\" id=\"duration\" min=\"1\" max=\"30\" step=\"1\" value=\"15\">\n\n      <label>Interest rate before negotiation (%)<\/label>\n      <input type=\"number\" id=\"interestRate\" step=\"0.01\" min=\"0\" max=\"10\" value=\"3.38\">\n\n      <label>Insurance rate (%)<\/label>\n      <input type=\"number\" id=\"insuranceRate\" step=\"0.01\" min=\"0\" max=\"5\" value=\"0.34\">\n    <\/div>\n\n    <!-- Carte r\u00e9sultat -->\n    <div class=\"result-card\">\n      <h3>Your monthly payment will be<\/h3>\n      <div class=\"big\"><span id=\"monthlyPayment\">0<\/span> \u20ac<\/div>\n\n      <p><strong>Loan amount:<\/strong> <span id=\"loanAmount\">\u20ac0<\/span> <\/p>\n      <p>\n        <strong>Your monthly payment:<\/strong> <span id=\"monthlyWithInsurance\">\u20ac0\/month<\/span><br> <small>including insurance: <span id=\"monthlyInsurance\">\u20ac0\/month<\/span><\/small>\n      <\/p>\n      <p>\n        <strong>Total cost of credit:<\/strong> <span id=\"totalCost\">\u20ac0<\/span><br> <small>including insurance: <span id=\"totalInsurance\">\u20ac0<\/span><\/small>\n      <\/p>\n\n      <a href=\"#\" id=\"simuButton\" class=\"btn\">...<\/a>\n    <\/div>\n  <\/div>\n\n  <!-- Graphique -->\n  <div class=\"chart-container\">\n    <canvas id=\"creditChart\"><\/canvas>\n  <\/div>\n<\/div>\n\n<!-- 3) SCRIPTS (JS + Chart.js) -->\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js\"><\/script>\n<script>\n  \/\/ Utils\n  function formatEuro(n) {\n    return n.toLocaleString('fr-FR');\n  }\n  function parseDecimal(val) {\n    return parseFloat(val.toString().replace(',', '.')) || 0;\n  }\n\n  \/\/ Texte bouton en fonction de la langue de la page\n  const btnTexts = {\n    fr: \"J\u2019obtiens mon cr\u00e9dit\",\n    en: \"Get My Loan\",\n    de: \"Ich erhalte meinen Kredit\"\n  };\n  const pageLang = document.documentElement.lang.slice(0,2);\n  const btn = document.getElementById(\"simuButton\");\n  btn.textContent = btnTexts[pageLang] || btnTexts.fr;\n  btn.href = \"https:\/\/thorr-vinci.as.me\/\";\n\n  \/\/ Synchronisation slider ? input nombre\n  const amountSlider = document.getElementById(\"amount\");\n  const amountInput  = document.getElementById(\"amountInput\");\n  amountSlider.addEventListener('input', ()=> {\n    amountInput.value = amountSlider.value;\n    calculate();\n  });\n  amountInput.addEventListener('input', ()=> {\n    let v = parseDecimal(amountInput.value);\n    if(v < +amountSlider.min) v = +amountSlider.min;\n    if(v > +amountSlider.max) v = +amountSlider.max;\n    amountSlider.value = v;\n    calculate();\n  });\n\n  \/\/ Calcul + mise \u00e0 jour DOM\n  function calculate() {\n    const amount = +amountSlider.value;\n    const duration = +document.getElementById(\"duration\").value;\n    const rate = parseDecimal(document.getElementById(\"interestRate\").value) \/ 100;\n    const insRate = parseDecimal(document.getElementById(\"insuranceRate\").value) \/ 100;\n\n    document.getElementById(\"amountValue\").textContent = formatEuro(amount);\n    document.getElementById(\"durationValue\").textContent = duration;\n\n    const mRate = rate \/ 12;\n    const months = duration * 12;\n    const base = (amount * mRate) \/ (1 - Math.pow(1 + mRate, -months));\n    const insMonthly = amount * insRate \/ 12;\n    const totalM = base + insMonthly;\n    const totalCost = totalM * months;\n    const totalIns = insMonthly * months;\n\n    document.getElementById(\"loanAmount\").textContent = formatEuro(amount);\n    document.getElementById(\"monthlyWithInsurance\").textContent = formatEuro(Math.round(totalM));\n    document.getElementById(\"monthlyInsurance\").textContent = formatEuro(Math.round(insMonthly));\n    document.getElementById(\"monthlyPayment\").textContent = formatEuro(Math.round(totalM));\n    document.getElementById(\"totalCost\").textContent = formatEuro(Math.round(totalCost));\n    document.getElementById(\"totalInsurance\").textContent = formatEuro(Math.round(totalIns));\n\n    updateChart(amount, rate, insRate);\n  }\n\n  \/\/ Chart.js\n  const ctx = document.getElementById('creditChart').getContext('2d');\n  const creditChart = new Chart(ctx, {\n    type: 'bar',\n    data: {\n      labels: ['10 ans','15 ans','20 ans','25 ans'],\n      datasets: [\n        {\n          label: 'Mensualit\u00e9',\n          yAxisID: 'y1',\n          backgroundColor: '#ff9900',\n          borderRadius: 4,\n          data: []\n        },\n        {\n          label: 'Co\u00fbt total du cr\u00e9dit',\n          type: 'line',\n          yAxisID: 'y2',\n          borderColor: '#bbb',\n          backgroundColor: '#bbb',\n          tension: 0.3,\n          data: []\n        }\n      ]\n    },\n    options: {\n      responsive: true,\n      maintainAspectRatio: false,\n      scales: {\n        y1: { type: 'linear', position: 'left', title: { display: true, text: 'Mensualit\u00e9 (\u20ac)' }, beginAtZero: true },\n        y2: { type: 'linear', position: 'right', title: { display: true, text: 'Co\u00fbt total du cr\u00e9dit (\u20ac)' }, beginAtZero: true, grid: { drawOnChartArea: false } }\n      },\n      plugins: { legend: { position: 'top' } }\n    }\n  });\n\n  function updateChart(amount, rate, insRate) {\n    const mens = [], costs = [];\n    [10,15,20,25].forEach(d => {\n      const m = d*12, mr = rate\/12;\n      const base = (amount*mr)\/(1-Math.pow(1+mr,-m));\n      const insM = amount*insRate\/12;\n      mens.push(Math.round(base+insM));\n      costs.push(Math.round((base+insM)*m));\n    });\n    creditChart.data.datasets[0].data = mens;\n    creditChart.data.datasets[1].data = costs;\n    creditChart.update();\n  }\n\n  \/\/ Listeners & init\n  document.querySelectorAll('#duration, #interestRate, #insuranceRate')\n          .forEach(el => el.addEventListener('input', calculate));\n  calculate();\n<\/script>\n\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>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Calculate your monthly mortgage payments I borrow \u20ac955,000 Over 15 years Interest rate before negotiation (%) Insurance rate (%) Your monthly payment will be 0 \u20ac Loan amount: \u20ac0 Your monthly payment: \u20ac0\/month including insurance: \u20ac0\/month Total cost of credit: \u20ac0 including insurance: \u20ac0 &#8230;<\/p>\n","protected":false},"author":246468333,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-10764","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Home loan simulator - Thorr &amp; Vinci<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Home loan simulator - Thorr &amp; Vinci\" \/>\n<meta property=\"og:description\" content=\"Calculate your monthly mortgage payments I borrow \u20ac955,000 Over 15 years Interest rate before negotiation (%) Insurance rate (%) Your monthly payment will be 0 \u20ac Loan amount: \u20ac0 Your monthly payment: \u20ac0\/month including insurance: \u20ac0\/month Total cost of credit: \u20ac0 including insurance: \u20ac0 &#8230;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/\" \/>\n<meta property=\"og:site_name\" content=\"Thorr &amp; Vinci\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=61560036033282\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-22T17:30:27+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/\",\"url\":\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/\",\"name\":\"Home loan simulator - Thorr &amp; Vinci\",\"isPartOf\":{\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#website\"},\"datePublished\":\"2025-06-10T13:31:25+00:00\",\"dateModified\":\"2025-06-22T17:30:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/thorr-vinci.fr\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home loan simulator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#website\",\"url\":\"https:\/\/thorr-vinci.fr\/en\/\",\"name\":\"Thorr & Vinci\",\"description\":\"Un R\u00eave ? Une Envie ?\",\"publisher\":{\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/thorr-vinci.fr\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#organization\",\"name\":\"Thorr & Vinci\",\"url\":\"https:\/\/thorr-vinci.fr\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/thorr-vinci.fr\/wp-content\/uploads\/2024\/06\/THORR-VINCI-LOGO-DORE-AVEC-1-BARRE-SITE-1.png\",\"contentUrl\":\"https:\/\/thorr-vinci.fr\/wp-content\/uploads\/2024\/06\/THORR-VINCI-LOGO-DORE-AVEC-1-BARRE-SITE-1.png\",\"width\":1880,\"height\":314,\"caption\":\"Thorr & Vinci\"},\"image\":{\"@id\":\"https:\/\/thorr-vinci.fr\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/profile.php?id=61560036033282\",\"https:\/\/www.instagram.com\/thorr.vinci\",\"https:\/\/www.linkedin.com\/company\/103995994\/admin\/feed\/posts\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Home loan simulator - Thorr &amp; Vinci","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/","og_locale":"en_US","og_type":"article","og_title":"Home loan simulator - Thorr &amp; Vinci","og_description":"Calculate your monthly mortgage payments I borrow \u20ac955,000 Over 15 years Interest rate before negotiation (%) Insurance rate (%) Your monthly payment will be 0 \u20ac Loan amount: \u20ac0 Your monthly payment: \u20ac0\/month including insurance: \u20ac0\/month Total cost of credit: \u20ac0 including insurance: \u20ac0 &#8230;","og_url":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/","og_site_name":"Thorr &amp; Vinci","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=61560036033282","article_modified_time":"2025-06-22T17:30:27+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/","url":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/","name":"Home loan simulator - Thorr &amp; Vinci","isPartOf":{"@id":"https:\/\/thorr-vinci.fr\/en\/#website"},"datePublished":"2025-06-10T13:31:25+00:00","dateModified":"2025-06-22T17:30:27+00:00","breadcrumb":{"@id":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/thorr-vinci.fr\/en\/home-loan-simulator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/thorr-vinci.fr\/en\/"},{"@type":"ListItem","position":2,"name":"Home loan simulator"}]},{"@type":"WebSite","@id":"https:\/\/thorr-vinci.fr\/en\/#website","url":"https:\/\/thorr-vinci.fr\/en\/","name":"Thorr & Vinci","description":"Un R\u00eave ? Une Envie ?","publisher":{"@id":"https:\/\/thorr-vinci.fr\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thorr-vinci.fr\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/thorr-vinci.fr\/en\/#organization","name":"Thorr & Vinci","url":"https:\/\/thorr-vinci.fr\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thorr-vinci.fr\/en\/#\/schema\/logo\/image\/","url":"https:\/\/thorr-vinci.fr\/wp-content\/uploads\/2024\/06\/THORR-VINCI-LOGO-DORE-AVEC-1-BARRE-SITE-1.png","contentUrl":"https:\/\/thorr-vinci.fr\/wp-content\/uploads\/2024\/06\/THORR-VINCI-LOGO-DORE-AVEC-1-BARRE-SITE-1.png","width":1880,"height":314,"caption":"Thorr & Vinci"},"image":{"@id":"https:\/\/thorr-vinci.fr\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/profile.php?id=61560036033282","https:\/\/www.instagram.com\/thorr.vinci","https:\/\/www.linkedin.com\/company\/103995994\/admin\/feed\/posts\/"]}]}},"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PgC4Kk-2NC","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/pages\/10764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/users\/246468333"}],"replies":[{"embeddable":true,"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/comments?post=10764"}],"version-history":[{"count":3,"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/pages\/10764\/revisions"}],"predecessor-version":[{"id":10841,"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/pages\/10764\/revisions\/10841"}],"wp:attachment":[{"href":"https:\/\/thorr-vinci.fr\/en\/wp-json\/wp\/v2\/media?parent=10764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}