Need to create a BMI calculator | Community
Skip to main content
Answered

Need to create a BMI calculator


I am looking to create a BMI calculator where the user gives us their weight in KGS and Height in Centimeter and the form would calculate their BMI and would suggest them if they fall in Underweght, Normal or Overweight category.

Is this type of calculation also possible?

Best answer by amy.carlson

Hi @jetiz ! You’ve presented me with quite the task, but I think I may have cracked it. **not alone, my partner was the one who suggested the hundred variable, I give him credit for getting me past my mental wall :joy:

 

However, let me know if it does not work for you! Test it Here

 

The calculation I am using for the BMI is what I found on google, which is:  Mass/Height^2

 

Question 1 - Number question: What is your height in cm? **needs to be a whole number

Statement 1: It looks like you entered @recall Q1, the value needs to be higher than 0.

Question 2 - Number question: What is your weight in kg? **needs to be a whole number

Statement 2: It looks like you entered @recall Q2, the value needs to be higher than 0

Statement 3: Your BMI is @weight

Endings:

  1. Underweight
  2. Normal Weight
  3. Overweight
  4. Obese

Variables:

bmi= 0

height= 0

hundred=100

weight= 0

 

Okay and now the logic.

Advanced → Branching & Calculations

 

Question 1:

 

Statement 1:

 

Question 2:

 

Statement 2:

 

Statement 3: 

 

 

Feel free to post questions here, or suggestions! I’m happy to discuss, this was really fun to troubleshoot, so thank you :nerd:!

View original

21 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • January 30, 2021

Hi @jetiz . Thanks for joining the community! 

Our calculator will ask for a specific number entered when calculating the next equation after setting up the math. 

For example, If weight is equal to 130, add, 50. 

The calculator won’t be able to create a calculation like, 

Add the weight to the height.

Though, I’ll share this post with our product team, as having advanced calculations like this would be very handy!

The workaround I can think of for this would be to specify every possible measurement in the calculator, though that may take some time to build. 

If you think of anything else, please post it here! Others may also have a fancy workaround for this that I may not have thought of. :) 


amy.carlson
Typeform
Forum|alt.badge.img+2
  • Typeform
  • 21 replies
  • Answer
  • January 30, 2021

Hi @jetiz ! You’ve presented me with quite the task, but I think I may have cracked it. **not alone, my partner was the one who suggested the hundred variable, I give him credit for getting me past my mental wall :joy:

 

However, let me know if it does not work for you! Test it Here

 

The calculation I am using for the BMI is what I found on google, which is:  Mass/Height^2

 

Question 1 - Number question: What is your height in cm? **needs to be a whole number

Statement 1: It looks like you entered @recall Q1, the value needs to be higher than 0.

Question 2 - Number question: What is your weight in kg? **needs to be a whole number

Statement 2: It looks like you entered @recall Q2, the value needs to be higher than 0

Statement 3: Your BMI is @weight

Endings:

  1. Underweight
  2. Normal Weight
  3. Overweight
  4. Obese

Variables:

bmi= 0

height= 0

hundred=100

weight= 0

 

Okay and now the logic.

Advanced → Branching & Calculations

 

Question 1:

 

Statement 1:

 

Question 2:

 

Statement 2:

 

Statement 3: 

 

 

Feel free to post questions here, or suggestions! I’m happy to discuss, this was really fun to troubleshoot, so thank you :nerd:!


Gabriel
Ex–Typefomer
Forum|alt.badge.img+5
  • Community Team
  • 858 replies
  • January 30, 2021

@amy.carlson that's a mic drop response. Wonderful stuff, thanks. 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • February 1, 2021

@amy.carlson I did not know this existed! Thank you!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5248 replies
  • February 1, 2021

@amy.carlson - that was cool.. 


  • Navigating the Land
  • 1 reply
  • February 14, 2021

Literally the task I am trying to solve, a BMI calc. This is gold. Thank you @amy.carlson

 

:clap::clap::clap:


Michaela
Forum|alt.badge.img+6
  • Certified Partner
  • 189 replies
  • February 14, 2021

If someone’s looking for my jaw, it’s on the floor. Excellent stuff, @amy.carlson:muscle::muscle::muscle:


  • Explorer
  • 1 reply
  • March 18, 2021

@amy.carlson amazing! I have tried and failed for so long :D 
Can you tell me what plan you used to build it? Essential / Professional or Premium? I will upgrade to the correct version then :) 


amy.carlson
Typeform
Forum|alt.badge.img+2
  • Typeform
  • 21 replies
  • March 18, 2021

Hey @__Anika__ ! I’d recommend the Professional plan if you’re trying to replicate this! I am on an Enterprise plan (perks of being a typeformer :joy: ) but the functionality will be available for the Professional plan. I’ve not tested it on the Essentials, but I believe the logic would be restricted (to only 3!)

 

I hope that helps! 


Forum|alt.badge.img
  • Explorer
  • 9 replies
  • October 27, 2022

Thank you Amy this was very helpful. I was able to convert your formula to weigh in pounds and height in inches the only difference being multiplying the weight by 703. (BMI=weight in lbs x 703/height in inches squared).  For anyone who would like to check out my medical weight loss intake form: any feedback welcome!

My variables;

@BMI=0

@Weight=0

@Height=0

@seven03=703


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • October 27, 2022

Hi @JRyan Thank you for sharing this! Glad it worked out for you! I tested your form and found out my BMI! My only suggestion, depending on if you’re using the form for lead generation, would be to reveal the BMI after they submitted the form. Otherwise, the respondent might abandon the form without hitting submit since they already received the information they wanted! 


Forum|alt.badge.img
  • Explorer
  • 9 replies
  • October 27, 2022

You're so smart. done.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • October 28, 2022

Hopefully that helps, @JRyan ! Let me know how it goes. 😀


This thread has been a godsend. @JRyan I am trying to set up the calculation using your suggested edits, but my calculations are not accurate. Any chance you’d be able to share what the calculation logic looks like? I have a feeling I am just adding the 703 multiplier in the wrong place, but maybe I’m missing something else!


Forum|alt.badge.img
  • Explorer
  • 9 replies
  • June 1, 2023

sure. I’ll make a Loom screen cast.  One sec…

here it is:

 


THANK YOU so much @JRyan


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • June 2, 2023

Wow, thank you so much @JRyan !! Glad to hear this has been helpful, @heatherboldworld 


  • Navigating the Land
  • 2 replies
  • July 28, 2024

I’m trying to calculate the BMI of the user based on their answers.

The user will type their weight(kg) and their height(cm) and i want to create a variable so that i can save the calculation and present it on the last slide as a result.

Can someone please help me as to how do i proceed?


  • Navigating the Land
  • 2 replies
  • October 5, 2024
lydpan wrote:

I’m trying to calculate the BMI of the user based on their answers.

The user will type their weight(kg) and their height(cm) and i want to create a variable so that i can save the calculation and present it on the last slide as a result.

Can someone please help me as to how do i proceed?

To save the calculation and present it later you need to go to Logic → Personalize with data → Variables.

Once you have set a BMI variable, you need to return to the Branching and segmenting section (Logic → Branching, Segmenting and calculations). Go to the questions where you calculate the bmi based on weight and height and at the very end of the question click +Add rule and change If → Always add (+):

00.0 the bmi calculation TO BMI custom variable


  • Navigating the Land
  • 2 replies
  • October 5, 2024

Hi All!

I wanted to thank you for this thread as it helped ALOT with figuring out how to calculate BMI in Typeform. However, the one issues I kept running into was about 25% of respondents answering the “height in inches” question incorrectly regardless of how much I emphasized INCHES. 

With that, I went back to the drawing board and split the height question into a 2 part question group. Since making the adjustment, I haven’t seen any responses come in incorrectly. Since you all helped me get started I thought I would share if others are having the same troubles!

 

Here is an example I added to an individual from if you want to test it out: https://hormonefitness.typeform.com/hfbmi


See screenshots below for variables and logic setup.

 

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14794 replies
  • October 9, 2024

Wow! Thank you so much for sharing this, @stevenlight ! Congrats on a job well done!

@James @Grace