{"id":146,"date":"2022-11-21T05:02:15","date_gmt":"2022-11-21T05:02:15","guid":{"rendered":"https:\/\/savingscorner.in\/?page_id=146"},"modified":"2023-06-02T05:52:00","modified_gmt":"2023-06-02T05:52:00","slug":"present-value-2","status":"publish","type":"page","link":"https:\/\/savingscorner.in\/index.php\/present-value-2\/","title":{"rendered":"Present Value Calculator"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n  <title>Present Value Calculator<\/title>\n  <style>\n    .container {\n      max-width: 1200px;\n      margin: 0 auto;\n      padding: 20px;\n      \/\/border: 1px solid #ccc;\n      border-radius: 5px;\n    }\n    .form-group {\n      margin-bottom: 10px;\n    }\n    .form-group label {\n      display: block;\n    }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"container\">\n    <h2>Present Value Calculator<\/h2>\n    <div class=\"form-group\">\n      <label for=\"future-value\">Future Value:<\/label>\n      <input type=\"number\" id=\"future-value\" step=\"0.01\" required>\n    <\/div>\n    <div class=\"form-group\">\n      <label for=\"rate\">Annual Interest Rate:<\/label>\n      <input type=\"number\" id=\"rate\" step=\"0.01\" required>\n    <\/div>\n    <div class=\"form-group\">\n      <label for=\"years\">Number of Years:<\/label>\n      <input type=\"number\" id=\"years\" required>\n    <\/div>\n    <div class=\"form-group\">\n      <button onclick=\"calculatePresentValue()\">Calculate<\/button>\n    <\/div>\n    <div class=\"form-group\">\n      <label for=\"present-value\">Present Value:<\/label>\n      <input type=\"text\" id=\"present-value\" readonly>\n    <\/div>\n  <\/div>\n\n  <script>\n    function calculatePresentValue() {\n      var futureValue = parseFloat(document.getElementById('future-value').value);\n      var rate = parseFloat(document.getElementById('rate').value);\n      var years = parseInt(document.getElementById('years').value);\n\n      var discountFactor = 1 \/ Math.pow((1 + (rate \/ 100)), years);\n\n      var presentValue = futureValue * discountFactor;\n      document.getElementById('present-value').value = presentValue.toFixed(2);\n    }\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Present Value Calculator Present Value Calculator Future Value: Annual Interest Rate: Number of Years: Calculate Present Value:<\/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-146","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/pages\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":10,"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/pages\/146\/revisions"}],"predecessor-version":[{"id":1183,"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/pages\/146\/revisions\/1183"}],"wp:attachment":[{"href":"https:\/\/savingscorner.in\/index.php\/wp-json\/wp\/v2\/media?parent=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}