Rahul Vijayraghavan
20th March 2026
Why does BMI matter?
What this app solves:
A single, jargon-free web tool that: 1. Accepts weight & height in Metric or Imperial units 2. Calculates BMI instantly 3. Explains the result with personalised, actionable advice 4. Requires zero medical knowledge to use
No sign-up. No downloads. Results in seconds.
BMI is computed with one simple formula. The R code below demonstrates
it live — the same logic runs inside the Shiny server.R:
# Example: person weighing 80 kg, 175 cm tall
weight_kg <- 80
height_m <- 175 / 100 # convert cm → m
bmi_value <- round(weight_kg / height_m^2, 1)
cat("BMI =", bmi_value)
BMI = 26.1
# WHO classification
classify_bmi <- function(bmi) {
if (bmi < 18.5) "Underweight"
else if (bmi < 25.0) "Normal weight"
else if (bmi < 30.0) "Overweight"
else "Obese"
}
cat("\nCategory:", classify_bmi(bmi_value))
Category: Overweight
The app handles imperial conversion automatically:
Input widgets (sidebar)
| Widget | Purpose |
|---|---|
| Radio buttons | Switch between Metric / Imperial |
| Weight slider | Select body weight (30–200 kg or 66–440 lbs) |
| Height slider | Select height (100–250 cm or 39–98 in) |
| Checkbox | Show / hide BMI reference table |
Reactive outputs (main panel)
The app is live on shinyapps.io:
https://rahulvijay97.shinyapps.io/bmi-calculator/
Source code on GitHub:
https://github.com/rahulvijay007/BMI-Shiny-App
ui.R — layout, widgets, inline documentationserver.R — reactive BMI logic, colour coding, advice engineGrading checklist met: