A simple and elegant Java Swing desktop application that calculates your Body Mass Index (BMI) based on your height (in feet and inches) and weight (in kilograms). This tool also categorizes your BMI result (e.g., underweight, normal, overweight or obese).
- Input height in feet and inches
- Input weight in kilograms
- Calculates BMI instantly on button click
- Displays a clear health message based on BMI range
- Includes Clear and Exit buttons
- Easy-to-use GUI built with Java Swing
BMI = weight (kg) / [height (m)]²
-
Height is entered in feet and inches.
-
The app converts it to meters using the formula:
Height (m) = (feet × 0.3048) + (inches × 0.0254)
- Height in meters = (5 × 0.3048) + (5 × 0.0254) = 1.651 m
- BMI = 60 / (1.651²) ≈ 22.0 → ✅ Normal
- Height in meters = (5 × 0.3048) + (3 × 0.0254) = 1.6002 m
- BMI = 54 / (1.6002²) ≈ 21.1 → ✅ Normal
-
Below 18.5 – Underweight
-
18.5 to 24.9 – Normal
-
25.0 to 29.9 – Overweight
-
30.0 and above – Obese
-
Clone the repository:
git clone https://github.com/hema-priya-vadivel/BMI-Calculator-Application.git
-
Open the project in your Java IDE (e.g., IntelliJ IDEA, Eclipse, NetBeans).
-
Navigate to the source file and compile and run bmi.java.
-
Once the application window opens:
- Enter your height in feet and inches
- Enter your weight in kilograms
- Click the Calculate button to view your BMI and see whether you are Underweight, Normal, Overweight, or Obese
- Click Clear to reset all fields
- Click Exit to close the application