ImcCalculadora 1.0.0

dotnet add package ImcCalculadora --version 1.0.0
                    
NuGet\Install-Package ImcCalculadora -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImcCalculadora" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ImcCalculadora" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ImcCalculadora" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ImcCalculadora --version 1.0.0
                    
#r "nuget: ImcCalculadora, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ImcCalculadora@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ImcCalculadora&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ImcCalculadora&version=1.0.0
                    
Install as a Cake Tool

ImcCalculadora

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,5 and 70.5 both work), handy for Spanish-language forms.
  • Spanish and English labels and messages, with a not-medical-advice note.
  • Library + CLI, no dependencies.

Install

dotnet add package ImcCalculadora

Library

using ImcCalculadora;

var r = Imc.CalculateMetric(82, 175);
Console.WriteLine($"{r.Bmi} {r.Label}");     // 26.8 Sobrepeso
Console.WriteLine(r.Message);                 // Te sobran 5,7 kg …

Imc.CalculateImperial(154, 69, Lang.En).Label; // "Normal weight"
Imc.Classify(24.96).Key;                       // "sobrepeso" (rounded to 25.0 first)
Imc.HealthyRange(Imc.ParseNumber("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.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 98 10/30/2026