BMI calculator
70 kg at 175 cm gives a BMI of 22.9, inside the WHO normal range of 18.5 up to 25. Enter weight and height in metric or imperial units and get your body mass index with its adult weight category. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Weight
- 70 metric
- Height
- 175
- Body mass index
- 22.9 metric
Computes body mass index and its WHO weight category from a required weight and height, in either metric or imperial units, with configurable rounding.
How BMI is worked out
Body mass index compares weight with height squared. In metric units, height in centimetres is turned into metres and weight in kilograms is divided by that figure squared: 70 kg at 1.75 m gives 22.9. In imperial units, weight in pounds is divided by height in inches squared and multiplied by 703. The result is rounded, to one decimal by default and up to four if you prefer, and then placed in a World Health Organization band: below 18.5 underweight, 18.5 up to 25 normal, 25 up to 30 overweight, and 30 or more obesity.
What BMI does not tell you
BMI is a screening ratio for populations, not a diagnosis. It cannot tell muscle from fat, so a lean, heavily muscled person can land in the overweight or even the obesity band while carrying little fat. The bands are set for adults, so they do not fit children, pregnant people or athletes well. A frequent slip is mixing systems, such as kilograms with inches: choose metric or imperial first and enter both values in that system. Only the ratio and its band are given, so interpreting them for your health is a job for a professional.
The formula and the categories
dev.bmi computes body mass index from two required fields, weight and height, using one of two formulas selected by the unit parameter. In metric mode (the default) height in centimetres is divided by 100 to give metres and BMI equals weight in kilograms divided by that height squared; in imperial mode BMI equals weight in pounds divided by height in inches squared, multiplied by the constant 703.
The rounded BMI is then classified by fixed World Health Organization thresholds: below 18.5 returns underweight, 18.5 up to but not including 25 returns normal, 25 up to 30 returns overweight, and 30 or above returns obesity.
What BMI does and does not tell you
BMI is a population screening ratio, not a diagnosis. It does not distinguish muscle from fat, so a lean, heavily muscled body can score in the overweight or obesity band while carrying little fat, and the thresholds are calibrated for adults rather than children, pregnant people or athletes. The capability reflects this by returning only the ratio and its band, leaving clinical interpretation to a professional.
What you can do with it
Health and fitness forms
Show a live BMI and its WHO category beside a height and weight field in an intake or gym signup form.
Metric and imperial in one embed
Serve a single calculator to both audiences by switching the unit parameter between metric and imperial.
FAQ
Which formula does it use?
Metric BMI is weight in kg over height in metres squared; imperial is weight in lb over height in inches squared times 703, chosen by the unit parameter.
How are the weight categories decided?
By WHO thresholds on the rounded BMI: under 18.5 underweight, under 25 normal, under 30 overweight, 30 or above obesity.
Is this a medical diagnosis?
No. BMI is a screening ratio that ignores body composition and is calibrated for adults; interpret results with a professional.
Can I use pounds and inches?
Yes. Choose imperial units: weight in pounds is divided by height in inches squared and the result is multiplied by 703. The default metric mode uses kilograms and centimetres instead.
Why can a value just under 25 be shown as overweight?
Because the category is decided from the rounded BMI, not the raw figure. If your value rounds to exactly 25.0, it falls in the overweight band, which matches the number you see on screen.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/bmi \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"weight":70,"height":175}'const res = await fetch("https://api.kit.forhosting.com/dev/bmi", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"weight": 70,
"height": 175
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/bmi",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"weight": 70,
"height": 175
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/bmi", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"weight":70,"height":175}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"weight":70,"height":175}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/bmi", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"weight": 70,
"height": 175
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.bmi",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The formula and the categories
The response echoes bmi, category, unit, weight and height, so the band and the exact numbers that produced it always travel together in one JSON object.
Inputs, rounding and validation
The decimals parameter is an integer between 0 and 4 (default 1) that controls how the raw ratio is rounded. Because the thresholds are compared against the rounded bmi rather than the raw ratio, a number that rounds up to exactly 25.0 lands in the overweight band, matching what the page displays. The unit parameter accepts only metric or imperial and defaults to metric; any other string returns a typed invalid_input error. Both weight and height must be finite numbers strictly greater than zero, and their absolute value must not exceed 1e6, which blocks nonsensical or overflow-prone payloads before any division runs.
Integration use cases
Bulk cohort scoring
Call the API over a spreadsheet of members or patients to append bmi and category columns in one pass.
Technical questions
How is the result rounded?
By an explicit half-up rule to the number of decimals you set (0 to 4, default 1), not toFixed, so classification matches the displayed number.
What happens with a bad weight or height?
Non-positive, non-finite or out-of-range values return a typed invalid_input error before any calculation; failed API tasks are not charged at $0.002.