Demos

Change weight or height by typing or with the − and + buttons. Every result updates as you go.

Usage

Use body measurements when a result or a dose depends on body size. It shows:

  • BMI — Weight in kilograms over height in metres squared, with its WHO category.
  • BSA — Body surface area in square metres, by three formulas.

Import it from @workspace/ui/tools/body-measurements.

BMI categories

BMICategory
Under 18.5Underweight
18.5 to under 25Normal weight
25 to under 30Overweight
30 to under 35Obesity class I
35 to under 40Obesity class II
40 or moreObesity class III

BSA formulas

W is weight in kilograms and H is height in centimetres.

FormulaBSA (m²)When to use it
Mosteller√(W × H / 3600)The common default.
Du Bois0.007184 × W^0.425 × H^0.725The historical reference.
Haycock0.024265 × W^0.5378 × H^0.3964Often used in children.

Notes

  • The BMI categories are for adults. Assess children and adolescents with BMI-for-age percentiles instead.
  • Weight is in kilograms and height in centimetres.
  • Results show a dash until both fields are above zero.
  • The reset button goes back to the default weight and height.

Body measurement helpers

The maths is in @workspace/ui/lib/body-measurements, so you can use it without the UI.

bodySurfaceArea uses Mosteller unless you pass "du-bois" or "haycock". bmiCategoryLabels turns a category into text, such as Obesity class I. calculateBodyMeasurements(weight, height) from the component file returns the BMI, its category, and all three BSA values at once, or null when either value is not above zero.

Examples

Custom values

Pass defaultWeight and defaultHeight to start from someone's own measurements.

Child

A 20 kg child, 110 cm tall. Use the Haycock BSA, and read BMI against BMI-for-age percentiles rather than the adult category.

Props

Unlisted props pass through to the Card that wraps the calculator.

BodyMeasurements

PropTypeDefaultDescription
defaultWeightnumber70Weight in kilograms on first render and after reset.
defaultHeightnumber175Height in centimetres on first render and after reset.
onChange(result: BodyMeasurementsResult or null) => void—Called when the result changes.
classNamestring—Classes merged onto the card.

BodyMeasurementsResult

FieldTypeDescription
bminumberBody mass index.
categoryBmiCategoryWHO category, from underweight to obesity-3.
bsaRecord<BsaFormula, number>Body surface area in square metres for mosteller, du-bois, and haycock.