{"id":479,"date":"2024-05-29T14:54:11","date_gmt":"2024-05-29T14:54:11","guid":{"rendered":"https:\/\/lifestylerepository.com\/?page_id=479"},"modified":"2024-05-31T17:57:27","modified_gmt":"2024-05-31T17:57:27","slug":"profit-percentage-calculator","status":"publish","type":"page","link":"https:\/\/lifestylerepository.com\/index.php\/profit-percentage-calculator\/","title":{"rendered":"Profit Percentage 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>Profit Percentage Calculator<\/title>\n    <link rel=\"stylesheet\" href=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/4.5.2\/css\/bootstrap.min.css\">\n    <style>\n        body {\n            background-color: #f8f9fa;\n        }\n\n        .card {\n            margin-top: 50px;\n        }\n\n        #result {\n            font-size: 1.2rem;\n            font-weight: bold;\n            color: #28a745;\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"container\">\n        <h1 class=\"text-center my-4\">Profit Percentage Calculator<\/h1>\n        <div class=\"card\">\n            <div class=\"card-body\">\n                <form id=\"profitForm\">\n                    <div class=\"form-group\">\n                        <label for=\"costPrice\">Cost Price (in Rupees):<\/label>\n                        <input type=\"number\" step=\"any\" class=\"form-control\" id=\"costPrice\" placeholder=\"Enter Cost Price\" required>\n                    <\/div>\n                    <div class=\"form-group\">\n                        <label for=\"sellingPrice\">Selling Price (in Rupees):<\/label>\n                        <input type=\"number\" step=\"any\" class=\"form-control\" id=\"sellingPrice\" placeholder=\"Enter Selling Price\" required>\n                    <\/div>\n                    <button type=\"submit\" class=\"btn btn-primary\">Calculate<\/button>\n                <\/form>\n                <div class=\"mt-4\">\n                    <h3>Profit Amount and Profit Percentage:<\/h3>\n                    <div id=\"result\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <script src=\"https:\/\/code.jquery.com\/jquery-3.5.1.slim.min.js\"><\/script>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@popperjs\/core@2.5.4\/dist\/umd\/popper.min.js\"><\/script>\n    <script src=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/4.5.2\/js\/bootstrap.min.js\"><\/script>\n    <script>\n        document.getElementById('profitForm').addEventListener('submit', function(event) {\n            event.preventDefault();\n\n            const costPrice = parseFloat(document.getElementById('costPrice').value);\n            const sellingPrice = parseFloat(document.getElementById('sellingPrice').value);\n\n            if (isNaN(costPrice) || isNaN(sellingPrice) || costPrice <= 0) {\n                alert('Please enter valid prices');\n                return;\n            }\n\n            const profit = sellingPrice - costPrice;\n            const profitPercentage = (profit \/ costPrice) * 100;\n\n            document.getElementById('result').innerHTML = `\n                <p>Profit: \u20b9${profit.toFixed(2)}<\/p>\n                <p>Profit Percentage: ${profitPercentage.toFixed(2)}%<\/p>\n            `;\n        });\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Profit Percentage Calculator Profit Percentage Calculator Cost Price (in Rupees): Selling Price (in Rupees): Calculate Profit Amount and Profit Percentage:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"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":"disabled","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":"default","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":""},"_links":{"self":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/479"}],"collection":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":4,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/479\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/pages\/479\/revisions\/509"}],"wp:attachment":[{"href":"https:\/\/lifestylerepository.com\/index.php\/wp-json\/wp\/v2\/media?parent=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}