Your Basal Metabolic Rate (BMR) is the number of calories your body needs to perform basic life-sustaining functions, such as breathing, circulation, and cell production, at rest. It's essentially the minimum energy expenditure required to keep your body alive and functioning.
Understanding your BMR can be a foundational step in managing your weight, as it helps you determine how many calories you need to consume to maintain, lose, or gain weight. Your BMR is influenced by several factors including age, sex, weight, and height.
Male
Female
function calculateBMR() {
var gender = document.getElementById("gender").value;
var weightKg = document.getElementById("weightKg").value;
var heightCm = document.getElementById("heightCm").value;
var age = document.getElementById("age").value;
var weight = parseFloat(weightKg);
var height = parseFloat(heightCm);
var userAge = parseInt(age);
var bmr = 0;
if (isNaN(weight) || isNaN(height) || isNaN(userAge) || weight <= 0 || height <= 0 || userAge <= 0) {
document.getElementById("bmrResult").innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (gender === "male") {
// Mifflin-St Jeor Equation for Men
bmr = (10 * weight) + (6.25 * height) – (5 * userAge) + 5;
} else {
// Mifflin-St Jeor Equation for Women
bmr = (10 * weight) + (6.25 * height) – (5 * userAge) – 161;
}
document.getElementById("bmrResult").innerHTML = "