Calculates body mass index (BMI) from weight and height
=LET(
w, weight+0,
h, height+0,
sys, LOWER(TRIM(TO_TEXT(system))),
IF(
OR(w<=0, h<=0),
"",
IF(
sys="imperial",
w/(h^2)*703,
IF(
sys="metric",
w/(h^2),
""
)
)
)
)This function calculates Body Mass Index (BMI) using a person's weight and height. BMI is a common screening metric used to compare weight relative to height and is often used in health tracking spreadsheets. This function is useful for fitness logs, health dashboards, and progress tracking. For example, if A2 contains "150" (weight in pounds) and B2 contains "65" (height in inches), then =BMI(A2, B2, "imperial") returns about "24.96". If weight and height are in kilograms and meters, you would use =BMI(A3, B3, "metric").
Use the inputs below to create BMI as a reusable custom function in Google Sheets.
Learn how to add custom functions to Google SheetsBMI
Calculates body mass index (BMI) from weight and height
=LET( w, weight+0, h, height+0, sys, LOWER(TRIM(TO_TEXT(system))), IF( OR(w<=0, h<=0), "", IF( sys="imperial", w/(h^2)*703, IF( sys="metric", w/(h^2), "" ) ) ) )
weight
height
system
Weight value (lbs for imperial, kg for metric)
A2
Height value (inches for imperial, meters for metric)
B2
Unit system, either "imperial" or "metric"
C2
Other functions in the same category: Mathematical & Statistical
Calculates Basal Metabolic Rate using the revised Harris-Benedict equation in imperial units
Calculates Basal Metabolic Rate using the revised Harris-Benedict equation in metric units
Constrains a number between a minimum and maximum value
Returns the sigmoid of a number (logistic function)
Calculate the percentage change between two values
Calculates a rolling average over a range using a fixed window size
Named functions enable the creation of custom, reusable formulas that mimic built-in functions, streamlining calculations and data manipulations. These functions simplify complex formulas, making spreadsheets more readable and less prone to errors. By encapsulating intricate logic within a single function call, they enhance consistency across your data. Utilizing named functions reduces the need to write lengthy formulas repeatedly, thereby improving workflow efficiency and productivity in data analysis and management.
Download and import — fastest way to add the function but does not include argument descriptions and examples
Follow these simple steps to download and import a function into your spreadsheet. This method is the quickest and easiest way to add the named function to your Google Sheets document, but will not include the argument description and examples.
Once added, the function will be ready to use in your document like any other built-in function. Simply type the function name and provide the required inputs to use it in your calculations.
Copy and paste — copy and paste each property one at a time
Follow these simple steps to integrate a custom named function into your spreadsheet:
Once added, the function will be ready to use in your document like any other built-in function. Simply type the function name and provide the required inputs to use it in your calculations.