A privacy-first, client-side BMI calculator that classifies a person's Body Mass Index against multiple authoritative standards (WHO, China Ministry of Health/Education), adapting to the person's life stage and locale.
BMI 计算器 —— 分龄分性别、多标准评估的健康体重指数计算器,纯前端无数据上传。
- Multi-standard classification — 5 authoritative standards across 3 life stages (Student / Adult / Senior)
- Age- and gender-specific — gender-differentiated thresholds for student & child standards; grade-aware for Chinese students
- Visual gauge — semicircle gauge with animated needle, color-coded segments, and zoom-to-level for precision reading
- Healthy weight range — derived normal weight range for your height, displayed in your chosen unit
- Dual-unit weight input — kg / 斤 (jin) for zh locale, kg / lb for en locale, with real-time conversion
- i18n — English and Chinese (Simplified) with inlang/paraglide
- Privacy-first — all computation is client-side; no data is collected, stored, or transmitted
| Category | Locale | Standard | Levels | Authority |
|---|---|---|---|---|
| Student | zh | China Student | 4 (underweight / normal / overweight / obese) | Ministry of Education, 2014 Revision |
| Student | en | WHO Child (5–19y) | 5 (severe thinness / thinness / normal / overweight / obese) | WHO Growth Reference |
| Adult | zh | China Adult | 4 (underweight / normal / overweight / obese) | WS/T 428-2013 |
| Adult | en | WHO Adult | 6 (underweight / normal / pre-obesity / obese class I / II / III) | WHO BMI Classification |
| Senior | both | China Elderly | 3 (underweight / normal / overweight–obese) | WS/T 428-2013 |
Each standard faithfully reflects its source document — level counts and thresholds are not normalized across standards.
| Layer | Choice |
|---|---|
| Framework | Svelte 5 (Runes — $state, $derived, $effect) |
| Styling | Tailwind CSS v4 |
| Language | TypeScript 5 |
| Testing | Vitest + Testing Library |
| i18n | inlang/paraglide-js |
| Adapter | @sveltejs/adapter-static |
| Package manager | pnpm |
git clone https://github.com/cup113/BMI-Calculator.git
cd BMI-Calculator
pnpm install
pnpm dev # start dev server at http://localhost:5173
pnpm build # production build → build/
pnpm test # run tests
pnpm check # type-check with svelte-checkpnpm test # vitest run
pnpm test:watch # vitest watch mode
pnpm coverage # run with coverage report- China Student Standard — National Student Physical Fitness Standard (2014 Revision), Ministry of Education
- China Adult & Elderly Standards — WS/T 428-2013: Criteria of Weight for Adults, National Health Commission
- WHO Adult Standard — WHO BMI Classification, World Health Organization
- WHO Child Standard — WHO Growth Reference (5–19 years), World Health Organization
This website does not collect, store, or transmit any personal information. All BMI calculations are performed locally in your browser.
pnpm buildStatic files are output to the build/ directory, ready for deployment to GitHub Pages, Vercel, Netlify, or any static host.