{"id":2413,"date":"2026-02-11T00:07:23","date_gmt":"2026-02-10T22:07:23","guid":{"rendered":"https:\/\/bio-me.bio\/?page_id=2413"},"modified":"2026-02-17T20:53:30","modified_gmt":"2026-02-17T18:53:30","slug":"bmi-calculator","status":"publish","type":"page","link":"https:\/\/bio-me.bio\/?page_id=2413","title":{"rendered":"BMI Calculator"},"content":{"rendered":"\n<div class=\"eco-tool wp-block-group\" id=\"eco-tool-bmi-3b8c1\">\n  <div class=\"eco-tool__header\">\n    <h2 class=\"eco-tool__title\">BMI Calculator<\/h2>\n    <p class=\"eco-tool__lead\">\n      Calculate Body Mass Index (BMI) from height and weight. Includes BMI category and a healthy weight range (BMI 18.5\u201324.9).\n    <\/p>\n  <\/div>\n\n  <form class=\"eco-tool__form\" id=\"eco-bmi-form-3b8c1\" novalidate>\n    <div class=\"eco-tool__grid3\">\n      <!-- Units -->\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" for=\"eco-bmi-units-3b8c1\">\n          Units<br>system\n        <\/label>\n        <select class=\"eco-tool__input\" id=\"eco-bmi-units-3b8c1\">\n          <option value=\"metric\" selected>Metric (cm, kg)<\/option>\n          <option value=\"imperial\">Imperial (ft\/in, lb)<\/option>\n        <\/select>\n        <div class=\"eco-tool__hint\">Choose a unit system, then enter height and weight.<\/div>\n      <\/div>\n\n      <!-- Height -->\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" id=\"eco-bmi-hlabel-3b8c1\" for=\"eco-bmi-h1-3b8c1\">\n          Height<br>(cm)\n        <\/label>\n\n        <!-- Metric: one field -->\n        <input class=\"eco-tool__input\" id=\"eco-bmi-h1-3b8c1\" type=\"number\" min=\"0\" step=\"any\" placeholder=\"e.g., 175\" inputmode=\"decimal\" \/>\n\n        <!-- Imperial: two fields -->\n        <div class=\"eco-tool__row\" id=\"eco-bmi-h2row-3b8c1\" style=\"display:none;\">\n          <input class=\"eco-tool__input\" id=\"eco-bmi-ft-3b8c1\" type=\"number\" min=\"0\" step=\"1\" placeholder=\"ft\" inputmode=\"numeric\" \/>\n          <input class=\"eco-tool__input\" id=\"eco-bmi-in-3b8c1\" type=\"number\" min=\"0\" step=\"any\" placeholder=\"in\" inputmode=\"decimal\" \/>\n        <\/div>\n\n        <div class=\"eco-tool__hint\" id=\"eco-bmi-hhint-3b8c1\">Enter your height.<\/div>\n      <\/div>\n\n      <!-- Weight -->\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" id=\"eco-bmi-wlabel-3b8c1\" for=\"eco-bmi-weight-3b8c1\">\n          Weight<br>(kg)\n        <\/label>\n        <input class=\"eco-tool__input\" id=\"eco-bmi-weight-3b8c1\" type=\"number\" min=\"0\" step=\"any\" placeholder=\"e.g., 70\" inputmode=\"decimal\" \/>\n        <div class=\"eco-tool__hint\">Enter your weight.<\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"eco-tool__actions\">\n      <button type=\"button\" class=\"wp-element-button eco-tool__btn\" id=\"eco-bmi-calc-3b8c1\">Calculate<\/button>\n      <button type=\"button\" class=\"wp-element-button eco-tool__btn eco-tool__btn--ghost\" id=\"eco-bmi-reset-3b8c1\">Reset<\/button>\n      <div class=\"eco-tool__error\" id=\"eco-bmi-error-3b8c1\" aria-live=\"polite\"><\/div>\n    <\/div>\n  <\/form>\n\n  <div class=\"eco-tool__result\" id=\"eco-bmi-result-3b8c1\" hidden>\n    <h3 class=\"eco-tool__subtitle\">Result<\/h3>\n\n    <div class=\"eco-tool__cards\">\n      <div class=\"eco-tool__card\">\n        <div class=\"eco-tool__metric-label\">BMI<\/div>\n        <div class=\"eco-tool__metric-value\" id=\"eco-bmi-out-3b8c1\">\u2014<\/div>\n        <div class=\"eco-tool__metric-sub\" id=\"eco-bmi-cat-3b8c1\">\u2014<\/div>\n      <\/div>\n\n      <div class=\"eco-tool__card\">\n        <div class=\"eco-tool__metric-label\">Healthy weight range<\/div>\n        <div class=\"eco-tool__metric-value\" id=\"eco-bmi-range-3b8c1\">\u2014<\/div>\n        <div class=\"eco-tool__metric-sub\">Based on BMI 18.5\u201324.9<\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"eco-tool__card eco-tool__card--wide\">\n      <div class=\"eco-tool__metric-label\">Formula<\/div>\n      <div class=\"eco-tool__metric-sub\" id=\"eco-bmi-eq-3b8c1\">\u2014<\/div>\n    <\/div>\n\n    <p class=\"eco-tool__note\">\n      BMI is a simple screening metric and does not directly measure body fat or health.\n    <\/p>\n  <\/div>\n<\/div>\n\n<style>\n.eco-tool{border:1px solid rgba(0,0,0,.12);border-radius:12px;padding:16px}\n.eco-tool__grid3{display:grid;grid-template-columns:1fr;gap:16px}\n@media (min-width:860px){.eco-tool__grid3{grid-template-columns:1fr 1fr 1fr}}\n.eco-tool__field{display:flex;flex-direction:column;gap:6px}\n.eco-tool__label{font-weight:600}\n.eco-tool__input{height:44px;padding:0 12px;border:1px solid rgba(0,0,0,.2);border-radius:10px;background:#fff;font:inherit;box-sizing:border-box}\n.eco-tool__hint{font-size:.92em;opacity:.78;min-height:38px}\n\n.eco-tool__row{display:grid;grid-template-columns:1fr 1fr;gap:10px}\n\n.eco-tool__actions{display:flex;gap:10px;margin-top:16px;align-items:center;flex-wrap:wrap}\n.eco-tool__btn{padding:10px 22px}\n.eco-tool__btn--ghost{background:transparent!important;border:1px solid rgba(0,0,0,.2)!important}\n.eco-tool__btn--ghost:hover,.eco-tool__btn--ghost:focus{background:rgba(0,0,0,.06)!important;border-color:rgba(0,0,0,.35)!important}\n.eco-tool__error{font-weight:600;min-height:1.2em;flex:1 1 240px}\n\n.eco-tool__result{margin-top:16px}\n.eco-tool__subtitle{margin:0 0 10px}\n.eco-tool__cards{display:grid;gap:10px;grid-template-columns:1fr}\n@media (min-width:860px){.eco-tool__cards{grid-template-columns:1fr 1fr}}\n.eco-tool__card{border:1px solid rgba(0,0,0,.12);border-radius:12px;padding:12px}\n.eco-tool__card--wide{margin-top:10px}\n.eco-tool__metric-label{opacity:.85;font-weight:600}\n.eco-tool__metric-value{font-size:1.6em;font-weight:800;margin-top:6px;line-height:1.1}\n.eco-tool__metric-sub{opacity:.85;margin-top:6px}\n.eco-tool__note{margin-top:10px;opacity:.9}\n<\/style>\n\n<script>\n(function(){\n  const S=\"3b8c1\";\n  const el=(id)=>document.getElementById(id+\"-\"+S);\n\n  const unitsEl=el(\"eco-bmi-units\");\n  const hLabel=el(\"eco-bmi-hlabel\");\n  const h1El=el(\"eco-bmi-h1\");          \/\/ cm\n  const h2Row=el(\"eco-bmi-h2row\");      \/\/ ft\/in wrapper\n  const ftEl=el(\"eco-bmi-ft\");\n  const inEl=el(\"eco-bmi-in\");\n  const wLabel=el(\"eco-bmi-wlabel\");\n  const wEl=el(\"eco-bmi-weight\");\n\n  const calcBtn=el(\"eco-bmi-calc\");\n  const resetBtn=el(\"eco-bmi-reset\");\n  const errEl=el(\"eco-bmi-error\");\n\n  const resEl=el(\"eco-bmi-result\");\n  const outEl=el(\"eco-bmi-out\");\n  const catEl=el(\"eco-bmi-cat\");\n  const rangeEl=el(\"eco-bmi-range\");\n  const eqEl=el(\"eco-bmi-eq\");\n\n  function setError(msg){ errEl.textContent = msg || \"\"; }\n  function fmt(n,d){\n    if(!Number.isFinite(n)) return \"\u2014\";\n    return Number(n).toLocaleString(undefined,{maximumFractionDigits:d});\n  }\n\n  function setUI(){\n    const u = unitsEl.value;\n    if(u === \"metric\"){\n      hLabel.innerHTML = \"Height<br>(cm)\";\n      wLabel.innerHTML = \"Weight<br>(kg)\";\n      h1El.style.display = \"block\";\n      h2Row.style.display = \"none\";\n    } else {\n      hLabel.innerHTML = \"Height<br>(ft \/ in)\";\n      wLabel.innerHTML = \"Weight<br>(lb)\";\n      h1El.style.display = \"none\";\n      h2Row.style.display = \"grid\";\n    }\n    setError(\"\");\n    resEl.hidden = true;\n  }\n\n  function category(bmi){\n    if (bmi < 18.5) return \"Underweight\";\n    if (bmi < 25) return \"Normal weight\";\n    if (bmi < 30) return \"Overweight\";\n    return \"Obesity\";\n  }\n\n  function calculate(){\n    setError(\"\");\n    const u = unitsEl.value;\n\n    let heightM;\n    let weightKg;\n\n    if(u === \"metric\"){\n      const cm = Number(h1El.value);\n      const kg = Number(wEl.value);\n      if(!Number.isFinite(cm) || cm <= 0){ setError(\"Enter a valid height in cm.\"); resEl.hidden=true; return; }\n      if(!Number.isFinite(kg) || kg <= 0){ setError(\"Enter a valid weight in kg.\"); resEl.hidden=true; return; }\n      heightM = cm \/ 100;\n      weightKg = kg;\n    } else {\n      const ft = Number(ftEl.value);\n      const inch = Number(inEl.value);\n      const lb = Number(wEl.value);\n      if(!Number.isFinite(ft) || ft < 0){ setError(\"Enter valid feet.\"); resEl.hidden=true; return; }\n      if(!Number.isFinite(inch) || inch < 0){ setError(\"Enter valid inches.\"); resEl.hidden=true; return; }\n      if(!Number.isFinite(lb) || lb <= 0){ setError(\"Enter a valid weight in lb.\"); resEl.hidden=true; return; }\n\n      const totalIn = (ft * 12) + inch;\n      if(totalIn <= 0){ setError(\"Enter a valid height.\"); resEl.hidden=true; return; }\n\n      heightM = totalIn * 0.0254;\n      weightKg = lb * 0.45359237;\n    }\n\n    const bmi = weightKg \/ (heightM * heightM);\n\n    outEl.textContent = fmt(bmi,2);\n    catEl.textContent = category(bmi);\n\n    \/\/ Healthy range for this height (BMI 18.5\u201324.9)\n    const wMinKg = 18.5 * heightM * heightM;\n    const wMaxKg = 24.9 * heightM * heightM;\n\n    if(u === \"metric\"){\n      rangeEl.textContent = `${fmt(wMinKg,1)} \u2013 ${fmt(wMaxKg,1)} kg`;\n      eqEl.textContent = `BMI = weight(kg) \/ height(m)\u00b2 = ${fmt(weightKg,2)} \/ ${fmt(heightM,3)}\u00b2`;\n    } else {\n      const wMinLb = wMinKg \/ 0.45359237;\n      const wMaxLb = wMaxKg \/ 0.45359237;\n      rangeEl.textContent = `${fmt(wMinLb,1)} \u2013 ${fmt(wMaxLb,1)} lb`;\n      eqEl.textContent = `BMI = weight(kg) \/ height(m)\u00b2 (converted from lb and ft\/in)`;\n    }\n\n    resEl.hidden = false;\n  }\n\n  function reset(){\n    unitsEl.value = \"metric\";\n    h1El.value = \"\";\n    ftEl.value = \"\";\n    inEl.value = \"\";\n    wEl.value = \"\";\n    setError(\"\");\n    resEl.hidden = true;\n    setUI();\n  }\n\n  unitsEl.addEventListener(\"change\", setUI);\n  calcBtn.addEventListener(\"click\", calculate);\n  resetBtn.addEventListener(\"click\", reset);\n\n  setUI();\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>BMI Calculator Calculate Body Mass Index (BMI) from height and weight. Includes BMI category and a healthy weight range (BMI 18.5\u201324.9). Unitssystem Metric (cm, kg)Imperial (ft\/in, lb) Choose a unit&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":2457,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"_links":{"self":[{"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/pages\/2413"}],"collection":[{"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bio-me.bio\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2413"}],"version-history":[{"count":1,"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/pages\/2413\/revisions"}],"predecessor-version":[{"id":2414,"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/pages\/2413\/revisions\/2414"}],"up":[{"embeddable":true,"href":"https:\/\/bio-me.bio\/index.php?rest_route=\/wp\/v2\/pages\/2457"}],"wp:attachment":[{"href":"https:\/\/bio-me.bio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}