.mr-calculator-wrapper {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
.mr-calculator-form {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.mr-input-group {
margin-bottom: 15px;
display: flex;
flex-direction: column;
}
.mr-input-group.full-width {
grid-column: span 2;
}
.mr-input-group label {
font-weight: 600;
margin-bottom: 5px;
color: #333;
}
.mr-input-group input, .mr-input-group select {
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
}
.mr-btn {
grid-column: span 2;
background-color: #2c3e50;
color: white;
border: none;
padding: 15px;
font-size: 18px;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s;
font-weight: bold;
}
.mr-btn:hover {
background-color: #34495e;
}
.mr-results {
margin-top: 30px;
padding: 20px;
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
display: none;
border-left: 5px solid #27ae60;
}
.mr-result-row {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.mr-result-row:last-child {
border-bottom: none;
}
.mr-result-label {
color: #555;
}
.mr-result-value {
font-weight: bold;
color: #2c3e50;
}
.mr-highlight {
background-color: #e8f5e9;
padding: 15px;
border-radius: 4px;
margin-top: 10px;
text-align: center;
}
.mr-highlight .mr-result-value {
font-size: 24px;
color: #27ae60;
display: block;
margin-top: 5px;
}
.mr-warning {
font-size: 0.9em;
color: #e74c3c;
margin-top: 10px;
font-style: italic;
}
.mr-article {
margin-top: 40px;
line-height: 1.6;
color: #333;
}
.mr-article h2 {
color: #2c3e50;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
.mr-article h3 {
color: #34495e;
margin-top: 20px;
}
.mr-article p {
margin-bottom: 15px;
}
.mr-article ul {
margin-bottom: 15px;
padding-left: 20px;
}
.hidden {
display: none;
}
@media (max-width: 600px) {
.mr-calculator-form {
grid-template-columns: 1fr;
}
.mr-input-group.full-width {
grid-column: span 1;
}
.mr-btn {
grid-column: span 1;
}
}
Basal Metabolic Rate (BMR):
–
Total Daily Energy Expenditure (TDEE):
–
Your Daily Calorie Target:
–
How to Use This Metabolic Rate Calculator to Lose Weight
Understanding your body's energy requirements is the foundational step in any successful weight loss journey. This calculator uses the Mifflin-St Jeor equation, widely considered the most accurate formula for estimating calorie needs, to determine your Basal Metabolic Rate (BMR) and Total Daily Energy Expenditure (TDEE).
What is BMR?
Basal Metabolic Rate (BMR) represents the number of calories your body burns at complete rest just to keep your vital organs functioning—your heart beating, lungs breathing, and brain processing. Even if you stayed in bed all day, you would burn this amount of energy. It usually accounts for 60-75% of your total daily calorie burn.
What is TDEE?
Total Daily Energy Expenditure (TDEE) is your "maintenance" calorie level. It takes your BMR and multiplies it by an activity factor based on your lifestyle (sedentary, active, etc.). If you eat at your TDEE level, you will neither gain nor lose weight.
The Mathematics of Weight Loss
To lose weight, you must create a caloric deficit—eating fewer calories than your TDEE. This calculator adjusts your target intake based on widely accepted physiological standards:
- Mild Loss: A deficit of ~250 calories/day results in approximately 0.5 lbs (0.25 kg) of fat loss per week.
- Standard Loss: A deficit of ~500 calories/day results in approximately 1 lb (0.5 kg) of fat loss per week.
- Aggressive Loss: A deficit of ~1000 calories/day results in approximately 2 lbs (1 kg) of fat loss per week.
Important Safety Note
While cutting calories is necessary for fat loss, it is generally not recommended for men to eat fewer than 1,500 calories or women fewer than 1,200 calories per day without medical supervision. Extremely low calorie intakes can slow down your metabolism, lead to muscle loss, and cause nutrient deficiencies.
function toggleUnits() {
var unit = document.getElementById('mr_unit').value;
var labelWeight = document.getElementById('label_weight');
var groupFt = document.getElementById('group_height_ft');
var groupIn = document.getElementById('group_height_in');
var groupCm = document.getElementById('group_height_cm');
if (unit === 'imperial') {
labelWeight.innerText = "Weight (lbs)";
groupFt.classList.remove('hidden');
groupIn.classList.remove('hidden');
groupCm.classList.add('hidden');
} else {
labelWeight.innerText = "Weight (kg)";
groupFt.classList.add('hidden');
groupIn.classList.add('hidden');
groupCm.classList.remove('hidden');
}
}
function calculateMetabolicRate() {
// 1. Get Inputs
var unit = document.getElementById('mr_unit').value;
var gender = document.getElementById('mr_gender').value;
var age = parseFloat(document.getElementById('mr_age').value);
var weightInput = parseFloat(document.getElementById('mr_weight').value);
var activity = parseFloat(document.getElementById('mr_activity').value);
var deficit = parseFloat(document.getElementById('mr_goal').value);
// 2. Validate Inputs
if (isNaN(age) || isNaN(weightInput) || isNaN(activity)) {
alert("Please fill in all required fields with valid numbers.");
return;
}
// 3. Normalize to Metric (Mifflin-St Jeor requires kg and cm)
var weightKg = 0;
var heightCm = 0;
if (unit === 'imperial') {
var ft = parseFloat(document.getElementById('mr_height_ft').value);
var inc = parseFloat(document.getElementById('mr_height_in').value);
if (isNaN(ft)) ft = 0;
if (isNaN(inc)) inc = 0;
if (ft === 0 && inc === 0) {
alert("Please enter your height.");
return;
}
// Convert lbs to kg
weightKg = weightInput * 0.453592;
// Convert feet/inches to cm
var totalInches = (ft * 12) + inc;
heightCm = totalInches * 2.54;
} else {
var cmInput = parseFloat(document.getElementById('mr_height_cm').value);
if (isNaN(cmInput)) {
alert("Please enter your height.");
return;
}
weightKg = weightInput;
heightCm = cmInput;
}
// 4. Calculate BMR (Mifflin-St Jeor Equation)
// Men: 10W + 6.25H – 5A + 5
// Women: 10W + 6.25H – 5A – 161
var bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age);
if (gender === 'male') {
bmr += 5;
} else {
bmr -= 161;
}
// 5. Calculate TDEE
var tdee = bmr * activity;
// 6. Calculate Target Calories
var targetCalories = tdee – deficit;
// 7. Safety Checks
var warningMsg = "";
var minCalories = (gender === 'male') ? 1500 : 1200;
if (targetCalories < minCalories) {
warningMsg = "Warning: Your target calorie intake is very low (" + Math.round(targetCalories) + " kcal). It is generally not recommended to go below " + minCalories + " calories without medical supervision. Consider a less aggressive weight loss goal or increasing activity.";
// We still display the number, but show warning
}
// 8. Update UI
document.getElementById('res_bmr').innerText = Math.round(bmr) + " kcal/day";
document.getElementById('res_tdee').innerText = Math.round(tdee) + " kcal/day";
document.getElementById('res_target').innerText = Math.round(targetCalories) + " kcal";
var warningEl = document.getElementById('res_warning');
warningEl.innerText = warningMsg;
if(warningMsg !== "") {
warningEl.style.display = "block";
} else {
warningEl.style.display = "none";
}
document.getElementById('mr_results').style.display = "block";
}