{"id":1835,"date":"2025-01-06T04:54:55","date_gmt":"2025-01-06T04:54:55","guid":{"rendered":"https:\/\/donhit.com\/en\/?p=1835"},"modified":"2025-02-07T09:32:57","modified_gmt":"2025-02-07T09:32:57","slug":"lean-body-mass","status":"publish","type":"post","link":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/","title":{"rendered":"Lean Body Mass Calculator"},"content":{"rendered":"<p><center><div class=\"container123\">\r\n        <h2>Lean Body Mass Calculator<\/h2>\r\n        \r\n        <div class=\"input-section\">\r\n            <div class=\"gender-toggle\">\r\n                <button class=\"gender-btn active\" data-gender=\"male\">Male<\/button>\r\n                <button class=\"gender-btn\" data-gender=\"female\">Female<\/button>\r\n            <\/div>\r\n\r\n            <div class=\"input-group\">\r\n                <label for=\"weight\">Weight (kg)<\/label>\r\n                <input type=\"number\" id=\"weight\" min=\"30\" max=\"300\" step=\"0.1\" placeholder=\"Enter your weight\">\r\n            <\/div>\r\n\r\n            <div class=\"input-group\">\r\n                <label for=\"height\">Height (cm)<\/label>\r\n                <input type=\"number\" id=\"height\" min=\"100\" max=\"250\" step=\"0.1\" placeholder=\"Enter your height\">\r\n            <\/div>\r\n\r\n            <button class=\"calculate-btn\">Calculate LBM<\/button>\r\n\r\n            <p class=\"info-text\">\r\n                Lean Body Mass (LBM) is your total body weight minus your body fat weight. \r\n                This calculator uses the Boer Formula, which is considered one of the most accurate methods \r\n                for estimating LBM.\r\n            <\/p>\r\n        <\/div>\r\n\r\n        <div class=\"result-section\">\r\n            <div class=\"result-card\">\r\n                <h3 class=\"result-title\">Your Lean Body Mass<\/h3>\r\n                <div class=\"result-value\" id=\"lbm-result\">--<\/div>\r\n                <div class=\"result-unit\">kilograms<\/div>\r\n            <\/div>\r\n\r\n            <canvas id=\"bodyCompositionChart\"><\/canvas>\r\n\r\n            <p class=\"info-text\">\r\n                The chart above shows the proportion of lean mass to total body weight. \r\n                Lean body mass typically makes up 60-90% of total body weight, varying by gender and fitness level.\r\n            <\/p>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        document.addEventListener('DOMContentLoaded', () => {\r\n            const genderBtns = document.querySelectorAll('.gender-btn');\r\n            const weightInput = document.getElementById('weight');\r\n            const heightInput = document.getElementById('height');\r\n            const calculateBtn = document.querySelector('.calculate-btn');\r\n            const lbmResult = document.getElementById('lbm-result');\r\n            const canvas = document.getElementById('bodyCompositionChart');\r\n            const ctx = canvas.getContext('2d');\r\n\r\n            \/\/ Set canvas size\r\n            canvas.width = 400;\r\n            canvas.height = 400;\r\n\r\n            let selectedGender = 'male';\r\n\r\n            \/\/ Gender toggle functionality\r\n            genderBtns.forEach(btn => {\r\n                btn.addEventListener('click', () => {\r\n                    genderBtns.forEach(b => b.classList.remove('active'));\r\n                    btn.classList.add('active');\r\n                    selectedGender = btn.dataset.gender;\r\n                });\r\n            });\r\n\r\n            \/\/ Calculate LBM using Boer Formula\r\n            function calculateLBM(weight, height, gender) {\r\n                if (gender === 'male') {\r\n                    return 0.407 * weight + 0.267 * height - 19.2;\r\n                } else {\r\n                    return 0.252 * weight + 0.473 * height - 48.3;\r\n                }\r\n            }\r\n\r\n            \/\/ Draw body composition chart\r\n            function drawChart(totalWeight, lbm) {\r\n                ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n                \r\n                const centerX = canvas.width \/ 2;\r\n                const centerY = canvas.height \/ 2;\r\n                const radius = Math.min(canvas.width, canvas.height) \/ 2.5;\r\n\r\n                \/\/ Draw background circle\r\n                ctx.beginPath();\r\n                ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI);\r\n                ctx.fillStyle = '#f0f0f0';\r\n                ctx.fill();\r\n\r\n                \/\/ Calculate fat mass percentage\r\n                const fatMass = totalWeight - lbm;\r\n                const lbmPercentage = (lbm \/ totalWeight) * 100;\r\n                const lbmAngle = (lbmPercentage \/ 100) * 2 * Math.PI;\r\n\r\n                \/\/ Draw LBM portion\r\n                ctx.beginPath();\r\n                ctx.moveTo(centerX, centerY);\r\n                ctx.arc(centerX, centerY, radius, -Math.PI\/2, lbmAngle - Math.PI\/2);\r\n                ctx.lineTo(centerX, centerY);\r\n                ctx.fillStyle = '#1e3c72';\r\n                ctx.fill();\r\n\r\n                \/\/ Add labels\r\n                ctx.font = '16px Arial';\r\n                ctx.fillStyle = '#333';\r\n                ctx.textAlign = 'center';\r\n                \r\n                \/\/ LBM percentage\r\n                ctx.fillText(`${lbmPercentage.toFixed(1)}% LBM`, centerX, centerY - 20);\r\n                ctx.fillText(`${(100 - lbmPercentage).toFixed(1)}% Fat Mass`, centerX, centerY + 40);\r\n            }\r\n\r\n            \/\/ Calculate button click handler\r\n            calculateBtn.addEventListener('click', () => {\r\n                const weight = parseFloat(weightInput.value);\r\n                const height = parseFloat(heightInput.value);\r\n\r\n                if (!weight || !height) {\r\n                    alert('Please enter valid weight and height values');\r\n                    return;\r\n                }\r\n\r\n                if (weight < 30 || weight > 300) {\r\n                    alert('Please enter a weight between 30 and 300 kg');\r\n                    return;\r\n                }\r\n\r\n                if (height < 100 || height > 250) {\r\n                    alert('Please enter a height between 100 and 250 cm');\r\n                    return;\r\n                }\r\n\r\n                const lbm = calculateLBM(weight, height, selectedGender);\r\n                lbmResult.textContent = lbm.toFixed(1);\r\n                \r\n                \/\/ Animate the result\r\n                lbmResult.style.animation = 'none';\r\n                lbmResult.offsetHeight; \/\/ Trigger reflow\r\n                lbmResult.style.animation = 'fadeIn 0.5s ease-in-out';\r\n\r\n                \/\/ Draw the chart\r\n                drawChart(weight, lbm);\r\n            });\r\n\r\n            \/\/ Add input validation\r\n            [weightInput, heightInput].forEach(input => {\r\n                input.addEventListener('input', (e) => {\r\n                    const value = parseFloat(e.target.value);\r\n                    const min = parseFloat(e.target.min);\r\n                    const max = parseFloat(e.target.max);\r\n\r\n                    if (value < min) e.target.value = min;\r\n                    if (value > max) e.target.value = max;\r\n                });\r\n            });\r\n        });\r\n    <\/script><\/center>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/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-1835","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>Lean Body Mass Calculator - DonHit<\/title>\n<meta name=\"description\" content=\"Lean Body Mass (LBM) is a measure of the body&#039;s non-fat components, including muscles, bones, and organs.\" \/>\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\/lean-body-mass\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lean Body Mass Calculator - DonHit\" \/>\n<meta property=\"og:description\" content=\"Lean Body Mass (LBM) is a measure of the body&#039;s non-fat components, including muscles, bones, and organs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/\" \/>\n<meta property=\"og:site_name\" content=\"DonHit - World of Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-06T04:54:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T09:32:57+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=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lean Body Mass Calculator - DonHit","description":"Lean Body Mass (LBM) is a measure of the body's non-fat components, including muscles, bones, and organs.","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\/lean-body-mass\/","og_locale":"en_US","og_type":"article","og_title":"Lean Body Mass Calculator - DonHit","og_description":"Lean Body Mass (LBM) is a measure of the body's non-fat components, including muscles, bones, and organs.","og_url":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/","og_site_name":"DonHit - World of Tools","article_published_time":"2025-01-06T04:54:55+00:00","article_modified_time":"2025-02-07T09:32:57+00:00","author":"DonHit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DonHit","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/#article","isPartOf":{"@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/"},"author":{"name":"DonHit","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"headline":"Lean Body Mass Calculator","datePublished":"2025-01-06T04:54:55+00:00","dateModified":"2025-02-07T09:32:57+00:00","mainEntityOfPage":{"@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/"},"wordCount":12,"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\/lean-body-mass\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/","url":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/","name":"Lean Body Mass Calculator - DonHit","isPartOf":{"@id":"https:\/\/donhit.com\/en\/#website"},"datePublished":"2025-01-06T04:54:55+00:00","dateModified":"2025-02-07T09:32:57+00:00","description":"Lean Body Mass (LBM) is a measure of the body's non-fat components, including muscles, bones, and organs.","breadcrumb":{"@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/donhit.com\/en\/calculator\/lean-body-mass\/#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":"Lean Body Mass 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\/1835","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=1835"}],"version-history":[{"count":4,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1835\/revisions"}],"predecessor-version":[{"id":2208,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1835\/revisions\/2208"}],"wp:attachment":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/media?parent=1835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/categories?post=1835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/tags?post=1835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}