{"id":2102,"date":"2023-11-04T15:05:35","date_gmt":"2023-11-04T20:05:35","guid":{"rendered":"http:\/\/mikecleaver.net\/?page_id=2102"},"modified":"2023-11-11T14:37:51","modified_gmt":"2023-11-11T20:37:51","slug":"mortgage-calculator","status":"publish","type":"page","link":"https:\/\/mikecleaver.net\/?page_id=2102","title":{"rendered":"Mortgage calculator"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Mortgage Calculator<\/title>\n<\/head>\n<body>\n\n<h3>Mortgage Estimate Calculator<\/h3>\n\n<form id=\"mortgageCalculator\">\n    <label for=\"loanAmount\">Loan Amount ($):<\/label>\n    <input type=\"number\" id=\"loanAmount\" required><br>\n\n    <label for=\"downPayment\">Down Payment ($):<\/label>\n    <input type=\"number\" id=\"downPayment\" required><br>\n\n    <label for=\"interestRate\">Annual Interest Rate (%):<\/label>\n    <input type=\"number\" step=\"0.1\" id=\"interestRate\" required><br>\n\n    <label for=\"propertyTax\">Annual Property Tax ($):<\/label>\n    <input type=\"number\" id=\"propertyTax\" required><br>\n\n    <label for=\"insurance\">Annual Home Insurance ($):<\/label>\n    <input type=\"number\" id=\"insurance\" required><br>\n\n    <label for=\"loanTerm\">Loan Term (Years):<\/label>\n    <input type=\"number\" id=\"loanTerm\" required><br>\n\n    <button type=\"button\" onclick=\"calculateMonthlyPayment()\">Calculate Monthly Payment<\/button>\n\n    <h3>Monthly Payment:<\/h3>\n    <div id=\"result\"><\/div>\n<\/form>\n\n<script>\n    function calculateMonthlyPayment() {\n        var loanAmount = parseFloat(document.getElementById('loanAmount').value);\n        var downPayment = parseFloat(document.getElementById('downPayment').value);\n        var interestRate = parseFloat(document.getElementById('interestRate').value);\n        var propertyTax = parseFloat(document.getElementById('propertyTax').value);\n        var insurance = parseFloat(document.getElementById('insurance').value);\n        var loanTerm = parseInt(document.getElementById('loanTerm').value);\n\n        \/\/ Calculate monthly payment using the formula\n        var loanAmountAfterDownPayment = loanAmount - downPayment;\n        var monthlyInterestRate = interestRate \/ 100 \/ 12;\n        var numPayments = loanTerm * 12;\n        var monthlyPayment = (loanAmountAfterDownPayment * monthlyInterestRate) \/\n            (1 - Math.pow(1 + monthlyInterestRate, -numPayments));\n        monthlyPayment += (propertyTax + insurance) \/ 12;\n\n        \/\/ Display the result\n        document.getElementById('result').innerHTML = '$' + monthlyPayment.toFixed(2);\n    }\n<\/script>\n\n\n<H4> This is only an estimate of monthly payments to give you an idea of what your monthly payment may be. <\/H4>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Mortgage Calculator Mortgage Estimate Calculator Loan Amount ($): Down Payment ($): Annual Interest Rate (%): Annual Property Tax ($): Annual Home Insurance ($): Loan Term (Years): Calculate Monthly Payment Monthly Payment: This is only an estimate of monthly payments to give you an idea of what your monthly payment may be.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-2102","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/pages\/2102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikecleaver.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2102"}],"version-history":[{"count":12,"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/pages\/2102\/revisions"}],"predecessor-version":[{"id":2135,"href":"https:\/\/mikecleaver.net\/index.php?rest_route=\/wp\/v2\/pages\/2102\/revisions\/2135"}],"wp:attachment":[{"href":"https:\/\/mikecleaver.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}