Calculate Base Metabolic Rate

Base Metabolic Rate (BMR) Calculator body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } .calculator-container { max-width: 600px; margin: auto; padding: 20px; border: 1px solid #ccc; border-radius: 8px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; font-weight: bold; } input[type="number"], select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } button { background-color: #4CAF50; color: white; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } button:hover { background-color: #45a049; } #result { margin-top: 20px; padding: 15px; background-color: #f0f0f0; border-radius: 4px; font-size: 1.1em; font-weight: bold; text-align: center; } h2 { text-align: center; margin-bottom: 20px; }

Base Metabolic Rate (BMR) Calculator

Your Base Metabolic Rate (BMR) is the number of calories your body needs to perform basic life-sustaining functions, such as breathing, circulation, and cell production, while at rest. It's the minimum amount of energy required to keep your body alive. Several factors influence BMR, including age, sex, body weight, and height. This calculator uses the Mifflin-St Jeor equation, which is considered one of the most accurate for estimating BMR.

Male Female
function calculateBMR() { var gender = document.getElementById("gender").value; var weight = parseFloat(document.getElementById("weight").value); var height = parseFloat(document.getElementById("height").value); var age = parseFloat(document.getElementById("age").value); var bmr = 0; if (isNaN(weight) || isNaN(height) || isNaN(age) || weight <= 0 || height <= 0 || age <= 0) { document.getElementById("result").innerHTML = "Please enter valid positive numbers for weight, height, and age."; return; } if (gender === "male") { // Mifflin-St Jeor Equation for Men: BMR = (10 * weight in kg) + (6.25 * height in cm) – (5 * age in years) + 5 bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5; } else { // Mifflin-St Jeor Equation for Women: BMR = (10 * weight in kg) + (6.25 * height in cm) – (5 * age in years) – 161 bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161; } document.getElementById("result").innerHTML = "Your estimated BMR is: " + bmr.toFixed(2) + " calories per day."; }

Leave a Comment