Skip to content

Avinash-sdbegin/BMI_CALCULATOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧮 BMI Calculator

A simple BMI (Body Mass Index) calculator built using HTML, CSS, and JavaScript. Enter your weight (kg) and height (cm) to get your BMI value and a basic weight category.

🔗 Live Demo

https://avinash-sdbegin.github.io/BMI_CALCULATOR/

✅ Features

  • 🧾 BMI formula used:

    $$\text{BMI} = \frac{\text{weight (kg)}}{\text{height (m)}^2}$$

  • 📏 Accepts height in cm (converted to meters internally)

  • ✅ Validates inputs (rejects empty/zero/invalid values)

  • 🩺 Shows BMI result with category:

    • Underweight: BMI < 18.5
    • Normal weight: 18.5–24.9
    • Overweight: 25–29.9
    • Obese: ≥ 30

🛠️ Tech Stack

  • HTML
  • CSS
  • JavaScript (DOM events + basic validation)

📁 Project Structure

BMIcalculator/
  index.html
  style.css
  script.js
  image.png

🚀 Run Locally

Option 1: Open directly (no install)

  1. Open index.html in your browser.
  2. Enter:
    • Weight in kg
    • Height in cm
  3. Click Calculate BMI.

Option 2: Use a local server (recommended)

If you use VS Code, you can run it with the Live Server extension:

  1. Install Live Server.
  2. Right-click index.htmlOpen with Live Server.

🎨 Customization

  • To change BMI ranges or labels, edit the category logic in script.js.
  • To change UI styling, edit style.css.

🖼️ Screenshot

BMI Calculator Screenshot

⚠️ Disclaimer

This tool is for basic informational use only and does not replace medical advice.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors