apyhub
Back

BMI & BMR Calculator API

What it does

BMI BMR Calculator gives you body composition and calorie estimates from basic measurements. Send weight and height to calculate BMI, category, BMI Prime, Ponderal Index, WHO class, waist-to-height ratio, and target weight values. Send weightKg, heightCm, ageYears, sex, and optional activity or bodyFatPct to calculate basal metabolic rate and daily calorie needs.

Use the /bmi endpoint when you need a quick health metric from metric or imperial inputs. It accepts weight and height as required fields, with optional waist, targetBmi, and targetBmiPrime. The response is an object, so you can map the values into your own UI, intake flow, or fitness workflow without reshaping nested records.

Use the /bmr endpoint when you need calorie planning from body measurements. It supports the Mifflin-St Jeor, Harris-Benedict, and Katch-McArdle formulas, plus activity levels from sedentary to very_active. When bodyFatPct is provided, the calculation can switch to Katch-McArdle, which is useful for more precise lean-mass-based estimates.

BMI BMR Calculator is a fit for wellness apps, onboarding questionnaires, health dashboards, and personal training tools that need standardized measurement-based outputs.

▣ ENDPOINT 01 / 02
POST
Calculate BMI, category, BMI Prime, Ponderal Index, WHO class, waist-to-height ratio and target weight in metric or imperial units
https://api.eu.apyhub.com/freedailypro/bmi-bmr-calculator/bmi

QUICKSTART

GUIDE

Quickstart

Calculate BMI from your weight and height with the minimum required JSON body.

curl -X POST "https://api.eu.apyhub.com/freedailypro/bmi-bmr-calculator/bmi" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"weight":54,"height":170}'

What you'll get back

Returns a JSON object. The output schema does not declare any top-level fields, so the response shape is unspecified here.

{
  "result": {
    "bmi": 18.7,
    "category": "Normal",
    "bmiPrime": 0.75,
    "ponderalIndex": 11,
    "whoClass": "Normal range",
    "whoRange": "18.5 to 24.99",
    "healthyWeightRange": {
      "lowKg": 53.5,
      "highKg": 72
    },
    "steps": [
      {
        "label": "Height in metres",
        "formula": "height in cm / 100",
        "inputs": {
          "cm": 170
        },
        "result": 1.7
      },
      {
        "label": "BMI",
        "formula": "weight in kg / (height in m)^2",
        "inputs": {
          "weight": "54.0 kg",
          "height": "1.7 m"
        },
        "result": "18.7"
      },
      {
        "label": "BMI Prime",
        "formula": "BMI / 25",
        "inputs": {
          "BMI": "18.7"
        },
        "result": "0.75"
      },
      {
        "label": "Ponderal Index",
        "formula": "weight in kg / (height in m)^3",
        "inputs": {
          "weight": "54.0 kg",
          "height": "1.7 m"
        },
        "result": "11.0 kg/m3"
      },
      {
        "label": "WHO class",
        "formula": "the WHO adult BMI table row that contains the BMI",
        "inputs": {
          "BMI": "18.7"
        },
        "result": "Normal range (18.5 to 24.99)"
      }
    ]
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Height in cm (metric) or inches (imperial). Metric 50 to 272 cm, imperial 20 to 107 in.
Weight in kg (metric) or pounds (imperial). Metric 2 to 700 kg, imperial 4 to 1500 lb.
metric (kg and cm, the default) or imperial (lb and inches).
Optional waist in cm (metric) or inches (imperial). Adds the waist-to-height ratio and its band.
Optional target BMI (10 to 60). Adds the weight that gives it at this height and the change from now.

About this endpoint

What it does

Calculates BMI from the submitted weight and height, using metric or imperial units. The endpoint accepts optional waist and target BMI inputs, but the response schema is not yet defined in the output schema.

Request Body

ParameterTypeMandatoryDescription
unitENUMNoAllowed values: metric, imperial.
Default: metric.
Use metric for kg and cm, or imperial for lb and inches.
waistNumberNoOptional waist measurement in cm (metric) or inches (imperial). Minimum: 0.0001. Adds the waist-to-height ratio and its band.
heightNumberYesHeight in cm (metric) or inches (imperial). Minimum: 0.0001.
Metric range: 50 to 272 cm.
Imperial range: 20 to 107 in.
weightNumberYesWeight in kg (metric) or pounds (imperial). Minimum: 0.0001.
Metric range: 2 to 700 kg.
Imperial range: 4 to 1500 lb.
targetBmiNumberNoOptional target BMI. Minimum: 0.0001. Allowed range: 10 to 60. Adds the weight that gives it at this height and the change from now.
targetBmiPrimeNumberNoOptional target BMI Prime. Minimum: 0.0001. Target BMI Prime is target BMI divided by 25. Send this or targetBmi, not both.

Response

ParameterTypeDescription
resultobjectContains the BMI calculation results.
result.bminumberCalculated Body Mass Index (BMI).
result.categorystringBMI category (e.g., Normal).
result.bmiPrimenumberBMI Prime value.
result.ponderalIndexnumberCalculated Ponderal Index.
result.whoClassstringWHO BMI classification.
result.whoRangestringBMI range associated with the WHO classification.
result.healthyWeightRangeobjectContains the estimated healthy weight range in kilograms.
result.healthyWeightRange.lowKgnumberLower limit of the healthy weight range in kg.
result.healthyWeightRange.highKgnumberUpper limit of the healthy weight range in kg.
result.stepsarrayContains the calculation steps, formulas, inputs, and intermediate results.
result.steps[].labelstringName of the calculation step.
result.steps[].formulastringFormula used for the calculation.
result.steps[].inputsobjectInput values used in the calculation step.
result.steps[].resultnumber/stringResult of the calculation step.
▣ ENDPOINT 02 / 02
POST
Calculate basal metabolic rate and daily calories from body measurements and activity
https://api.eu.apyhub.com/freedailypro/bmi-bmr-calculator/bmr

QUICKSTART

GUIDE

Quickstart

Calculate your BMR from weight, height, age, and sex with a single request.

curl -X POST "https://api.eu.apyhub.com/freedailypro/bmi-bmr-calculator/bmr" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "weightKg": 54,
    "heightCm": 170,
    "ageYears": 25,
    "sex": "male"
  }'

What you'll get back

Returns a JSON object.

{
  "result": {
    "bmr": 1483,
    "tdee": 2298,
    "activity": "moderate"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Equation to use. Default mifflin-st-jeor (or katch-mcardle when bodyFatPct is sent). harris-benedict is the 1984 Roza-Shizgal revision. katch-mcardle needs bodyFatPct.
Body fat as a percentage, 3 to 60. Switches to Katch-McArdle (370 + 21.6 x lean body mass in kg) unless formula says otherwise; the comparison then includes it.

About this endpoint

What it does

Calculates basal metabolic rate from the body measurements in the request body. The endpoint accepts the user’s sex, age, height, and weight, with optional formula, activity, and body fat percentage inputs.

Request Body

ParameterTypeMandatoryDescription
sexENUMYesAllowed values: male, female.
formulaENUMNoEquation to use. Allowed values: mifflin-st-jeor, harris-benedict, katch-mcardle.
Default: mifflin-st-jeor (or katch-mcardle when bodyFatPct is sent).
harris-benedict is the 1984 Roza-Shizgal revision.
katch-mcardle needs bodyFatPct.
activityENUMNoAllowed values: sedentary, light, moderate, active, very_active.
ageYearsNumberYesAge in years. Minimum: 0.0001; maximum: 120.
heightCmNumberYesHeight in centimeters. Minimum: 0.0001.
weightKgNumberYesWeight in kilograms. Minimum: 0.0001.
bodyFatPctNumberNoBody fat as a percentage. Description notes a range of 3 to 60 and that it switches to Katch-McArdle (370 + 21.6 x lean body mass in kg) unless formula says otherwise.

Response

ParameterTypeDescription
resultobjectContains the BMR and TDEE calculation results.
result.bmrnumberCalculated Basal Metabolic Rate (BMR), representing the estimated calories burned at rest per day.
result.tdeenumberCalculated Total Daily Energy Expenditure (TDEE), representing the estimated daily calories burned based on activity level.
result.activitystringActivity level used for the calculation (e.g., moderate).
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.