Calculate your daily macronutrient targets based on your personal details and fitness goals.
Male
Female
Sedentary (little to no exercise)
Lightly Active (light exercise/sports 1-3 days/week)
Moderately Active (moderate exercise/sports 3-5 days/week)
Very Active (hard exercise/sports 6-7 days/week)
Extra Active (very hard exercise/sports & physical job)
Lose Weight
Maintain Weight
Gain Muscle
Your Daily Macronutrient Targets
Enter your details to get started!
Understanding Macronutrients and Your Diet Plan
A macro diet plan, or macronutrient-based diet, focuses on the precise intake of proteins, carbohydrates, and fats – the three essential macronutrients. These nutrients provide the calories your body needs to function, grow, and repair. Understanding your individual macro needs is crucial for achieving specific fitness goals, whether it's weight loss, muscle gain, or maintaining overall health.
This calculator provides an estimate of your daily macronutrient targets. The process involves several steps:
Basal Metabolic Rate (BMR) Calculation: Your BMR is the number of calories your body burns at rest to maintain basic functions. We use the Mifflin-St Jeor equation, which is widely considered one of the most accurate formulas for estimating BMR.
Total Daily Energy Expenditure (TDEE) Calculation: TDEE is your BMR multiplied by an activity factor that accounts for your daily physical activity level. This gives you an estimate of the total calories you burn per day.
Caloric Adjustment for Goals: Based on your fitness goal, your TDEE is adjusted. For weight loss, a deficit is created; for muscle gain, a surplus is added; and for weight maintenance, your TDEE remains the target.
Macronutrient Distribution: Finally, the target calorie intake is broken down into grams of protein, carbohydrates, and fats using standard, flexible ratios that can be adjusted based on preference and goals.
The Science Behind the Calculation
The core of this calculator lies in estimating your Total Daily Energy Expenditure (TDEE) and then adjusting it based on your goals.
For Men: BMR = (10 * weight in kg) + (6.25 * height in cm) – (5 * age in years) + 5
For Women: BMR = (10 * weight in kg) + (6.25 * height in cm) – (5 * age in years) – 161
2. Total Daily Energy Expenditure (TDEE):
TDEE = BMR * Activity Factor
The activity factors used are standard multipliers:
Sedentary: 1.2
Lightly Active: 1.375
Moderately Active: 1.55
Very Active: 1.725
Extra Active: 1.9
3. Caloric Goal:
Lose Weight: Target Calories = TDEE – 500 calories (approx. 1 lb fat loss per week)
Maintain Weight: Target Calories = TDEE
Gain Muscle: Target Calories = TDEE + 250 to 500 calories (slight surplus for muscle growth)
4. Macronutrient Breakdown:
We use a common distribution, which can be adjusted, but this provides a solid starting point:
Protein: 40% of total calories (1g protein = 4 calories)
Carbohydrates: 30% of total calories (1g carb = 4 calories)
Fats: 30% of total calories (1g fat = 9 calories)
The calculator applies these percentages to your target daily calorie intake to determine the grams of each macronutrient. For example, if your target is 2000 calories:
Protein: (2000 * 0.40) / 4 = 200g
Carbohydrates: (2000 * 0.30) / 4 = 150g
Fats: (2000 * 0.30) / 9 = ~67g
Use Cases and Considerations
This calculator is a valuable tool for:
Athletes and fitness enthusiasts aiming for body composition changes.
Individuals looking to lose weight sustainably.
Anyone interested in understanding and optimizing their nutritional intake for health and performance.
Disclaimer: This calculator provides estimates. Individual metabolic rates and responses can vary. For personalized dietary advice, consult a registered dietitian or a qualified healthcare professional.
function calculateMacros() {
var bodyWeightKg = parseFloat(document.getElementById("bodyWeightKg").value);
var heightCm = parseFloat(document.getElementById("heightCm").value);
var age = parseFloat(document.getElementById("age").value);
var gender = document.getElementById("gender").value;
var activityLevel = parseFloat(document.getElementById("activityLevel").value);
var goal = document.getElementById("goal").value;
var macrosOutput = document.getElementById("macrosOutput");
macrosOutput.innerHTML = "; // Clear previous results
// — Input Validation —
if (isNaN(bodyWeightKg) || bodyWeightKg <= 0) {
macrosOutput.innerHTML = "Please enter a valid body weight.";
return;
}
if (isNaN(heightCm) || heightCm <= 0) {
macrosOutput.innerHTML = "Please enter a valid height.";
return;
}
if (isNaN(age) || age <= 0) {
macrosOutput.innerHTML = "Please enter a valid age.";
return;
}
// — BMR Calculation (Mifflin-St Jeor Equation) —
var bmr = 0;
if (gender === "male") {
bmr = (10 * bodyWeightKg) + (6.25 * heightCm) – (5 * age) + 5;
} else { // female
bmr = (10 * bodyWeightKg) + (6.25 * heightCm) – (5 * age) – 161;
}
// — TDEE Calculation —
var tdee = bmr * activityLevel;
// — Caloric Goal Adjustment —
var targetCalories = tdee;
if (goal === "lose_weight") {
targetCalories = tdee – 500;
} else if (goal === "gain_muscle") {
targetCalories = tdee + 300; // Moderate surplus for muscle gain
}
// Ensure target calories don't go unrealistically low for weight loss
if (targetCalories 4000 && goal === "gain_muscle") {
targetCalories = 4000;
}
// — Macronutrient Calculation —
var proteinCalories = targetCalories * 0.40; // 40% protein
var carbCalories = targetCalories * 0.30; // 30% carbs
var fatCalories = targetCalories * 0.30; // 30% fats
var proteinGrams = proteinCalories / 4;
var carbGrams = carbCalories / 4;
var fatGrams = fatCalories / 9;
// Format output to one decimal place for better readability
proteinGrams = proteinGrams.toFixed(1);
carbGrams = carbGrams.toFixed(1);
fatGrams = fatGrams.toFixed(1);
targetCalories = targetCalories.toFixed(0);
macrosOutput.innerHTML =
'Your estimated daily calorie target: ' + targetCalories + ' kcal' +
'Protein: ' + proteinGrams + 'g' +
'Carbohydrates: ' + carbGrams + 'g' +
'Fats: ' + fatGrams + 'g';
}