{"id":1401,"date":"2025-03-15T14:59:47","date_gmt":"2025-03-15T14:59:47","guid":{"rendered":"https:\/\/khstrading.com\/?page_id=1401"},"modified":"2026-02-01T16:31:15","modified_gmt":"2026-02-01T16:31:15","slug":"%d8%ad%d8%a7%d8%b3%d8%a8%d8%a9-%d8%a7%d9%84%d8%b1%d8%a8%d8%ad","status":"publish","type":"page","link":"https:\/\/khstrading.com\/en\/%d8%ad%d8%a7%d8%b3%d8%a8%d8%a9-%d8%a7%d9%84%d8%b1%d8%a8%d8%ad\/","title":{"rendered":"Profit Calculator Tool"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"1401\" class=\"elementor elementor-1401\">\n\t\t\t\t<div class=\"elementor-element elementor-element-93ec819 e-flex e-con-boxed e-con e-parent\" data-id=\"93ec819\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-189cfbc elementor-widget elementor-widget-html\" data-id=\"189cfbc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n    body {\n        font-family: Arial, sans-serif;\n        line-height: 1.6;\n        margin: 0;\n        padding: 0;\n        background-color: #f5f5f5;\n        direction: rtl;\n    }\n    .intro {\n        background-color: #fff;\n        padding: 20px;\n        margin: 20px auto;\n        max-width: 600px;\n        border-radius: 8px;\n        box-shadow: 0 0 10px rgba(0,0,0,0.1);\n    }\n    .calculator {\n        max-width: 600px;\n        margin: 20px auto;\n        background-color: #fff;\n        padding: 20px;\n        border-radius: 8px;\n        box-shadow: 0 0 10px rgba(0,0,0,0.1);\n    }\n    h1, h2, h3 {\n        color: #062C47;\n    }\n    .input-group {\n        margin-bottom: 15px;\n    }\n    label {\n        display: block;\n        margin-bottom: 5px;\n        font-weight: bold;\n        color: #333;\n    }\n    input[type=\"number\"], input[type=\"text\"] {\n        width: 100%;\n        padding: 10px;\n        border: 1px solid #ddd;\n        border-radius: 4px;\n        box-sizing: border-box;\n        text-align: right;\n    }\n    button {\n        background-color: #062C47;\n        color: white;\n        border: none;\n        padding: 12px 15px;\n        border-radius: 4px;\n        cursor: pointer;\n        font-size: 16px;\n        width: 100%;\n        transition: background-color 0.3s;\n    }\n    button:hover {\n        background-color: #04223A;\n    }\n    .results {\n        margin-top: 20px;\n        padding: 15px;\n        background-color: #f9f9f9;\n        border-radius: 4px;\n        border-right: 4px solid #062C47;\n    }\n    .results-item {\n        margin-bottom: 10px;\n        padding: 10px;\n        border-bottom: 1px solid #eee;\n    }\n    .results-item:last-child {\n        border-bottom: none;\n        padding-bottom: 0;\n    }\n    .results-label {\n        font-weight: bold;\n        color: #062C47;\n    }\n    .profit-positive {\n        color: #4CAF50;\n        font-weight: bold;\n    }\n    .profit-negative {\n        color: #f44336;\n        font-weight: bold;\n    }\n    .expenses-section {\n        border-top: 1px solid #ddd;\n        padding-top: 15px;\n        margin-top: 15px;\n    }\n    .expense-item {\n        display: flex;\n        margin-bottom: 10px;\n        align-items: center;\n    }\n    .expense-item input {\n        margin-left: 5px;\n    }\n    .expense-item button {\n        width: auto;\n        padding: 8px;\n        background-color: #f44336;\n    }\n    .expense-item button:hover {\n        background-color: #d32f2f;\n    }\n    .add-expense {\n        background-color: #4CAF50;\n        width: auto;\n        margin-top: 10px;\n    }\n    .add-expense:hover {\n        background-color: #3e8e41;\n    }\n    .how-to {\n        background-color: #e9f5ff;\n        padding: 15px;\n        border-radius: 4px;\n        margin-bottom: 20px;\n    }\n    .how-to ol {\n        margin: 10px 25px;\n    }\n    .profit-message {\n        margin-top: 15px;\n        padding: 10px;\n        border-radius: 4px;\n        font-weight: bold;\n        text-align: center;\n    }\n    .profit-message.positive {\n        background-color: #e8f5e9;\n        color: #2e7d32;\n    }\n    .profit-message.negative {\n        background-color: #ffebee;\n        color: #c62828;\n    }\n    \n    \/* Celebration Modal Styles *\/\n    #celebrationModal {\n        display: none;\n        position: fixed;\n        z-index: 1000;\n        left: 0;\n        top: 0;\n        width: 100%;\n        height: 100%;\n        background-color: rgba(0,0,0,0.7);\n        overflow: auto;\n    }\n    \n    .modal-content {\n        background-color: #fefefe;\n        margin: 15% auto;\n        padding: 20px;\n        border: 1px solid #888;\n        width: 80%;\n        max-width: 500px;\n        border-radius: 10px;\n        text-align: center;\n        animation: modalFadeIn 0.5s;\n    }\n    \n    @keyframes modalFadeIn {\n        from {opacity: 0; transform: scale(0.8);}\n        to {opacity: 1; transform: scale(1);}\n    }\n    \n    .close-modal {\n        color: #aaa;\n        float: left;\n        font-size: 28px;\n        font-weight: bold;\n        cursor: pointer;\n    }\n    \n    .close-modal:hover,\n    .close-modal:focus {\n        color: black;\n        text-decoration: none;\n    }\n    \n    .celebration-title {\n        color: #4CAF50;\n        font-size: 24px;\n        margin-bottom: 15px;\n    }\n    \n    .celebration-emoji {\n        font-size: 50px;\n        margin: 20px 0;\n    }\n    \n    \/* Confetti *\/\n    .confetti {\n        position: absolute;\n        width: 10px;\n        height: 10px;\n        opacity: 0;\n    }\n<\/style>\n\n<div class=\"intro\">\n    <h2>Profit Calculator Tool<\/h2>\n    <p>Welcome to the Profit Calculator Tool provided by <strong>for Global Trade<\/strong>, the trusted partner for retailers and wholesalers worldwide.<\/p>\n    \n    <h3>Why Do You Need This Tool<\/h3>\n    <p>In the fast-paced world of trade, every successful merchant needs a precise understanding of profit margins and product-related costs. Our tool is specifically designed to empower you to:<\/p>\n    <ul>\n        <li>Calculate the ideal selling price based on your target profit margin<\/li>\n        <li>Track various expenses (shipping, storage, taxes, and more)<\/li>\n        <li>Accurately determine net profit<\/li>\n        <li>Make informed and effective business decisions<\/li>\n    <\/ul>\n    \n    <div class=\"how-to\">\n        <h3>How to Use<\/h3>\n        <ol>\n            <li>Input the product's cost price<\/li>\n            <li>Set the desired profit percentage<\/li>\n            <li>Add the expenses associated with the product<\/li>\n            <li>Click on \"Calculate Profit\" to view detailed results<\/li>\n        <\/ol>\n    <\/div>\n<\/div>\n\n<div class=\"calculator\">\n    <h2>Profit Calculator<\/h2>\n    \n    <div class=\"input-group\">\n        <label for=\"cost-price\">Cost Price ($):<\/label>\n        <input type=\"number\" id=\"cost-price\" min=\"0\" step=\"0.01\" placeholder=\"Input the cost price\">\n    <\/div>\n    \n    <div class=\"input-group\">\n        <label for=\"markup-percentage\">Profit Margin (%):<\/label>\n        <input type=\"number\" id=\"markup-percentage\" min=\"0\" step=\"0.1\" placeholder=\"Input the profit margin\">\n    <\/div>\n    \n    <div class=\"expenses-section\">\n        <h3>Expenses<\/h3>\n        <div id=\"expenses-list\">\n            <div class=\"expense-item\">\n                <button class=\"remove-expense\">X<\/button>\n                <input type=\"number\" min=\"0\" step=\"0.01\" placeholder=\"Amount\" class=\"expense-amount\">\n                <input type=\"text\" placeholder=\"Expense Name\" class=\"expense-name\">\n            <\/div>\n        <\/div>\n        <button class=\"add-expense\">+ Add Expense<\/button>\n    <\/div>\n    \n    <button id=\"calculate-btn\">Calculate Profit<\/button>\n    \n    <div class=\"results\" id=\"results\" style=\"display: none;\">\n        <h3>\u0627\u0644\u0646\u062a\u0627\u0626\u062c<\/h3>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0633\u0639\u0631 \u0627\u0644\u062a\u0643\u0644\u0641\u0629:<\/span> <span id=\"result-cost-price\">0.00<\/span>\n        <\/div>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0646\u0633\u0628\u0629 \u0627\u0644\u0631\u0628\u062d:<\/span> <span id=\"result-markup-percentage\">0<\/span>%\n        <\/div>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0633\u0639\u0631 \u0627\u0644\u0628\u064a\u0639:<\/span> <span id=\"result-selling-price\">0.00<\/span>\n        <\/div>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0627\u0644\u0631\u0628\u062d \u0627\u0644\u0625\u062c\u0645\u0627\u0644\u064a:<\/span> <span id=\"result-gross-profit\">0.00<\/span>\n        <\/div>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0625\u062c\u0645\u0627\u0644\u064a \u0627\u0644\u0645\u0635\u0627\u0631\u064a\u0641:<\/span> <span id=\"result-total-expenses\">0.00<\/span>\n        <\/div>\n        <div class=\"results-item\">\n            <span class=\"results-label\">\u0635\u0627\u0641\u064a \u0627\u0644\u0631\u0628\u062d:<\/span> <span id=\"result-net-profit\">0.00<\/span>\n            <span id=\"result-profit-percentage\">(0%)<\/span>\n        <\/div>\n        <div class=\"profit-message\" id=\"profit-message\"><\/div>\n    <\/div>\n<\/div>\n\n<!-- Celebration Modal -->\n<div id=\"celebrationModal\">\n    <div class=\"modal-content\">\n        <span class=\"close-modal\">&times;<\/span>\n        <div class=\"celebration-title\">\u0645\u0628\u0631\u0648\u0643!<\/div>\n        <div class=\"celebration-emoji\">\ud83c\udf89 \ud83d\udcb0 \ud83c\udf8a<\/div>\n        <p>\u062a\u0647\u0627\u0646\u064a\u0646\u0627 \u0639\u0644\u0649 \u062a\u062d\u0642\u064a\u0642 \u0627\u0644\u0631\u0628\u062d! \u0627\u0633\u062a\u0645\u0631 \u0641\u064a \u0627\u0644\u0639\u0645\u0644 \u0627\u0644\u062c\u064a\u062f.<\/p>\n        <p>\u0635\u0627\u0641\u064a \u0627\u0644\u0631\u0628\u062d: <span id=\"modal-profit-amount\" class=\"profit-positive\">0.00<\/span><\/p>\n    <\/div>\n<\/div>\n\n<!-- Audio for celebration -->\n<audio id=\"celebrationSound\">\n    <source src=\"https:\/\/assets.mixkit.co\/active_storage\/sfx\/2013\/2013-preview.mp3\" type=\"audio\/mpeg\">\n<\/audio>\n\n<script>\n    document.addEventListener('DOMContentLoaded', function() {\n        const calculateBtn = document.getElementById('calculate-btn');\n        const addExpenseBtn = document.querySelector('.add-expense');\n        const expensesList = document.getElementById('expenses-list');\n        const celebrationModal = document.getElementById('celebrationModal');\n        const closeModal = document.querySelector('.close-modal');\n        const celebrationSound = document.getElementById('celebrationSound');\n        \n        \/\/ Add event listener for Calculate button\n        calculateBtn.addEventListener('click', calculateProfit);\n        \n        \/\/ Add event listener for Add Expense button\n        addExpenseBtn.addEventListener('click', addExpenseField);\n        \n        \/\/ Add event listener for Remove Expense buttons\n        document.addEventListener('click', function(e) {\n            if (e.target && e.target.classList.contains('remove-expense')) {\n                e.target.parentElement.remove();\n            }\n        });\n        \n        \/\/ Close modal when clicking on X\n        closeModal.onclick = function() {\n            celebrationModal.style.display = \"none\";\n        }\n        \n        \/\/ Close modal when clicking outside of it\n        window.onclick = function(event) {\n            if (event.target == celebrationModal) {\n                celebrationModal.style.display = \"none\";\n            }\n        }\n        \n        \/\/ Function to add a new expense field\n        function addExpenseField() {\n            const expenseItem = document.createElement('div');\n            expenseItem.className = 'expense-item';\n            expenseItem.innerHTML = `\n                <button class=\"remove-expense\">X<\/button>\n                <input type=\"number\" min=\"0\" step=\"0.01\" placeholder=\"\u0627\u0644\u0645\u0628\u0644\u063a\" class=\"expense-amount\">\n                <input type=\"text\" placeholder=\"\u0627\u0633\u0645 \u0627\u0644\u0645\u0635\u0631\u0648\u0641\" class=\"expense-name\">\n            `;\n            expensesList.appendChild(expenseItem);\n        }\n        \n        \/\/ Function to show celebration modal\n        function showCelebration(profitAmount) {\n            document.getElementById('modal-profit-amount').textContent = profitAmount;\n            celebrationModal.style.display = \"block\";\n            \n            \/\/ Play celebration sound\n            try {\n                celebrationSound.play();\n            } catch (e) {\n                console.log('Audio playback failed:', e);\n            }\n        }\n        \n        \/\/ Function to calculate profit\n        function calculateProfit() {\n            const costPrice = parseFloat(document.getElementById('cost-price').value) || 0;\n            const markupPercentage = parseFloat(document.getElementById('markup-percentage').value) || 0;\n            \n            \/\/ Calculate selling price\n            const sellingPrice = costPrice * (1 + markupPercentage \/ 100);\n            const grossProfit = sellingPrice - costPrice;\n            \n            \/\/ Calculate total expenses\n            let totalExpenses = 0;\n            const expenseAmounts = document.querySelectorAll('.expense-amount');\n            expenseAmounts.forEach(function(expense) {\n                totalExpenses += parseFloat(expense.value) || 0;\n            });\n            \n            \/\/ Calculate net profit\n            const netProfit = grossProfit - totalExpenses;\n            const profitPercentage = (netProfit \/ costPrice) * 100;\n            \n            \/\/ Display results\n            document.getElementById('result-cost-price').textContent = costPrice.toFixed(2);\n            document.getElementById('result-markup-percentage').textContent = markupPercentage.toFixed(1);\n            document.getElementById('result-selling-price').textContent = sellingPrice.toFixed(2);\n            document.getElementById('result-gross-profit').textContent = grossProfit.toFixed(2);\n            document.getElementById('result-total-expenses').textContent = totalExpenses.toFixed(2);\n            document.getElementById('result-net-profit').textContent = netProfit.toFixed(2);\n            document.getElementById('result-profit-percentage').textContent = ` (${profitPercentage.toFixed(1)}%)`;\n            \n            \/\/ Apply color based on profit\n            const netProfitElement = document.getElementById('result-net-profit');\n            const profitPercentageElement = document.getElementById('result-profit-percentage');\n            const profitMessageElement = document.getElementById('profit-message');\n            \n            if (netProfit > 0) {\n                netProfitElement.className = 'profit-positive';\n                profitPercentageElement.className = 'profit-positive';\n                profitMessageElement.textContent = '\u0645\u0628\u0631\u0648\u0643 \u0647\u0630\u0647 \u0623\u0631\u0628\u0627\u062d\u0643';\n                profitMessageElement.className = 'profit-message positive';\n                \n                \/\/ Show celebration modal with a slight delay\n                setTimeout(function() {\n                    showCelebration(netProfit.toFixed(2));\n                }, 500);\n                \n            } else if (netProfit < 0) {\n                netProfitElement.className = 'profit-negative';\n                profitPercentageElement.className = 'profit-negative';\n                profitMessageElement.textContent = '\u0645\u0639 \u0627\u0644\u0623\u0633\u0641 \u062a\u062c\u0627\u0631\u062a\u0643 \u062e\u0627\u0633\u0631\u0629\u060c \u0639\u0644\u064a\u0643 \u0628\u0632\u064a\u0627\u062f\u0629 \u0647\u0627\u0645\u0634 \u0627\u0644\u0631\u0628\u062d \u0648\u062a\u0642\u0644\u064a\u0644 \u0627\u0644\u0645\u0635\u0627\u0631\u064a\u0641';\n                profitMessageElement.className = 'profit-message negative';\n            } else {\n                netProfitElement.className = '';\n                profitPercentageElement.className = '';\n                profitMessageElement.textContent = '\u0644\u0627 \u0631\u0628\u062d \u0648\u0644\u0627 \u062e\u0633\u0627\u0631\u0629\u060c \u062d\u0627\u0648\u0644 \u0632\u064a\u0627\u062f\u0629 \u0647\u0627\u0645\u0634 \u0627\u0644\u0631\u0628\u062d';\n                profitMessageElement.className = 'profit-message';\n            }\n            \n            \/\/ Show results section\n            document.getElementById('results').style.display = 'block';\n        }\n    });\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>\u0623\u062f\u0627\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0631\u0628\u062d \u0644\u0644\u062a\u062c\u0627\u0631 \u0645\u0631\u062d\u0628\u0627\u064b \u0628\u0643\u0645 \u0641\u064a \u0623\u062f\u0627\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0631\u0628\u062d \u0627\u0644\u0645\u0642\u062f\u0645\u0629 \u0645\u0646 KHS \u0644\u0644\u062a\u062c\u0627\u0631\u0629 \u0627\u0644\u0639\u0627\u0644\u0645\u064a\u0629\u060c \u0627\u0644\u0634\u0631\u064a\u0643 \u0627\u0644\u0645\u0648\u062b\u0648\u0642 \u0644\u062a\u062c\u0627\u0631 \u0627\u0644\u062a\u062c\u0632\u0626\u0629 \u0648\u0627\u0644\u062c\u0645\u0644\u0629 [&hellip;]<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","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":"","ast-disable-related-posts":"","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":"set","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-opacity":"","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-opacity":"","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-opacity":"","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-opacity":"","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-opacity":"","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-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1401","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"KHS for Global Trading","author_link":"https:\/\/khstrading.com\/en\/author\/khstrading\/"},"uagb_comment_info":0,"uagb_excerpt":"\u0623\u062f\u0627\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0631\u0628\u062d \u0644\u0644\u062a\u062c\u0627\u0631 \u0645\u0631\u062d\u0628\u0627\u064b \u0628\u0643\u0645 \u0641\u064a \u0623\u062f\u0627\u0629 \u062d\u0627\u0633\u0628\u0629 \u0627\u0644\u0631\u0628\u062d \u0627\u0644\u0645\u0642\u062f\u0645\u0629 \u0645\u0646 KHS \u0644\u0644\u062a\u062c\u0627\u0631\u0629 \u0627\u0644\u0639\u0627\u0644\u0645\u064a\u0629\u060c \u0627\u0644\u0634\u0631\u064a\u0643 \u0627\u0644\u0645\u0648\u062b\u0648\u0642 \u0644\u062a\u062c\u0627\u0631 \u0627\u0644\u062a\u062c\u0632\u0626\u0629 \u0648\u0627\u0644\u062c\u0645\u0644\u0629 [&hellip;]","_links":{"self":[{"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/pages\/1401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/comments?post=1401"}],"version-history":[{"count":51,"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/pages\/1401\/revisions"}],"predecessor-version":[{"id":3317,"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/pages\/1401\/revisions\/3317"}],"wp:attachment":[{"href":"https:\/\/khstrading.com\/en\/wp-json\/wp\/v2\/media?parent=1401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}