๐งฎ BMI Calculator App using HTML, CSS & JavaScript


๐ Introduction
Have you ever wondered if your body weight is healthy or not?
BMI โ Body Mass Index โ is a quick way to find out.
In this project, I built a BMI Calculator App using only HTML, CSS, and JavaScript.
It takes your height (in cm) and weight (in kg) as input and shows your BMI value and weight category:
โ๏ธ Underweight
โ๏ธ Normal
โ๏ธ Overweight
Let me walk you through how I made this app.
๐ท App Preview
๐ง What is BMI?
BMI (Body Mass Index) is a number that tells whether your body weight is healthy for your height.
It is calculated using the formula:
iniCopyEditBMI = weight (kg) / (height (m) ร height (m))
For example, if your weight is 60kg and your height is 170cm (1.7m):
iniCopyEditBMI = 60 / (1.7 * 1.7) = 20.76
Based on the value:
BMI < 18.5 โ Underweight
BMI 18.5 - 24.9 โ Normal
BMI โฅ 25 โ Overweight
๐ป How the App Works
You enter your height in centimeters and weight in kilograms.
The app calculates your BMI using JavaScript and shows:
Your BMI value (e.g., 22.5)
Your health status (Normal, Overweight, Underweight)
๐งฉ Technologies Used
HTML โ for creating the input form and layout
CSS โ for designing the interface
JavaScript โ for logic and interaction
๐ง Core JavaScript Logic
Here's the logic that powers the app:
๐ Live Demo & Source Code
๐ Live Demo on Netlify
๐ Video On YouTube
๐ฏ What I Learned
โ
DOM manipulation
โ
Form handling
โ
Input validation
โ
BMI logic and categorization
โ
Styling and layout in CSS
๐ฃ Final Thoughts
This was a fun and simple project to build.
It taught me how real-world calculators work using basic math and JavaScript logic.
If youโre just starting with web development, this is a perfect beginner project.
Try making your own version โ maybe add animations, charts, or even a dark mode!
๐ Related Projects:
๐ Currency Change App
๐ Random Joke App
๐งโ๐ป About Me
Hi, Iโm Sarfraz, a passionate IT student building my dream project โPro Dev Seriesโ.
Follow me for more full-stack web projects using simple HTML, CSS, and JavaScript.
Thanks for reading! ๐
Let me know what you think in the comments ๐
Subscribe to my newsletter
Read articles from sarfraz directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

sarfraz
sarfraz
I'm BSIT Student and want to become Full Stack Developer.