{"id":1591,"date":"2024-12-08T14:03:07","date_gmt":"2024-12-08T14:03:07","guid":{"rendered":"https:\/\/donhit.com\/en\/?p=1591"},"modified":"2025-02-07T08:11:04","modified_gmt":"2025-02-07T08:11:04","slug":"body-fat-percentage","status":"publish","type":"post","link":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/","title":{"rendered":"Body Fat Percentage Calculator"},"content":{"rendered":"<p><center><div class=\"calculator-container\">\r\n        <h2 class=\"title\">Body Fat Calculator<\/h2>\r\n        \r\n        <div class=\"gender-selector\">\r\n            <button class=\"gender-btn male\" data-gender=\"male\">Male<\/button>\r\n            <button class=\"gender-btn inactive\" data-gender=\"female\">Female<\/button>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Age:<\/label>\r\n            <input type=\"number\" id=\"age\" placeholder=\"Enter age\" required>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Height:<\/label>\r\n            <div class=\"input-wrapper\">\r\n                <input type=\"number\" id=\"height\" placeholder=\"Enter height\" required>\r\n                <select class=\"unit-select\" id=\"height-unit\">\r\n                    <option value=\"cm\">cm<\/option>\r\n                    <option value=\"inch\">inch<\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Weight:<\/label>\r\n            <div class=\"input-wrapper\">\r\n                <input type=\"number\" id=\"weight\" placeholder=\"Enter weight\" required>\r\n                <select class=\"unit-select\" id=\"weight-unit\">\r\n                    <option value=\"kg\">kg<\/option>\r\n                    <option value=\"lb\">lb<\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Waist Circumference:<\/label>\r\n            <div class=\"input-wrapper\">\r\n                <input type=\"number\" id=\"waist\" placeholder=\"Enter waist circumference\" required>\r\n                <select class=\"unit-select\" id=\"waist-unit\">\r\n                    <option value=\"cm\">cm<\/option>\r\n                    <option value=\"inch\">inch<\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Neck Circumference:<\/label>\r\n            <div class=\"input-wrapper\">\r\n                <input type=\"number\" id=\"neck\" placeholder=\"Enter neck circumference\" required>\r\n                <select class=\"unit-select\" id=\"neck-unit\">\r\n                    <option value=\"cm\">cm<\/option>\r\n                    <option value=\"inch\">inch<\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <div class=\"input-group\" id=\"hip-group\" style=\"display: none;\">\r\n            <label>Hip Circumference:<\/label>\r\n            <div class=\"input-wrapper\">\r\n                <input type=\"number\" id=\"hip\" placeholder=\"Enter hip circumference\" required>\r\n                <select class=\"unit-select\" id=\"hip-unit\">\r\n                    <option value=\"cm\">cm<\/option>\r\n                    <option value=\"inch\">inch<\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <button class=\"calculate-btn\">Calculate Body Fat<\/button>\r\n\r\n        <div id=\"result\" class=\"result\" style=\"display: none;\">\r\n            <div class=\"result-value\" id=\"body-fat-value\"><\/div>\r\n            <div class=\"result-category\" id=\"body-fat-category\"><\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        \/\/ Unit conversion functions\r\n        function convertToStandardUnits(value, unit) {\r\n            switch(unit) {\r\n                case 'inch': return value * 2.54;\r\n                case 'lb': return value * 0.453592;\r\n                default: return value;\r\n            }\r\n        }\r\n\r\n        \/\/ Gender selection\r\n        document.querySelectorAll('.gender-btn').forEach(btn => {\r\n            btn.addEventListener('click', function() {\r\n                document.querySelectorAll('.gender-btn').forEach(b => {\r\n                    b.classList.remove('male', 'female');\r\n                    b.classList.add('inactive');\r\n                });\r\n                this.classList.remove('inactive');\r\n                this.classList.add(this.dataset.gender === 'male' ? 'male' : 'female');\r\n\r\n                const hipGroup = document.getElementById('hip-group');\r\n                hipGroup.style.display = this.dataset.gender === 'female' ? 'flex' : 'none';\r\n            });\r\n        });\r\n\r\n        \/\/ Calculate Body Fat\r\n        document.querySelector('.calculate-btn').addEventListener('click', function() {\r\n            const gender = document.querySelector('.gender-btn:not(.inactive)').dataset.gender;\r\n            const age = parseFloat(document.getElementById('age').value);\r\n            \r\n            const heightValue = parseFloat(document.getElementById('height').value);\r\n            const heightUnit = document.getElementById('height-unit').value;\r\n            const height = convertToStandardUnits(heightValue, heightUnit);\r\n\r\n            const weightValue = parseFloat(document.getElementById('weight').value);\r\n            const weightUnit = document.getElementById('weight-unit').value;\r\n            const weight = convertToStandardUnits(weightValue, weightUnit);\r\n\r\n            const waistValue = parseFloat(document.getElementById('waist').value);\r\n            const waistUnit = document.getElementById('waist-unit').value;\r\n            const waist = convertToStandardUnits(waistValue, waistUnit);\r\n\r\n            const neckValue = parseFloat(document.getElementById('neck').value);\r\n            const neckUnit = document.getElementById('neck-unit').value;\r\n            const neck = convertToStandardUnits(neckValue, neckUnit);\r\n\r\n            let bodyFat;\r\n            if (gender === 'male') {\r\n                bodyFat = 495 \/ (1.0324 - 0.19077 * Math.log10(waist - neck) + 0.15456 * Math.log10(height)) - 450;\r\n            } else {\r\n                const hipValue = parseFloat(document.getElementById('hip').value);\r\n                const hipUnit = document.getElementById('hip-unit').value;\r\n                const hip = convertToStandardUnits(hipValue, hipUnit);\r\n                bodyFat = 495 \/ (1.29579 - 0.35004 * Math.log10(waist + hip - neck) + 0.221 * Math.log10(height)) - 450;\r\n            }\r\n\r\n            const bodyFatPercentage = bodyFat.toFixed(2);\r\n            const category = getBodyFatCategory(gender, parseFloat(bodyFatPercentage));\r\n\r\n            const resultDiv = document.getElementById('result');\r\n            const bodyFatValueDiv = document.getElementById('body-fat-value');\r\n            const bodyFatCategoryDiv = document.getElementById('body-fat-category');\r\n\r\n            bodyFatValueDiv.textContent = `${bodyFatPercentage}%`;\r\n            bodyFatCategoryDiv.textContent = `Category: ${category}`;\r\n            resultDiv.style.display = 'block';\r\n        });\r\n\r\n        function getBodyFatCategory(gender, bodyfatPercentage) {\r\n            if (gender === 'male') {\r\n                if (bodyfatPercentage < 5) return 'Very low (Athlete)';\r\n                if (bodyfatPercentage < 10) return 'Low (Fitness)';\r\n                if (bodyfatPercentage < 15) return 'Average (Healthy)';\r\n                if (bodyfatPercentage < 20) return 'Above average';\r\n                if (bodyfatPercentage < 25) return 'High';\r\n                return 'Very high (Obese)';\r\n            } else {\r\n                if (bodyfatPercentage < 15) return 'Very low (Athlete)';\r\n                if (bodyfatPercentage < 20) return 'Low (Fitness)';\r\n                if (bodyfatPercentage < 25) return 'Average (Healthy)';\r\n                if (bodyfatPercentage < 30) return 'Above average';\r\n                if (bodyfatPercentage < 35) return 'High';\r\n                return 'Very high (Obese)';\r\n            }\r\n        }\r\n    <\/script><\/center><\/p>\n<blockquote><p>See more tips to grow taller at <a href=\"https:\/\/www.nubest.com\/\" target=\"_blank\" rel=\"noopener\">NuBest.com<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>See more tips to grow taller at NuBest.com<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[184],"tags":[],"class_list":["post-1591","post","type-post","status-publish","format-standard","hentry","category-calculator"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Body Fat Percentage Calculator - DonHit<\/title>\n<meta name=\"description\" content=\"Body fat percentage is a crucial metric in health and fitness, representing the proportion of fat compared to total body weight.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Body Fat Percentage Calculator - DonHit\" \/>\n<meta property=\"og:description\" content=\"Body fat percentage is a crucial metric in health and fitness, representing the proportion of fat compared to total body weight.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/\" \/>\n<meta property=\"og:site_name\" content=\"DonHit - World of Tools\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-08T14:03:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T08:11:04+00:00\" \/>\n<meta name=\"author\" content=\"DonHit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DonHit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Body Fat Percentage Calculator - DonHit","description":"Body fat percentage is a crucial metric in health and fitness, representing the proportion of fat compared to total body weight.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/","og_locale":"en_US","og_type":"article","og_title":"Body Fat Percentage Calculator - DonHit","og_description":"Body fat percentage is a crucial metric in health and fitness, representing the proportion of fat compared to total body weight.","og_url":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/","og_site_name":"DonHit - World of Tools","article_published_time":"2024-12-08T14:03:07+00:00","article_modified_time":"2025-02-07T08:11:04+00:00","author":"DonHit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DonHit","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/#article","isPartOf":{"@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/"},"author":{"name":"DonHit","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"headline":"Body Fat Percentage Calculator","datePublished":"2024-12-08T14:03:07+00:00","dateModified":"2025-02-07T08:11:04+00:00","mainEntityOfPage":{"@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/"},"wordCount":19,"commentCount":0,"publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"articleSection":["Calculator"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/","url":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/","name":"Body Fat Percentage Calculator - DonHit","isPartOf":{"@id":"https:\/\/donhit.com\/en\/#website"},"datePublished":"2024-12-08T14:03:07+00:00","dateModified":"2025-02-07T08:11:04+00:00","description":"Body fat percentage is a crucial metric in health and fitness, representing the proportion of fat compared to total body weight.","breadcrumb":{"@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/donhit.com\/en\/calculator\/body-fat-percentage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/donhit.com\/en\/"},{"@type":"ListItem","position":2,"name":"Calculator","item":"https:\/\/donhit.com\/en\/category\/calculator\/"},{"@type":"ListItem","position":3,"name":"Body Fat Percentage Calculator"}]},{"@type":"WebSite","@id":"https:\/\/donhit.com\/en\/#website","url":"https:\/\/donhit.com\/en\/","name":"DonHit - World of tools","description":"","publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/donhit.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148","name":"DonHit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","contentUrl":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","width":400,"height":267,"caption":"DonHit"},"logo":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/"},"description":"DonHit is a website designed to provide useful tools for everyone. Its primary goal is to support and empower the community. All the tools available on the site are completely free to use.","sameAs":["https:\/\/donhit.com\/en"],"url":"https:\/\/donhit.com\/en\/author\/admin_don\/"}]}},"_links":{"self":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/comments?post=1591"}],"version-history":[{"count":4,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1591\/revisions"}],"predecessor-version":[{"id":2067,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1591\/revisions\/2067"}],"wp:attachment":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/media?parent=1591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/categories?post=1591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/tags?post=1591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}