Skip to content

Body measurements

Body mass index with its WHO category, and body surface area by the Mosteller, Du Bois or Haycock formula.

BMI
22.9
Normal weight
BSA, mosteller
1.84 m²
BSA, du bois
1.85 m²
BSA, haycock
1.85 m²

Installation

bunx shadcn@4.22.1 add https://organui.com/r/body-measurements.json

This adds lib/body-measurements.ts, with no dependencies.

Usage

import {
  bmiCategory,
  bodyMassIndex,
  bodySurfaceArea,
} from "@/lib/body-measurements"

const bmi = bodyMassIndex(70, 175) // 22.86
bmiCategory(bmi) // "normal"
bodySurfaceArea(70, 175) // 1.84 m², Mosteller
bodySurfaceArea(20, 110, "haycock") // 0.78 m²

API Reference

Body measurements exports
ExportDescription
bodyMassIndex(weightKg, heightCm)Weight in kilograms over height in metres squared.
bmiCategory(bmi)The WHO adult category: underweight, normal, overweight, or obesity class I, II or III.
bmiCategoryLabelsA label for each category, such as "Obesity class I".
bodySurfaceArea(weightKg, heightCm, formula?)Square metres by "mosteller" (the default), "du-bois" or "haycock", which is often used in children.

Notes

BMI categories apply to adults. Children and adolescents are assessed with BMI-for-age percentiles instead.

Doses calculated from body surface area need clinical review; the formulas differ by a few percent.