Sedentary (Office job)
Lightly Active (1-3 days/week)
Moderately Active (3-5 days/week)
Very Active (6-7 days/week)
Extra Active (Physical job/Pro athlete)
Weight Loss (-500 cal)
Maintenance
Weight Gain (+500 cal)
Your Daily Targets
Protein0g
Carbs0g
Fats0g
How to Use the Calorie Calculator with Macros
Achieving your fitness goals, whether it is fat loss, muscle gain, or maintenance, requires a precise understanding of your body's energy requirements. This calculator uses the Mifflin-St Jeor Equation, widely considered the most accurate formula for calculating Basal Metabolic Rate (BMR).
Understanding the Components
BMR (Basal Metabolic Rate): The number of calories your body burns at rest to maintain vital functions (breathing, heart rate, etc.).
TDEE (Total Daily Energy Expenditure): The total calories burned per day including your activity level.
Macronutrients: These are the "Big Three" nutrients that provide energy: Protein (4 cal/g), Carbohydrates (4 cal/g), and Fats (9 cal/g).
Recommended Macro Ratios
This calculator applies a balanced approach suitable for most fitness enthusiasts:
Protein (30%): Essential for muscle repair and metabolic health.
Carbohydrates (40%): The primary fuel source for high-intensity training and brain function.
Fats (30%): Crucial for hormone production and nutrient absorption.
Real-World Example
Consider a 30-year-old male weighing 80kg at 180cm height who is moderately active. His maintenance calories would be approximately 2,800 per day. To lose weight safely, he should aim for 2,300 calories. Using our macro split, his daily intake would be roughly 173g Protein, 230g Carbs, and 77g Fat.
function calculateMacros() {
var gender = document.getElementById("gender").value;
var age = parseFloat(document.getElementById("age").value);
var weight = parseFloat(document.getElementById("weight").value);
var height = parseFloat(document.getElementById("height").value);
var activity = parseFloat(document.getElementById("activity").value);
var goalAdjustment = parseFloat(document.getElementById("goal").value);
if (isNaN(age) || isNaN(weight) || isNaN(height)) {
alert("Please enter valid numbers for age, weight, and height.");
return;
}
// BMR Calculation using Mifflin-St Jeor
var bmr = 0;
if (gender === "male") {
bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5;
} else {
bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161;
}
// TDEE and Goal Adjustment
var tdee = bmr * activity;
var targetCalories = Math.round(tdee + goalAdjustment);
// Macro Logic (30% Protein, 40% Carbs, 30% Fats)
var proteinGrams = Math.round((targetCalories * 0.30) / 4);
var carbGrams = Math.round((targetCalories * 0.40) / 4);
var fatGrams = Math.round((targetCalories * 0.30) / 9);
// Display Results
document.getElementById("total-calories").innerText = targetCalories + " kcal/day";
document.getElementById("protein-val").innerText = proteinGrams + "g";
document.getElementById("carbs-val").innerText = carbGrams + "g";
document.getElementById("fats-val").innerText = fatGrams + "g";
document.getElementById("results").style.display = "block";
// Smooth scroll to results
document.getElementById("results").scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}