A simple Body Mass Index (BMI) calculator built using HTML, CSS, and JavaScript.
This calculator helps users calculate their BMI by entering their height and weight and also provides a guide for interpreting the result.
- BMI Calculation: Calculates the Body Mass Index (BMI) based on height in centimeters and weight in kilograms.
- Input Validation: Ensures valid numeric inputs for height and weight, providing feedback for invalid inputs.
- BMI Range Guide: Displays a guide for interpreting BMI ranges (Underweight, Normal, Overweight).
This is a basic web-based BMI calculator that allows users to input their height and weight to calculate their BMI. The BMI is calculated using the following formula:
BMI = Weight (kg) / (Height (cm) * Height (cm) / 10000)
Where:
- Weight (kg) is the person's weight in kilograms.
- Height (cm) is the person's height in centimeters.
The result is displayed on the screen along with a color-coded message based on the calculated value. The app also shows a BMI weight guide to help users understand where their BMI falls in terms of underweight, normal, and overweight categories.
No external libraries or packages are required for this project. It only uses HTML, CSS, and vanilla JavaScript.
- Clone the repository:
git clone https://github.com/king04aman/All-In-One-Javascript-Projects.git
- Navigate to the project directory:
cd All-In-One-Javascript-Projects/BMI-Calculator - Open the
index.htmlfile in a web browser:
- Aman Kumar (@king04aman)