{"id":1873,"date":"2025-01-09T15:28:21","date_gmt":"2025-01-09T15:28:21","guid":{"rendered":"https:\/\/donhit.com\/en\/?p=1873"},"modified":"2025-02-07T09:39:07","modified_gmt":"2025-02-07T09:39:07","slug":"rmr","status":"publish","type":"post","link":"https:\/\/donhit.com\/en\/calculator\/rmr\/","title":{"rendered":"RMR Calculator"},"content":{"rendered":"<p><center><div class=\"container123\">\r\n        <h2>RMR Calculator Tool<\/h2>\r\n        <form id=\"rmrForm\">\r\n            <div class=\"input-group\">\r\n                <label for=\"age\">Age (15-80 years)<\/label>\r\n                <input type=\"number\" id=\"age\" min=\"15\" max=\"80\" required>\r\n                <div class=\"error\" id=\"ageError\">Please enter a valid age between 15 and 80<\/div>\r\n            <\/div>\r\n\r\n            <div class=\"input-group\">\r\n                <label for=\"gender\">Gender<\/label>\r\n                <select id=\"gender\" required>\r\n                    <option value=\"\">Select gender<\/option>\r\n                    <option value=\"male\">Male<\/option>\r\n                    <option value=\"female\">Female<\/option>\r\n                <\/select>\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\" required>\r\n                <div class=\"error\" id=\"weightError\">Please enter a valid weight between 30 and 300 kg<\/div>\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=\"130\" max=\"230\" required>\r\n                <div class=\"error\" id=\"heightError\">Please enter a valid height between 130 and 230 cm<\/div>\r\n            <\/div>\r\n\r\n            <button type=\"submit\">Calculate RMR<\/button>\r\n        <\/form>\r\n\r\n        <div class=\"result\" id=\"result\">\r\n            <h2>Your Resting Metabolic Rate<\/h2>\r\n            <p id=\"rmrValue\">0<\/p>\r\n            <div class=\"note\">\r\n                This is the estimated number of calories your body burns at rest to maintain basic life functions.\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        const form = document.getElementById('rmrForm');\r\n        const result = document.getElementById('result');\r\n        const rmrValue = document.getElementById('rmrValue');\r\n\r\n        \/\/ Input validation functions\r\n        function validateAge(age) {\r\n            const ageError = document.getElementById('ageError');\r\n            if (age < 15 || age > 80) {\r\n                ageError.style.display = 'block';\r\n                return false;\r\n            }\r\n            ageError.style.display = 'none';\r\n            return true;\r\n        }\r\n\r\n        function validateWeight(weight) {\r\n            const weightError = document.getElementById('weightError');\r\n            if (weight < 30 || weight > 300) {\r\n                weightError.style.display = 'block';\r\n                return false;\r\n            }\r\n            weightError.style.display = 'none';\r\n            return true;\r\n        }\r\n\r\n        function validateHeight(height) {\r\n            const heightError = document.getElementById('heightError');\r\n            if (height < 130 || height > 230) {\r\n                heightError.style.display = 'block';\r\n                return false;\r\n            }\r\n            heightError.style.display = 'none';\r\n            return true;\r\n        }\r\n\r\n        \/\/ Calculate RMR using the Mifflin-St Jeor Equation\r\n        function calculateRMR(weight, height, age, gender) {\r\n            \/\/ Convert height to meters for BMI calculation\r\n            const heightInMeters = height \/ 100;\r\n            \r\n            \/\/ Calculate BMI\r\n            const bmi = weight \/ (heightInMeters * heightInMeters);\r\n            \r\n            \/\/ Base RMR calculation\r\n            let rmr = (10 * weight) + (6.25 * height) - (5 * age);\r\n            \r\n            \/\/ Gender adjustment\r\n            if (gender === 'male') {\r\n                rmr += 5;\r\n            } else {\r\n                rmr -= 161;\r\n            }\r\n            \r\n            \/\/ BMI adjustment (slight modification for extreme BMIs)\r\n            if (bmi < 18.5) {\r\n                rmr *= 0.95; \/\/ Reduce RMR for underweight individuals\r\n            } else if (bmi > 30) {\r\n                rmr *= 1.05; \/\/ Increase RMR for obese individuals\r\n            }\r\n            \r\n            return Math.round(rmr);\r\n        }\r\n\r\n        \/\/ Form submission handler\r\n        form.addEventListener('submit', function(e) {\r\n            e.preventDefault();\r\n            \r\n            const age = parseFloat(document.getElementById('age').value);\r\n            const gender = document.getElementById('gender').value;\r\n            const weight = parseFloat(document.getElementById('weight').value);\r\n            const height = parseFloat(document.getElementById('height').value);\r\n\r\n            \/\/ Validate all inputs\r\n            const isValid = validateAge(age) && \r\n                          validateWeight(weight) && \r\n                          validateHeight(height) &&\r\n                          gender !== '';\r\n\r\n            if (isValid) {\r\n                const rmr = calculateRMR(weight, height, age, gender);\r\n                rmrValue.textContent = `${rmr} calories\/day`;\r\n                result.classList.add('show');\r\n\r\n                \/\/ Smooth scroll to result\r\n                result.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\r\n            }\r\n        });\r\n\r\n        \/\/ Real-time validation\r\n        document.getElementById('age').addEventListener('input', function() {\r\n            validateAge(this.value);\r\n        });\r\n\r\n        document.getElementById('weight').addEventListener('input', function() {\r\n            validateWeight(this.value);\r\n        });\r\n\r\n        document.getElementById('height').addEventListener('input', function() {\r\n            validateHeight(this.value);\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-1873","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>RMR Calculator - DonHit<\/title>\n<meta name=\"description\" content=\"By using data such as age, weight, height, and gender, this tool helps provide a personalized overview of your body\u2019s energy requirements.\" \/>\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\/rmr\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RMR Calculator - DonHit\" \/>\n<meta property=\"og:description\" content=\"By using data such as age, weight, height, and gender, this tool helps provide a personalized overview of your body\u2019s energy requirements.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/donhit.com\/en\/calculator\/rmr\/\" \/>\n<meta property=\"og:site_name\" content=\"DonHit - World of Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-09T15:28:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T09:39:07+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":"RMR Calculator - DonHit","description":"By using data such as age, weight, height, and gender, this tool helps provide a personalized overview of your body\u2019s energy requirements.","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\/rmr\/","og_locale":"en_US","og_type":"article","og_title":"RMR Calculator - DonHit","og_description":"By using data such as age, weight, height, and gender, this tool helps provide a personalized overview of your body\u2019s energy requirements.","og_url":"https:\/\/donhit.com\/en\/calculator\/rmr\/","og_site_name":"DonHit - World of Tools","article_published_time":"2025-01-09T15:28:21+00:00","article_modified_time":"2025-02-07T09:39:07+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\/rmr\/#article","isPartOf":{"@id":"https:\/\/donhit.com\/en\/calculator\/rmr\/"},"author":{"name":"DonHit","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"headline":"RMR Calculator","datePublished":"2025-01-09T15:28:21+00:00","dateModified":"2025-02-07T09:39:07+00:00","mainEntityOfPage":{"@id":"https:\/\/donhit.com\/en\/calculator\/rmr\/"},"wordCount":9,"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\/rmr\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/donhit.com\/en\/calculator\/rmr\/","url":"https:\/\/donhit.com\/en\/calculator\/rmr\/","name":"RMR Calculator - DonHit","isPartOf":{"@id":"https:\/\/donhit.com\/en\/#website"},"datePublished":"2025-01-09T15:28:21+00:00","dateModified":"2025-02-07T09:39:07+00:00","description":"By using data such as age, weight, height, and gender, this tool helps provide a personalized overview of your body\u2019s energy requirements.","breadcrumb":{"@id":"https:\/\/donhit.com\/en\/calculator\/rmr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/donhit.com\/en\/calculator\/rmr\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/donhit.com\/en\/calculator\/rmr\/#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":"RMR 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\/1873","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=1873"}],"version-history":[{"count":3,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1873\/revisions"}],"predecessor-version":[{"id":2232,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1873\/revisions\/2232"}],"wp:attachment":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/media?parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/categories?post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/tags?post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}