BMI Calculator avatar

BMI Calculator

Pricing

from $1.00 / 1,000 results

Go to Apify Store
BMI Calculator

BMI Calculator

A simple and efficient tool to calculate **Body Mass Index (BMI)** using metric or imperial units. Designed for developers, data pipelines, and health-related applications.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Jamshaid Arif

Jamshaid Arif

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

5 days ago

Last modified

Share

⚖️ BMI Calculator

A simple and efficient tool to calculate Body Mass Index (BMI) using metric or imperial units. Designed for developers, data pipelines, and health-related applications.


🚀 Features

  • 📏 Supports metric (kg/cm) and imperial (lbs/inches) units
  • ⚡ Fast and accurate BMI calculation
  • 🧠 Optional inputs: age and gender for extended insights
  • 🛡️ Input validation with strict schema
  • 🔌 Easy integration into APIs, scripts, and automation workflows

📥 Input Schema

FieldTypeRequiredDescription
weightnumber✅ YesBody weight (kg or lbs based on unit)
heightnumber✅ YesHeight (cm or inches based on unit)
unitstring❌ Nometric (default) or imperial
agenumber❌ NoOptional age in years
genderstring❌ NoOptional: male or female

⚙️ How It Works

📊 BMI Formula

  • Metric:
BMI = weight (kg) / (height (m))²
  • Imperial:
BMI = 703 × weight (lbs) / (height (in))²

🧮 Example

Input

{
"weight": 70,
"height": 175,
"unit": "metric"
}

Output

{
"bmi": 22.86,
"category": "Normal weight"
}

📊 BMI Categories

BMI RangeCategory
< 18.5Underweight
18.5 – 24.9Normal weight
25 – 29.9Overweight
≥ 30Obese

🏗️ Use Cases

  • Health and fitness apps
  • API-based BMI services
  • Data analysis pipelines
  • Web or mobile applications
  • Automation tools (Apify actors, etc.)

⚡ Notes

  • Height is automatically converted to meters when using metric
  • age and gender are optional and do not affect BMI calculation directly
  • Ensure valid numeric inputs for accurate results

🛠️ Example Logic (Pseudo Code)

if unit == "metric":
height_m = height / 100
bmi = weight / (height_m ** 2)
else:
bmi = 703 * weight / (height ** 2)

📄 License

MIT License