Adolphe Quetelet was a Belgian astronomer and mathematician, not a physician. In 1832, he analyzed population data and noticed that body weight scaled roughly with the square of height. He proposed a simple index: weight divided by height squared. Nearly two centuries later, this formula -- now called the Body Mass Index -- is used by every doctor's office, insurance company, and fitness app on the planet.
As a developer who builds health tools, I find BMI fascinating not because it is a good measure of individual health (it has serious limitations) but because it is an excellent case study in how a simple formula gets adopted, misused, and defended all at the same time.
The Formula
BMI in metric units is straightforward:
BMI = weight (kg) / height (m)^2
For a person who weighs 75 kg and is 1.75 m tall:
BMI = 75 / (1.75)^2
BMI = 75 / 3.0625
BMI = 24.5
The implementation is trivially simple:
def calculate_bmi(weight_kg, height_m):
if height_m <= 0:
raise ValueError("Height must be positive")
return weight_kg / (height_m ** 2)
Two lines of actual logic. And yet this function powers billions of dollars in health policy decisions.
The Classification System
The World Health Organization defines these categories:
BMI Category
< 16.0 Severe Thinness
16.0 - 16.9 Moderate Thinness
17.0 - 18.4 Mild Thinness
18.5 - 24.9 Normal Weight
25.0 - 29.9 Overweight
30.0 - 34.9 Obese Class I
35.0 - 39.9 Obese Class II
>= 40.0 Obese Class III
These thresholds were established based on epidemiological data correlating BMI ranges with mortality risk in large populations. The cutoff points are where mortality risk begins to increase significantly. They were not arbitrary -- but they were derived from predominantly European and North American populations, which matters.
Why Height Is Squared (And Why That Might Be Wrong)
Quetelet squared the height because he was trying to create an index that was independent of height. If you simply divided weight by height, taller people would always appear thinner than shorter people because weight scales with volume (roughly height cubed) while the divisor would only be linear.
By squaring height, Quetelet created an index that was approximately height-independent for people of average build. But "approximately" is doing a lot of work in that sentence.
Research by Nick Trefethen at Oxford suggests that the exponent should be 2.5, not 2:
New BMI = 1.3 x weight (kg) / height (m)^2.5
The current formula systematically overestimates BMI for tall people and underestimates it for short people. A 6'6" person's BMI is inflated; a 5'0" person's BMI is deflated. The 1.3 multiplier is a scaling constant chosen so that the new formula agrees with the old one at average height (approximately 5'7").
The difference is not trivial. For a 6'2" person, the traditional BMI might read 26 (overweight) while the corrected formula gives 24.8 (normal weight).
Implementation Considerations
When building a BMI calculator, there are several engineering decisions that matter:
Input validation. BMI is only meaningful for adults (age 20+). For children and adolescents, BMI must be interpreted using age- and sex-specific percentile charts because body composition changes dramatically during growth.
def calculate_bmi_metric(weight_kg, height_cm, age=None):
if weight_kg <= 0 or height_cm <= 0:
raise ValueError("Weight and height must be positive")
if height_cm < 50 or height_cm > 280:
raise ValueError("Height out of realistic range")
if weight_kg < 10 or weight_kg > 700:
raise ValueError("Weight out of realistic range")
if age is not None and age < 20:
raise ValueError("Adult BMI not applicable under age 20")
height_m = height_cm / 100
bmi = weight_kg / (height_m ** 2)
return round(bmi, 1)
Precision. BMI is typically reported to one decimal place. Reporting more precision than that implies an accuracy that the formula does not possess.
Unit conversion. If you accept height in centimeters (which is more natural for metric users than meters), remember to convert: height_m = height_cm / 100. Off-by-a-factor-of-100 errors turn a normal BMI into an absurdly small number.
Five Limitations Every Developer Should Document
1. BMI does not distinguish fat from muscle. A bodybuilder with 8% body fat and an office worker with 30% body fat can have identical BMIs. The formula only knows weight and height.
2. BMI does not account for fat distribution. Visceral fat (around organs) is far more metabolically dangerous than subcutaneous fat (under the skin). Two people with the same BMI can have vastly different health risk profiles based on where their fat is located. Waist circumference is a better predictor of metabolic risk than BMI.
3. BMI thresholds vary by ethnicity. Asian populations tend to have higher body fat percentages at the same BMI compared to European populations. The WHO suggests lower BMI thresholds for Asian populations: overweight at 23 instead of 25, obese at 27.5 instead of 30.
4. BMI is a population statistic applied to individuals. It was designed to characterize populations, not diagnose individuals. Using it for individual health assessment is a category error that persists because no similarly simple alternative exists.
5. The formula is biased by height. As discussed above, the squared exponent does not perfectly normalize for height, creating systematic errors at the extremes.
When I need to quickly compute BMI in metric units -- whether for testing my own tools, building health dashboards, or just satisfying curiosity -- I use the metric BMI calculator at zovo.one. It applies the standard WHO classification and clearly displays the category boundaries so you can see where the thresholds are.
I am Michael Lip. I build free developer tools at zovo.one. 350+ tools, all private, all free.
Top comments (0)