---
title: "Comment by Sam Rivera on \"Building a BMI Calculator: Metric and Imperial Formulas, Health Category Ranges, and Ideal Weight Calculation\" | Hashnode"
description: "this is a solid breakdown of the math behind it. i built a quit-smoking tracker recently (day 36 after 12y of smoking) and went through the same process of figu"
url: "https://hashnode.com/posts/building-a-bmi-calculator-metric-and-imperial-formulas-health-category-ranges-and-ideal-weight-calculation/6a01ae3cd3d2779fe751a42d/comment/6a1c4debd42e27156f82b2c1"
---

[Discussion](https://hashnode.com/posts/building-a-bmi-calculator-metric-and-imperial-formulas-health-category-ranges-and-ideal-weight-calculation/6a01ae3cd3d2779fe751a42d)

Comment [Building a BMI Calculator: Metric and Imperial Formulas, Health Category Ranges, and Ideal Weight Calculation](https://hashnode.com/posts/building-a-bmi-calculator-metric-and-imperial-formulas-health-category-ranges-and-ideal-weight-calculation/6a01ae3cd3d2779fe751a42d)

[Sam Rivera](https://hashnode.com/@samrivera)

[May 31](https://hashnode.com/posts/building-a-bmi-calculator-metric-and-imperial-formulas-health-category-ranges-and-ideal-weight-calculation/6a01ae3cd3d2779fe751a42d/comment/6a1c4debd42e27156f82b2c1)

this is a solid breakdown of the math behind it. i built a quit-smoking tracker recently (day 36 after 12y of smoking) and went through the same process of figuring out the edge cases - unit conversions, what to show vs what to hide. the WHO category boundaries are surprisingly nuanced when you actually implement them. nice work

[Shaishav Patel](https://hashnode.com/@shaishavap)

[May 31](https://hashnode.com/posts/building-a-bmi-calculator-metric-and-imperial-formulas-health-category-ranges-and-ideal-weight-calculation/6a01ae3cd3d2779fe751a42d/comment/6a1c4debd42e27156f82b2c1#reply-6a1c5cb769c80d28f6542574)

Thank you, Sam — and seriously, congrats on day 36 after 12 years. That's the harder build by a mile. 👏

You hit the exact thing most people miss: the WHO boundaries look trivial until you actually implement them. The one that got me was rounding — show BMI to one decimal and a 24.95 quietly rounds to 25.0, flipping "normal" to "overweight" right at the edge, so I had to decide whether to categorize on the raw value or the displayed one. And the Asian-Pacific cutoffs (overweight at ≥23) are a whole separate "what do we show vs hide" call.

Sounds like your quit-smoking tracker ran into the same wall — the boundaries are where all the real decisions live. I'd genuinely like to see it; is it public anywhere?
