{"id":55,"date":"2021-03-15T20:00:04","date_gmt":"2021-03-16T00:00:04","guid":{"rendered":"https:\/\/w3mtf.lgbt\/?page_id=55"},"modified":"2025-10-27T19:45:36","modified_gmt":"2025-10-27T23:45:36","slug":"height-to-bmi-table","status":"publish","type":"page","link":"https:\/\/w3mtf.lgbt\/?page_id=55","title":{"rendered":"Height to BMI table"},"content":{"rendered":"\n<p>In my path to GRS, I&#8217;ve been tasked with losing weight&#8230; and something that I wanted but couldn&#8217;t find, was a way to input my height and get out a list of weights and Body Mass Indices&#8230; so I worked out the formula for myself, and now I&#8217;ll make one available here.<\/p>\n\n\n\n<div id=\"input\">\n<table>\n<tbody><tr>\n<td style=\"text-align:left\">Height:<\/td>\n<td>\n  <input id=\"height\" onchange=\"update()\" type=\"number\" value=\"60\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">Units:<\/td>\n<td><select id=\"units\" onchange=\"update()\">\n   <option value=\"703\">Inches\/Pounds<\/option>\n   <option value=\"10000\">cm\/kg<\/option>\n   <\/select><\/td>\n<\/tr>\n<\/tbody><\/table>\n<\/div>\n<div>\n<input type=\"button\" value=\"\u2b06\ufe0f\" onclick=\"base-=5;update()\">\n<div id=\"bmitab\"><\/div>\n<input type=\"button\" value=\"\u2b07\ufe0f\" onclick=\"base+=5;update()\">\n<\/div>\n<script>\n  var base = 25;\n  var length = 11;\n  function update(){\n    var tab = \"<table><tr><th>BMI<\/th><th>Weight<\/th>\";\n    var bmi = base;\n    var scale = document.getElementById(\"units\").value;\n    var height = document.getElementById(\"height\").value\n    for(i=0;i<length;i++){\n      bmi = Math.abs(base + i);\n      weight = Math.floor(bmi * height * height \/ scale * 100)\/100\n      tab += '<tr><td>'+bmi+'<\/td><td>'+weight+'<\/td><\/tr>'\n    }\n    tab +='<\/table>';\n    document.getElementById(\"bmitab\").innerHTML=tab;\n  }\n  update();\n  \n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my path to GRS, I&#8217;ve been tasked with losing weight&#8230; and something that I wanted but couldn&#8217;t find, was a way to input my height and get out a list of weights and Body Mass Indices&#8230; so I worked out the formula for myself, and now I&#8217;ll make one available here. Height: Units: Inches\/Poundscm\/kg<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"class_list":["post-55","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/pages\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":15,"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/pages\/55\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=\/wp\/v2\/pages\/55\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/w3mtf.lgbt\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}