{"id":22,"date":"2024-03-25T09:59:21","date_gmt":"2024-03-25T09:59:21","guid":{"rendered":"https:\/\/calcuconvertonline.com\/?page_id=22"},"modified":"2024-03-27T11:07:41","modified_gmt":"2024-03-27T11:07:41","slug":"loan-repayment-calculator","status":"publish","type":"page","link":"https:\/\/calcuconvertonline.com\/index.php\/loan-repayment-calculator\/","title":{"rendered":"Loan Repayment Calculator"},"content":{"rendered":"\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\"><\/meta>\n  <meta content=\"width=device-width, initial-scale=1.0\" name=\"viewport\"><\/meta>\n  <title>Loan Repayment Calculator<\/title>\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      margin: 0;\n      padding: 0;\n      \n      justify-content: center;\n      align-items: center;\n      height: 100vh;\n      background-color: #e0e6f8; \/* Light blue background *\/\n    }\n\n    .calculator {\n      background-color: #ffffff;\n      padding: 20px;\n      border-radius: 8px;\n      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n      text-align: center;\n    }\n\n    .input-container {\n      margin-bottom: 15px;\n    }\n\n    input {\n      padding: 8px;\n      border-radius: 4px;\n      border: 1px solid #a1c2f6; \/* Light blue border *\/\n    }\n\n    button {\n      padding: 10px 20px;\n      background-color: #007bff; \/* Blue button background *\/\n      color: #fff;\n      border: none;\n      border-radius: 4px;\n      cursor: pointer;\n    }\n\n    button:hover {\n      background-color: #0056b3; \/* Darker blue on hover *\/\n    }\n\n    .result {\n      margin-top: 20px;\n    }\n\n    h1 {\n      color: #0056b3; \/* Dark blue header text *\/\n    }\n\n    h2 {\n      color: #007bff; \/* Blue result text *\/\n    }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"calculator\">\n    <h1>Loan Calculator<\/h1>\n    <div class=\"input-container\">\n      <label for=\"loanAmount\">Loan Amount ($)<\/label>\n      <input id=\"loanAmount\" placeholder=\"Enter loan amount\" type=\"number\" \/>\n    <\/div>\n    <div class=\"input-container\">\n      <label for=\"interestRate\">Annual Interest Rate (%)<\/label>\n      <input id=\"interestRate\" placeholder=\"Enter annual interest rate\" type=\"number\" \/>\n    <\/div>\n    <div class=\"input-container\">\n      <label for=\"loanTerm\">Loan Term (Years)<\/label>\n      <input id=\"loanTerm\" placeholder=\"Enter loan term in years\" type=\"number\" \/>\n    <\/div>\n    <button onclick=\"calculateLoan()\">Calculate<\/button>\n    <div class=\"result\">\n      <h2>Monthly Payment Amount<\/h2>\n      <p id=\"paymentResult\">$0.00<\/p>\n    <\/div>\n  <\/div>\n\n  <script>\n    function calculateLoan() {\n      const loanAmount = parseFloat(document.getElementById('loanAmount').value);\n      const interestRate = parseFloat(document.getElementById('interestRate').value);\n      const loanTerm = parseFloat(document.getElementById('loanTerm').value);\n\n      const totalPayments = loanTerm * 12;\n      const monthlyInterest = (interestRate \/ 100) \/ 12;\n      const x = Math.pow(1 + monthlyInterest, totalPayments);\n      const monthlyPayment = (loanAmount * monthlyInterest * x) \/ (x - 1);\n\n      if (!isNaN(monthlyPayment)) {\n        document.getElementById('paymentResult').innerHTML = `$${monthlyPayment.toFixed(2)}`;\n      } else {\n        document.getElementById('paymentResult').innerHTML = 'Please enter valid inputs';\n      }\n    }\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Loan Repayment Calculator Loan Calculator Loan Amount ($) Annual Interest Rate (%) Loan Term (Years) Calculate Monthly Payment Amount $0.00<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-22","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":2,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions"}],"predecessor-version":[{"id":144,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions\/144"}],"wp:attachment":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/media?parent=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}