Basal Metabolic Rate Calculator Mayo Clinic

Basal Metabolic Rate (BMR) Calculator

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 the minimum energy expenditure required to keep your body alive. Factors influencing BMR include age, sex, muscle mass, and genetics. Understanding your BMR can be a helpful starting point for managing your weight and nutrition.

Male Female

Your Estimated BMR:

#bmr-calculator { font-family: sans-serif; max-width: 500px; margin: 20px auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } #bmr-calculator h2, #bmr-calculator h3 { text-align: center; color: #333; } .input-group { margin-bottom: 15px; display: flex; align-items: center; } .input-group label { flex: 1; margin-right: 10px; font-weight: bold; color: #555; } .input-group input[type="number"], .input-group select { flex: 2; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } #bmr-calculator button { display: block; width: 100%; padding: 12px; background-color: #007bff; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } #bmr-calculator button:hover { background-color: #0056b3; } #result { margin-top: 25px; padding: 15px; background-color: #f9f9f9; border: 1px solid #eee; border-radius: 4px; text-align: center; } #result h3 { margin-top: 0; color: #007bff; } #bmr-output { font-size: 1.2em; font-weight: bold; color: #333; } 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("bmr-output").textContent = "Please enter valid positive numbers for all fields."; return; } if (gender === "male") { // Mifflin-St Jeor Equation for men bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5; } else { // Mifflin-St Jeor Equation for women bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161; } document.getElementById("bmr-output").textContent = bmr.toFixed(2) + " calories per day"; }

Leave a Comment