{"id":9311,"date":"2025-05-28T08:22:14","date_gmt":"2025-05-28T08:22:14","guid":{"rendered":"https:\/\/jishafinserv.com\/?page_id=9311"},"modified":"2025-05-28T08:22:15","modified_gmt":"2025-05-28T08:22:15","slug":"interest-calculator","status":"publish","type":"page","link":"https:\/\/jishafinserv.com\/jishafinserv\/interest-calculator\/","title":{"rendered":"Interest Calculator"},"content":{"rendered":"\n<div class=\"jumbotron\">\n  <h1 class=\"text-center display-4\">Interest Calculator<\/h1>\n  <hr>\n  <div class=\"container\" id=\"simple-interest\">\n    <h3>Simple Interest<\/h3>\n    <p class=\"lead\">A=i+(prt)<\/p>\n    <form id=\"siForm\">\n      <div class=\"form-group\">\n        <label for=\"principalSimple\">Principal<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"principalSimple\" placeholder=\"Enter amount without rupee sign\">\n      <\/div>\n      <div class=\"form-group\">\n        <label for=\"interestSimple\">Interest Rate<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"interestSimple\" placeholder=\"Example: 12%\">\n      <\/div>\n      <div class=\"form-group\">\n        <label for=\"termSimple\">Term of Loan<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"termSimple\" placeholder=\"Example: 2 (must be in terms of years)\">\n      <\/div>\n      <button type=\"submit\" class=\"btn btn-primary\" id=\"btnSimple\" onclick=\"simpleInterest()\">Submit<\/button>\n    <\/form>\n    <div>\n      <p class=\"lead mt-3\" id=\"siOutput-01\"><\/p>\n      <p class=\"lead mb-3\" id=\"siOutput-02\"><\/p>\n    <\/div>\n    <div class=\"text-center\">\n      <input class=\"btn btn-secondary btn-lg\" type=\"button\" value=\"Reset\" onClick=\"document.getElementById('siForm').reset()\">\n    <\/div>\n  <\/div>\n  <br>\n  <hr>\n  <br>\n  <div class=\"container\" div=\"compound-interest \">\n    <h3>Compound Interest<\/h3>\n    <p class=\"lead\">A=p(1+(r\/n))^(nt)<\/p>\n    <form id=\"ciForm\">\n      <div class=\"form-group\">\n        <label for=\"principalCompound\">Principal<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"principalCompound\" placeholder=\"Enter amount without dollar sign\">\n      <\/div>\n      <div class=\"form-group\">\n        <label for=\"interestCompound\">Interest Rate<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"interestCompound\" placeholder=\"Example: 12%\">\n      <\/div>\n      <div class=\"form-group\">\n        <label for=\"timesCompounded\">Times Compounded per Year<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"timesCompounded\" placeholder=\"Example: 4 (means compounded quarterly)\">\n      <\/div>\n      <div class=\"form-group\">\n        <label for=\"termCompound\">Term of Loan<\/label>\n        <input type=\"text\" class=\"form-control\" id=\"termCompound\" placeholder=\"Example: 2 (must be in terms of years)\">\n      <\/div>\n      <button type=\"submit\" class=\"btn btn-primary\" id=\"btnCompound\" onclick=\"compoundInterest()\">Submit<\/button>\n    <\/form>\n    <div>\n      <p class=\"lead mt-3\" id=\"ciOutput-01\"><\/p>\n      <p class=\"lead mb-3\" id=\"ciOutput-02\"><\/p>\n    <\/div>\n    <div class=\"text-center\">\n      <input class=\"btn btn-secondary btn-lg\" type=\"button\" value=\"Reset\" onClick=\"document.getElementById('ciForm').reset()\">\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\nvar principal = 0;\nvar interestRate = 0;\nvar timesCompounded = 0;\nvar termOfLoan = 0;\nvar amount = 0;\n\nfunction simpleInterest() {\n  event.preventDefault();\n  var principal = parseFloat(document.getElementById(\"principalSimple\").value);\n  var interestRate = parseFloat(document.getElementById(\"interestSimple\").value);\n  interestRate = interestRate \/ 100;\n  var termOfLoan = parseFloat(document.getElementById(\"termSimple\").value);\n  var simpleInt = principal * interestRate * termOfLoan;\n  var amount = (principal + simpleInt).toFixed(2);\n  document.getElementById(\"siOutput-01\").innerHTML = \"Interest: $\" + simpleInt.toFixed(2);\n  document.getElementById(\"siOutput-02\").innerHTML = \"Total plus interest: $\" + amount;\n}\n\nfunction compoundInterest() {\n  event.preventDefault();\n  var principal = parseFloat(document.getElementById(\"principalCompound\").value);\n  var interestRate = parseFloat(document.getElementById(\"interestCompound\").value);\n  interestRate = interestRate \/ 100;\n  var timesCompounded = parseFloat(document.getElementById(\"timesCompounded\").value);\n  var termOfLoan = parseFloat(document.getElementById(\"termCompound\").value);\n  var a = interestRate \/ timesCompounded;\n  var b = 1 + a;\n  var c = timesCompounded * termOfLoan;\n  var d = Math.pow(b, c);\n  var amount = (principal * d).toFixed(2);\n  document.getElementById(\"ciOutput-01\").innerHTML = \"Interest: $\" + (amount - principal).toFixed(2);\n  document.getElementById(\"ciOutput-02\").innerHTML = \"Total plus interest: $\" + amount;\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Interest Calculator Simple Interest A=i+(prt) Principal Interest Rate Term of Loan Submit Compound Interest A=p(1+(r\/n))^(nt) Principal Interest Rate Times Compounded per Year Term of Loan Submit<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-9311","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/pages\/9311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/comments?post=9311"}],"version-history":[{"count":0,"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/pages\/9311\/revisions"}],"wp:attachment":[{"href":"https:\/\/jishafinserv.com\/jishafinserv\/wp-json\/wp\/v2\/media?parent=9311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}