{"id":19623,"date":"2024-09-24T17:18:12","date_gmt":"2024-09-24T11:48:12","guid":{"rendered":"https:\/\/bigbreakingwire.in\/?post_type=tools&p=19623"},"modified":"2024-10-02T15:13:50","modified_gmt":"2024-10-02T09:43:50","slug":"p-e-ratio-calculator","status":"publish","type":"tools","link":"https:\/\/bigbreakingwire.in\/tools\/p-e-ratio-calculator\/","title":{"rendered":"P\/E Ratio Calculator"},"content":{"rendered":"\n\n\n\n \n \n P\/E Ratio Calculator<\/title>\n <style>\n body {\n font-family: Arial, sans-serif;\n }\n\n .pe-ratio-calculator-container {\n max-width: 900px;\n margin: auto;\n background-color: #fff;\n padding: 20px;\n border-radius: 10px;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n }\n\n .pe-ratio-calculator-container h1 {\n text-align: center;\n color: #BA2026;\n margin-bottom: 20px;\n }\n\n .input-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n }\n\n .input-container input[type=\"number\"] {\n width: 70%;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: 5px;\n text-align: right;\n }\n\n .input-container label {\n width: 25%;\n margin-right: 10px;\n }\n\n .result-section {\n margin-top: 20px;\n }\n\n .result-box {\n padding: 20px;\n background-color: #f0f0f0;\n border-radius: 10px;\n text-align: center;\n }\n\n .result-box h3 {\n margin-bottom: 15px;\n color: #BA2026;\n }\n\n button {\n width: 100%;\n padding: 15px;\n background-color: #BA2026;\n color: white;\n border: none;\n border-radius: 5px;\n font-size: 18px;\n cursor: pointer;\n margin-top: 20px;\n }\n\n button:hover {\n background-color: #a6201f;\n }\n <\/style>\n<\/head>\n<body>\n\n <div class=\"pe-ratio-calculator-container\">\n <h1>P\/E Ratio Calculator<\/h1>\n\n <div class=\"input-container\">\n <label for=\"pePrice\">Market Price per Share<\/label>\n <input type=\"number\" id=\"pePrice\" value=\"0\">\n <\/div>\n <div class=\"input-container\">\n <label for=\"peEps\">Earnings per Share (EPS)<\/label>\n <input type=\"number\" id=\"peEps\" value=\"0\">\n <\/div>\n\n <button onclick=\"calculatePERatio()\">Calculate P\/E Ratio<\/button>\n\n <div class=\"result-section\">\n <div class=\"result-box\">\n <h3>Result<\/h3>\n <p id=\"resultOutput\">P\/E Ratio will appear here…<\/p>\n <\/div>\n <\/div>\n <\/div>\n\n <script>\n function calculatePERatio() {\n const price = parseFloat(document.getElementById('pePrice').value);\n const eps = parseFloat(document.getElementById('peEps').value);\n if (eps === 0) {\n document.getElementById('resultOutput').innerText = \"EPS cannot be zero.\";\n return;\n }\n const peRatio = price \/ eps;\n document.getElementById('resultOutput').innerText = `P\/E Ratio: ${peRatio.toFixed(2)}`;\n }\n <\/script>\n\n<\/body>\n<\/html>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>P\/E Ratio Calculator P\/E Ratio Calculator Market Price per Share Earnings per Share (EPS) Calculate P\/E Ratio Result P\/E Ratio will appear here…<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"tools":[],"class_list":["post-19623","tools","type-tools","status-publish","format-standard","hentry","entry","rows"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/tools\/19623"}],"collection":[{"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/tools"}],"about":[{"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/types\/tools"}],"author":[{"embeddable":true,"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/comments?post=19623"}],"version-history":[{"count":0,"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/tools\/19623\/revisions"}],"wp:attachment":[{"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/media?parent=19623"}],"wp:term":[{"taxonomy":"tools","embeddable":true,"href":"https:\/\/bigbreakingwire.in\/wp-json\/wp\/v2\/tools?post=19623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}