
BMI Calculator API
Calculate your body mass index in metric or imperial units, see the WHO adult category and the healthy weight range for your height, with honest notes on its limits.
Send your API key as a Bearer token in the Authorization header (Authorization: Bearer YOUR_API_KEY), or in an X-API-Key header.
120 requests per minute
2 endpoints available
Overview
Calculates body mass index for adults from height and weight, in metric (cm, kg) or imperial (feet, inches, pounds). Returns the BMI, its WHO adult category, and the weight range that gives a BMI of 18.5 to 24.9 at that height.
Notes
bmiis rounded to one decimal. The category is taken from that rounded number, so a BMI of 24.96 reads as 25.0 and is Overweight.bmiExacthas more decimals.- For
units: "metric"sendheightCmandweightKg. Forunits: "imperial"sendheightFeet,heightInches(0 up to, but not including, 12) andweightLb. - Heights or weights that look like a unit mistake still calculate, but add a message to
warnings. - BMI is a screening number for adults. It is not a diagnosis, and it does not suit children, teens or pregnancy.
Categories
under (below 18.5), healthy (18.5 to 24.9), over (25.0 to 29.9), obese1 (30.0 to 34.9), obese2 (35.0 to 39.9), obese3 (40.0 and above).
Endpoints
https://opentools.ca/api/v1/tools/bmi-calculatorRequest Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| units | string Enum: metric, imperial | Optional | Unit system for the height and weight fields.Default: metric |
| heightCm | number | Optional | Height in centimetres. Required for metric. |
| weightKg | number | Optional | Weight in kilograms. Required for metric. |
| heightFeet | number | Optional | Whole feet of height. Imperial only.Default: 0 |
| heightInches | number | Optional | Inches of height, 0 up to 11.99. Imperial only.Default: 0 |
| weightLb | number | Optional | Weight in pounds. Required for imperial. |
Response Example
{
"success": true,
"units": "metric",
"bmi": 23.5,
"bmiExact": 23.5294,
"category": {
"key": "healthy",
"label": "Healthy weight",
"range": "18.5 to 24.9"
},
"heightCm": 170,
"weightKg": 68,
"healthyWeightRange": {
"bmiFrom": 18.5,
"bmiTo": 24.9,
"minKg": 53.47,
"maxKg": 71.96,
"minLb": 117.9,
"maxLb": 158.6
},
"warnings": []
}Error Codes
https://opentools.ca/api/v1/tools/bmi-calculatorQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| units | string Enum: metric, imperial | Optional | Unit system for the height and weight fields.Default: metric |
| heightCm | number | Optional | Height in centimetres. Required for metric. |
| weightKg | number | Optional | Weight in kilograms. Required for metric. |
| heightFeet | number | Optional | Whole feet of height. Imperial only.Default: 0 |
| heightInches | number | Optional | Inches of height, 0 up to 11.99. Imperial only.Default: 0 |
| weightLb | number | Optional | Weight in pounds. Required for imperial. |
Response Example
{
"success": true,
"units": "metric",
"bmi": 23.5,
"bmiExact": 23.5294,
"category": {
"key": "healthy",
"label": "Healthy weight",
"range": "18.5 to 24.9"
},
"heightCm": 170,
"weightKg": 68,
"healthyWeightRange": {
"bmiFrom": 18.5,
"bmiTo": 24.9,
"minKg": 53.47,
"maxKg": 71.96,
"minLb": 117.9,
"maxLb": 158.6
},
"warnings": []
}Error Codes
Code Examples
# Metric
curl -X POST https://opentools.ca/api/v1/tools/bmi-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"units": "metric",
"heightCm": 170,
"weightKg": 68
}'
# Imperial
curl -X POST https://opentools.ca/api/v1/tools/bmi-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"units": "imperial",
"heightFeet": 5,
"heightInches": 7,
"weightLb": 150
}'
# The same request as a GET with query parameters
curl "https://opentools.ca/api/v1/tools/bmi-calculator?heightCm=170&weightKg=68" \
-H "Authorization: Bearer YOUR_API_KEY"Rather use it in your browser? Open the BMI Calculator