Skip to content

Aayushinit/HealthMetricsCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


๐Ÿง  Health Metrics Calculator

An advanced client-side Health Analysis Dashboard that goes beyond basic BMI calculation by providing multi-metric insights, visualizations, and actionable health feedback โ€” all running instantly in the browser.

โšก No backend. No APIs. Pure HTML + CSS + JavaScript.


๐ŸŒ Live Demo

๐Ÿš€ Try the hosted version here:
๐Ÿ‘‰ Live Health Metrics Calculator

No installation needed โ€” runs instantly in your browser.

๐ŸŒŸ What Makes This Different?

Most calculators stop at:

๐Ÿ‘‰ โ€œYour BMI is 23โ€

This project goes further:

๐Ÿ‘‰ Converts inputs โ†’ Calculates metrics โ†’ Visualizes results โ†’ Explains meaning โ†’ Suggests actions

So instead of just numbers, users get understanding + direction.


๐Ÿš€ Project Evolution

This project is an improved version of an earlier system:

๐Ÿ”น Previous Version

Advanced BMI Calculator (Flask-based)

๐Ÿ”น Current Version

Health Metrics Calculator (Fully Client-Side, Deployed Online)


๐Ÿ”„ Key Improvements

Old Version (Flask) New Version (Client-side)
Required backend server Runs directly in browser
Basic BMI-focused output Multi-metric analysis
Static UI Interactive visual dashboard
Limited insights Smart interpretations + advice
Slower workflow Instant calculations

๐Ÿงฎ Features

โš™๏ธ Multi-Unit Input System

Supports real-world flexible inputs:

Height

  • cm
  • meters
  • millimeters
  • inches
  • feet + inches (dual input)

Weight

  • kg
  • grams
  • lbs
  • oz

๐Ÿ‘‰ Internally normalized to cm + kg


๐Ÿ“Š Health Metrics Calculated

Metric Purpose
BMI Weight vs height ratio
Body Fat % Estimated body composition
BMR Calories burned at rest
TDEE Total daily calorie burn
Healthy Weight Range Based on BMI 18.5โ€“24.9

๐Ÿง  Formulas Used

BMI

BMI = weight (kg) / heightยฒ (m)

Body Fat %

Male:   1.20 ร— BMI + 0.23 ร— Age โˆ’ 16.2
Female: 1.20 ร— BMI + 0.23 ร— Age โˆ’ 5.4

BMR (Harris-Benedict)

Male:   88.362 + 13.397W + 4.799H โˆ’ 5.677A
Female: 447.593 + 9.247W + 3.098H โˆ’ 4.330A

TDEE

TDEE = BMR ร— Activity Level

๐Ÿ“ˆ Visualization System

This project focuses heavily on making data understandable visually.

๐ŸŽฏ BMI Gauge

  • Semi-circular SVG meter
  • Needle rotates based on BMI
  • Color-coded health zones

๐Ÿ“ Weight Position Tracker

  • Shows:

    • Your current weight
    • Ideal weight range
  • Includes:

    • Highlighted target zone
    • โ€œYOUโ€ marker

๐Ÿ“Š Body Fat Bar

  • Visual percentage scale
  • Indicates lean โ†’ high fat levels

๐Ÿ”ฅ Energy System

  • BMR vs TDEE representation

  • Calorie target marker for:

    • Gain / Maintain / Loss

๐Ÿง  Insight & Recommendation Engine

This is the core logic layer of the project.

โœ… Category Detection

  • Underweight
  • Healthy
  • Overweight
  • Obese

โš ๏ธ Edge Case Handling

  • High BMI + low fat โ†’ possible muscular case
  • Normal BMI + high fat โ†’ possible โ€œskinny fatโ€

๐Ÿ’ฌ Conversational Feedback

Example:

"You are 4.5 kg above your healthy range"

โณ Goal Estimation

  • Assumes safe rate:

    0.5 kg per week
    
  • Estimates time to reach healthy range


๐Ÿฝ๏ธ Actionable Suggestions

Each category includes:

  • Nutrition advice
  • Activity guidance
  • Lifestyle improvements

๐ŸŽฏ Calorie Strategy

Category Strategy
Underweight Calorie surplus
Healthy Maintain
Overweight Mild deficit
Obese Strong deficit

๐ŸŽจ UI / UX Highlights

  • Glassmorphism cards
  • Animated gradient background
  • Floating ambient orbs
  • Smooth number animations
  • Staggered result reveal
  • Tooltip explanations
  • Screen pulse feedback based on health status

๐Ÿ“ธ Preview

๐Ÿ–ผ๏ธ UI Overview

health-metrics-calculator/assets/ui.png

๐Ÿ“น Demo States

๐ŸŸข Healthy Case

health-metrics-calculator/assets/healthybmidemo.gif

๐Ÿ”ด Obese Case

health-metrics-calculator/assets/obesebmidemo.gif

๐Ÿ”ต Underweight Case

health-metrics-calculator/assets/underweightbmidemo.gif

๐Ÿ› ๏ธ Tech Stack

  • HTML5
  • Tailwind CSS
  • Vanilla JavaScript
  • SVG (for gauge)
  • Font Awesome

๐Ÿš€ How to Use

๐ŸŒ Option 1 โ€” Live Demo (Recommended)

Use the hosted version directly in your browser:

๐Ÿ‘‰ Live Health Metrics Calculator


๐Ÿ’ป Option 2 โ€” Run Locally (New Version)

Open the file:


health-metrics-calculator/index2.html


๐Ÿงช Option 3 โ€” Run Legacy Flask Version

cd advanced-bmi-calculator
pip install flask
python app.py

Then open:

http://127.0.0.1:5000

๐Ÿ“‚ Legacy Project (Old Version)

The folder:

advanced-bmi-calculator/

contains the earlier implementation which:

  • Used Flask backend
  • Focused mainly on BMI calculation
  • Had a simpler UI and fewer insights

This version demonstrates the initial system design, while the new version shows refactoring into a faster, more interactive architecture.


๐Ÿค– What This Project Demonstrates

  • Strong JavaScript logic & DOM manipulation
  • Real-world formula implementation
  • Data โ†’ visualization mapping
  • UI/UX thinking with interactive feedback
  • Ability to refactor and improve an existing system

โš ๏ธ Disclaimer

This tool is for educational purposes only.

BMI does not account for:

  • Muscle mass
  • Bone density
  • Body composition differences

Consult a medical professional for accurate health advice.


๐Ÿ™‹โ€โ™‚๏ธ Author

Aayush Dattatray Kadam AI & ML Engineering Student

๐Ÿ”— https://github.com/Aayushinit


๐Ÿ”ฎ Future Improvements

  • Save user history (local storage)
  • Export report (PDF)
  • More health metrics (e.g., waist ratio)
  • Voice input
  • Mobile app version

About

๐Ÿ’ก A modern, full-featured BMI & Health Metrics Calculator built with Flask, Tailwind CSS, and JavaScript โ€” includes animated UI, body fat %, BMR, calorie tracker, and responsive health dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors