BMI Calculator Shiny App

Pran Krishna Kar
2026-04-04

What is BMI?

Body Mass Index (BMI) is a simple, widely-used measure of body fat based on height and weight.

BMI = weight (kg) / height (m)²

BMI Categories:

Category BMI Range
Underweight Below 18.5
Normal weight 18.5 – 24.9
Overweight 25.0 – 29.9
Obese 30.0 and above

BMI is a useful screening tool for population-level health monitoring (WHO, 2023).

Why This App?

Problem: Most people don't know their BMI or what it means.

Solution: A fast, intuitive Shiny app that:

  • ✅ Supports both metric and imperial units
  • ✅ Accepts weight, height, age, and sex as inputs
  • ✅ Provides a personalized health interpretation
  • ✅ Displays a color-coded BMI category
  • ✅ Includes a built-in reference table

Built for anyone — no medical background needed!

How the App Works

# Core BMI calculation in server.R (metric example)
weight_kg <- 70
height_cm <- 170

height_m <- height_cm / 100
bmi <- round(weight_kg / (height_m ^ 2), 1)

cat("BMI:", bmi)
BMI: 24.2

User Flow: 1. Select unit system (metric / imperial) 2. Enter weight, height, age, sex 3. App reactively calculates BMI on server 4. Results display instantly — no button needed!

App Demo & Features

Live Application: [https://prankk.shinyapps.io/bmi-calculator-shiny/]

GitHub Code: [https://github.com/prankrishnakar/bmi-calculator-shiny]

Key features demonstrated:

  • 🎛️ Input widgets: Radio buttons, numeric inputs, slider, conditional panels
  • ⚙️ Server calculations: Reactive BMI formula with unit conversion
  • 📊 Reactive output: BMI value, category, interpretation text, and reference table
  • 📖 Documentation: Embedded directly in the app sidebar

The app runs entirely in the browser — no installation required.

Summary & Future Work

What we built:

  • A fully reactive Shiny BMI Calculator
  • Supports metric & imperial units
  • Personalized health advice based on BMI, age, and sex

Potential Enhancements:

  • Add waist-to-hip ratio calculator
  • Plot BMI trend over time (user enters multiple readings)
  • Add pediatric BMI-for-age charts (for users under 18)
  • Export results as a PDF health report

Thank you!

“Take care of your body. It's the only place you have to live.” — Jim Rohn