imc-calculadora
Calculadora IMC / BMI calculator for adults: body mass index with the WHO classification, the healthy-weight range for a height, metric and imperial input, and Spanish and English labels.
- WHO adult classes with the three thinness subclasses (severa, moderada, leve) and obesity classes I–III.
- Rounds to 1 decimal before classifying, the way BMI is reported: 24.96 → 25.0 → Sobrepeso. No more "24.96 is normal" edge cases.
- Healthy-weight range for a height (BMI 18.5 to 24.9) and how many kg are missing or extra.
- Metric and imperial: kg + cm (or metres,
1,75), or lb + in using 703 · lb / in². - Comma or dot decimals (
70,5and70.5both work), handy for Spanish-language forms. - Spanish and English labels and messages, with a not-medical-advice note.
- Library + CLI, no dependencies.
Install
pip install imc-calculadora
Library
import imc_calculadora as imc
r = imc.calculate(82, 175)
r.bmi, r.key, r.label, r.diff_kg # (26.8, 'sobrepeso', 'Sobrepeso', 5.7)
r.min_kg, r.max_kg # (56.7, 76.3)
imc.calculate(weight_lb=154, height_in=69, lang="en").label # 'Normal weight'
imc.classify(24.96).key # 'sobrepeso' (rounded to 25.0 first)
imc.healthy_range("1,68") # (52.2, 70.3)
CLI
$ imc-calculadora 82 175
IMC 26,8: Sobrepeso
Tu IMC indica sobrepeso. Te sobran 5,7 kg respecto al rango normal.
Peso saludable: 56,7 - 76,3 kg
El IMC es una referencia general para adultos y no sustituye el consejo de un profesional de la salud.
$ imc-calculadora --lb 154 --in 69 --en
BMI 22.7: Normal weight
Your BMI is in the normal range for your height.
Healthy weight: 56.8 - 76.5 kg
BMI is a general guide for adults and is not medical advice.
$ imc-calculadora --rango 1,68
Peso saludable: 52,2 - 70,3 kg
Add --json for machine-readable output.
WHO classes
| Key | Español | English | BMI (1 decimal) |
|---|---|---|---|
delgadez_severa |
Delgadez severa | Severe thinness | < 16.0 |
delgadez_moderada |
Delgadez moderada | Moderate thinness | 16.0 – 16.9 |
delgadez_leve |
Delgadez leve | Mild thinness | 17.0 – 18.4 |
normal |
Peso normal | Normal weight | 18.5 – 24.9 |
sobrepeso |
Sobrepeso | Overweight | 25.0 – 29.9 |
obesidad_1 |
Obesidad grado I | Obesity class I | 30.0 – 34.9 |
obesidad_2 |
Obesidad grado II | Obesity class II | 35.0 – 39.9 |
obesidad_3 |
Obesidad grado III | Obesity class III | ≥ 40.0 |
The BMI is rounded half up to 1 decimal first, then compared with these bounds.
Note
BMI is a general screening measure for adults (18+). It does not tell muscle from fat and is not medical advice. For children and teens, use age- and sex-specific percentiles.
Links
- Calculadora IMC: free online BMI calculator in Spanish with the WHO table, healthy-weight range and methodology.
- Source: https://github.com/nbkdevs/imc-calculadora
License
MIT
Metadata
Release files for imc-calculadora 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imc_calculadora-1.0.0.tar.gz | 6.9 kB | Without provenance | Details for imc_calculadora-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imc_calculadora-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for imc_calculadora-1.0.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / imc_calculadora-1.0.0.tar.gz
| Download URL | imc_calculadora-1.0.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f1b7c2d8bc9672157128bf228b5a538d13ee9f29d2feb28fbec6014aca49938
|
|
BLAKE2b-256 checksum How to use checksums |
4a6f60f9d096bc32acf54e2e2997e5abc98ad9f3a1823540e4d1d17789341eca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / imc_calculadora-1.0.0-py3-none-any.whl
| Download URL | imc_calculadora-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd94c3a89ec52cb6966822183057a84e58025a1d2113d73802cd69cdcac8e933
|
|
BLAKE2b-256 checksum How to use checksums |
fd26afb31bde479e8270e5a59d8056bb57c5f7c9b12b316e807eb978f5e26922
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for imc-calculadora 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.