Social Share Buttons
Advertisement
Advertisement
18th Edition (August 5, 2011)
| Body Mass Index (BMI) Calculator |
|
|
| Written by G. Firman MD | ||||||||||||||||||||||||||
| Monday, 23 February 2009 17:46 | ||||||||||||||||||||||||||
|
BMI is body weight divided by a power of height, usually (height)2, which is said to be independent of stature. Calculations based on values for ideal body weight suggest that BMIs for normal men and women should be in the range of 18.5 to 25 kg/m2. Indeed, this range roughly corresponds to the 10th to 75th percentile values recorded from adult individuals. For infants and children, average BMI values change with age, from 13 kg/m2 at birth, to a peak of 18 at about 1 year, a nadir of 15 at about age 6 years, and then a rise to adult values during adolescence. Individuals with high indices are classified as overweight, even obese, and those with subnormal indices as undernourished. However, such classifications cannot be applied, for example, to short muscular men or to tall asthenic women, and despite the sex difference in body fat, the average index is about the same for both sexes during the adolescent and young adult years.
Usage Instructions: To calculate your BMI, enter your weight in pounds in the top box. Next, enter your height in inches. Click on the 'Calculate' button, and your BMI score and class will appear.
var ns4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false; var ie4 = (document.all && !document.getElementById)? true : false; var ie5 = (document.getElementById && document.all)? true : false; var ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false; var w3c = (document.getElementById)? true : false; function bmiCalc(form) { var weight = Number(form.wt.value); var height = Number(form.ht.value); if (!checkNum(weight,"WEIGHT")) { form.wt.select(); form.wt.focus(); return false } if (!checkNum(height,"HEIGHT")) { form.ht.select(); form.ht.focus(); return false } if (form.wu.selectedIndex == 0) { // What units for weight? // 0 = lbs // 1 = kg weight = weight * 0.45359237; // Convert wt (lbs to kg) } var huNum = form.hu.selectedIndex; var hu = form.hu.options[huNum].text; if (hu == "inches") { // if height units are "inches" heightInches = height; heightMeters = height * 2.54 / 100; } if (hu == "cm") { // if height units are "cm" heightInches = height / 2.54; heightMeters = height / 100; } if (hu == "feet") { // if height units are "cm" var inch = Number(form.inch.value); if (!checkNum(inch,"inches")) { form.inch.select(); form.inch.focus(); return false } heightInches = height*12 + inch; heightMeters = heightInches * 2.54 / 100; } if (hu == "meters") { // if height units are "meters" heightInches = height * 100 / 2.54; heightMeters = height; } // var bsa = 0.20247 * Math.pow(heightMeters,0.725) * Math.pow(weight,0.425); var bmi = weight / Math.pow(heightMeters,2); // bsa = rounding(bsa,2); bmi = rounding(bmi,1); minimc=Math.round(heightMeters*heightMeters*18.5); maximc=Math.round(heightMeters*heightMeters*25); minimq=Math.round(heightMeters*heightMeters*18.5/0.45359); maximq=Math.round(heightMeters*heightMeters*25/0.45359); if (bmi < 18.5) {var interp = "Underweight"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } else if (bmi < 25.0) {var interp = "Normal"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } else if (bmi < 30.0) {var interp = "Overweight"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } else if (bmi<35.0) {var interp = "Class I Obesity"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } else if (bmi<40.0) {var interp = "Class II Obesity"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } else {var interp = "Class III Obesity"; form.minimo.value=minimc; form.maximo.value=maximc; form.minim.value=minimq; form.maxim.value=maximq; } /* form.bsa.value = bsa; form.bmi.value = bmi; form.interp.value = interp; */ var bmiText = eval(getLabel("bmiText")); bmiText.innerHTML = bmi + " kg/m2 = " + interp; bmiText.style.display = ''; return true; } function isFeet() { var bmi = document.bmi; var huNum = bmi.hu.selectedIndex; var hu = bmi.hu.options[huNum].text; var inchRow = eval(getLabel("inchRow")); if (hu == "feet") {inchRow.style.display = "";} else {inchRow.style.display = "none"} return true; } function checkNum(val,text) { if ((val == null) || (isNaN(val)) || (val == "") || (val < 0) || (text=="inches" && val>=12)) { if (text=="inches" && val==0) {return true} alert("Please enter a value for " + text + "."); return false } return true; } function checkError(whatVar, varName, varText) { if ((whatVar == "") || (whatVar <= 0) || (isNaN(whatVar))) { alert("Please enter the " + varText + "."); eval("document.bmi." + varName + ".focus();"); eval("document.bmi." + varName + ".select();"); return false; } return true; } function getLabel(nameID) { var whatTag; if (ie4 || w3c) {whatTag = "document.all[\"" + nameID + "\"]";} if (ns6) {whatTag = "document.getElementById(\"" + nameID + "\")";} return whatTag; } function rounding(number,decimal) { multiplier = Math.pow(10,decimal); number = Math.round(number * multiplier) / multiplier; return number }
References:
|
||||||||||||||||||||||||||
| Last Updated on Saturday, 28 January 2012 14:16 | ||||||||||||||||||||||||||
Free Registry
Advertisement
Advertisement
Advertisement
HONcode
verify here
Site Last Modified
Copyright © MedicalCRITERIA.com 2005-2013. All Rights Reserved



