BMI calculator

Introduction

Body mass index is a popular indicator of weight health based on height.

BMI calculator

This form can help you calculate your BMI:

Mass (in kilograms):
Height (in centimeters):

Based on your given information:

Your BMI is: [exec]
$mass = $_GET[‘mass’];
$height = $_GET[‘height’];
$bmi = number_format($mass/pow($height/100,2) ,2);
echo ‘‘.$bmi.’. ‘;

if ($bmi<16) { echo 'You are severely underweight.’; }
else if ($bmi<18.5) { echo 'You are underweight.’; }
else if ($bmi<25) { echo 'You are normal.’; }
else if ($bmi<30) { echo 'You are overweight.’; }
else { echo ‘You are obese.’; }
[/exec]

The ideal weight range for your height is between: [exec]
$mass = $_GET[‘mass’];
$height = $_GET[‘height’];
$bmi = number_format($mass/pow($height/100,2) ,2);
echo ‘‘.number_format(18.5*pow($height/100,2),0).’kg and ‘.number_format(25*pow($height/100,2),0).’kg‘;
[/exec]

Example height/weight combinations: