<html>
<head>
<script type="text/javascript"> window.addEventListener('error', function(event) { var message = JSON.parse(JSON.stringify(event.message)); var source = event.filename; var lineno = event.lineno; var colno = event.colno; var error = event.error; window.parent.postMessage({ type: 'iframeError', details: { message: message, source: source, lineno: lineno, colno: colno, error: error ? error.stack : '' } }, '*'); }); window.addEventListener('unhandledrejection', function(event) { window.parent.postMessage({ type: 'iframePromiseRejection', details: { reason: event.reason } }, '*'); }); </script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>SimplySoundAdvice.com: What is your Body Mass Index (BMI)?</title>
<meta name="description" content="Calculate your Body Mass Index (BMI) using our simple tool.">
<meta name="keywords" content="BMI, Body Mass Index, Health, Weight, Height">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.2/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
// Initialize user interface elements
const unitSelect = document.getElementById("unit-select");
const metricInputs = document.getElementById("metric-inputs");
const imperialInputs = document.getElementById("imperial-inputs");
const heightCMInput = document.getElementById("height-cm-input");
const weightKGInput = document.getElementById("weight-kg-input");
const heightFTInput = document.getElementById("height-ft-input");
const heightINInput = document.getElementById("height-in-input");
const weightLBSInput = document.getElementById("weight-lbs-input");
const calculateBtn = document.getElementById("calculate-btn");
const resultContainer = document.getElementById("result-container");
const resultText = document.getElementById("result-text");
const legendContainer = document.getElementById("legend-container");
const interpretationText = document.getElementById("interpretation-text");
// Set initial state
metricInputs.style.display = "none";
imperialInputs.style.display = "none";
resultContainer.style.display = "none";
legendContainer.style.display = "none";
// Event listeners
unitSelect.addEventListener("change", function() {
if (unitSelect.value === "metric") {
metricInputs.style.display = "block";
imperialInputs.style.display = "none";
} else if (unitSelect.value === "imperial") {
metricInputs.style.display = "none";
imperialInputs.style.display = "block";
}
});
calculateBtn.addEventListener("click", function() {
let height, weight;
if (unitSelect.value === "metric") {
height = parseFloat(heightCMInput.value);
weight = parseFloat(weightKGInput.value);
} else if (unitSelect.value === "imperial") {
const heightFT = parseInt(heightFTInput.value);
const heightIN = parseInt(heightINInput.value);
height = (heightFT * 12) + heightIN;
weight = parseFloat(weightLBSInput.value);
}
if (isNaN(height) || isNaN(weight)) {
alert("Please enter valid height and weight values.");
return;
}
let bmi;
if (unitSelect.value === "metric") {
bmi = weight / ((height / 100) ** 2);
} else if (unitSelect.value === "imperial") {
bmi = (weight / (height ** 2)) * 703;
}
resultText.textContent = "Your BMI is " + bmi.toFixed(1);
resultContainer.style.display = "block";
legendContainer.style.display = "block";
if (bmi < 18.5) {
resultText.style.color = "#007bff";
interpretationText.textContent = "Underweight";
interpretationText.style.color = "#007bff";
} else if (bmi >= 18.5 && bmi <= 24.9) {
resultText.style.color = "#28a745";
interpretationText.textContent = "Normal Weight";
interpretationText.style.color = "#28a745";
} else if (bmi >= 25 && bmi <= 29.9) {
resultText.style.color = "#ffc107";
interpretationText.textContent = "Overweight";
interpretationText.style.color = "#ffc107";
} else {
resultText.style.color = "#dc3545";
interpretationText.textContent = "Obese";
interpretationText.style.color = "#dc3545";
}
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
body {
font-family: 'Open Sans', sans-serif;
background-color: #f8f9fa;
}
.container {
max-width: 600px;
margin-top: 50px;
}
.form-select {
margin-bottom: 20px;
}
.inputs-container {
margin-bottom: 20px;
}
.result-container {
margin-top: 20px;
}
.result-text {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
.legend-container {
margin-top: 20px;
}
.legend-item {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.legend-circle {
width: 20px;
height: 20px;
border-radius: 50%;
margin-right: 10px;
}
.interpretation-text {
font-size: 18px;
font-weight: bold;
}
</style>
<link rel="canonical" href="https://calculator.tools/app/simplysoundadvice-com-what-is-your-body-mass-index-bmi-122/">
<meta charset="utf-8">
</head>
<body>
<div id="main-container" class="container">
<h1>SimplySoundAdvice.com: What is your Body Mass Index (BMI)?</h1>
<div class="form-group">
<label for="unit-select">Unit of Measurement</label>
<select id="unit-select" class="form-select">
<option value="metric">METRIC (Height in cm and Weight in kg)</option>
<option value="imperial">IMPERIAL (Height in feet/inches and Weight in lbs)</option>
</select>
</div>
<div id="metric-inputs" class="inputs-container">
<div class="form-group">
<label for="height-cm-input">Height (cm)</label>
<input type="number" id="height-cm-input" class="form-control">
</div>
<div class="form-group">
<label for="weight-kg-input">Weight (kg)</label>
<input type="number" id="weight-kg-input" class="form-control">
</div>
</div>
<div id="imperial-inputs" class="inputs-container">
<div class="form-group">
<label for="height-ft-input">Height (ft)</label>
<input type="number" id="height-ft-input" class="form-control">
</div>
<div class="form-group">
<label for="height-in-input">Height (in)</label>
<input type="number" id="height-in-input" class="form-control">
</div>
<div class="form-group">
<label for="weight-lbs-input">Weight (lbs)</label>
<input type="number" id="weight-lbs-input" class="form-control">
</div>
</div>
<button id="calculate-btn" class="btn btn-primary">Calculate BMI</button>
<div id="result-container" class="result-container">
<p id="result-text" class="result-text"></p>
</div>
<div id="legend-container" class="legend-container">
<div class="legend-item">
<div class="legend-circle" style="background-color: #007bff;"></div>
<div class="legend-text">Underweight: Less than 18.5 BMI</div>
</div>
<div class="legend-item">
<div class="legend-circle" style="background-color: #28a745;"></div>
<div class="legend-text">Normal Weight: 18.5 to 24.9 BMI</div>
</div>
<div class="legend-item">
<div class="legend-circle" style="background-color: #ffc107;"></div>
<div class="legend-text">Overweight: 25 to 29.9 BMI</div>
</div>
<div class="legend-item">
<div class="legend-circle" style="background-color: #dc3545;"></div>
<div class="legend-text">Obese: 30 or more BMI</div>
</div>
</div>
<p id="interpretation-text" class="interpretation-text"></p>
<p class="note-text">Note: BMI is a useful measure for adults. It may not be accurate for athletes, elderly, or children.</p>
</div>
<script type="text/javascript"> var localStoragePrefix = "ct-122"; var lastSave = 0; function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); } function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } } </script>
<script type="text/javascript"> window.addEventListener('load', function() { var observer = new MutationObserver(function() { window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); observer.observe(document.body, {attributes: true, childList: true, subtree: true}); window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); </script>
</body>
</html>
These are apps made by the community!
Calculator Tools allows you to instantly create and generate any simple one page web app for
free and immediately have it online to use and share. This means anything! Mini apps,
calculators, trackers, tools, games, puzzles, screensavers... anything you can think of that the
AI can handle.
The AI uses Javacript, HTML, and CSS programming to code your app up in moments. This currently
uses GPT-4 the latest and most powerful version of the OpenAI GPT language model.
Have you ever just wanted a simple app but didn't want to learn programming or pay someone to
make it for you? Calculator Tools is the solution! Just type in your prompt and the AI will
generate a simple app for you in seconds. You can then customize it to your liking and share it
with your friends.
AI has become so powerful it is that simple these days.
It uses GPT-4 which is the most powerful model for ChatGPT.
Calculator Tools does not remember things from prompt to prompt, each image is a unique image
that does not reference any of the images or prompts previously supplied.