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.";
}