Calculate your recommended daily macronutrient intake (Protein, Carbs, Fats) based on your goals.
Sedentary (little or 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 a week)
Extra active (very hard exercise/sports & physical job or 2x training)
Weight Loss (deficit)
Maintenance
Muscle Gain (surplus)
Male
Female
Protein: g / kcal
Carbohydrates: g / kcal
Fats: g / kcal
Understanding Macronutrients and How to Calculate Them
Macronutrients, commonly known as macros, are the nutrients your body needs in large amounts to provide energy and support essential bodily functions. These are carbohydrates, proteins, and fats. Understanding your optimal macro intake is crucial for achieving health and fitness goals, whether it's weight loss, muscle gain, or simply maintaining a healthy lifestyle.
What are the Macronutrients?
Carbohydrates: The body's primary source of energy. They are broken down into glucose, which fuels your brain and muscles.
Proteins: Essential for building and repairing tissues, producing enzymes and hormones, and supporting immune function.
Fats: Important for hormone production, nutrient absorption (vitamins A, D, E, K), and providing a secondary energy source.
The Calculation Process
This calculator uses a two-step process: first, estimating your Basal Metabolic Rate (BMR), and then your Total Daily Energy Expenditure (TDEE). Finally, it distributes these calories into macronutrient targets based on your goals.
Step 1: Basal Metabolic Rate (BMR)
BMR is the number of calories your body burns at rest to maintain basic functions like breathing, circulation, and cell production. We use the Mifflin-St Jeor equation, which is considered one of the most accurate:
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
Step 2: Total Daily Energy Expenditure (TDEE)
TDEE accounts for your BMR plus the calories burned through physical activity. It's calculated by multiplying your BMR by an activity factor:
TDEE = BMR × Activity Factor
The activity factors used are:
Sedentary: 1.2
Lightly Active: 1.375
Moderately Active: 1.55
Very Active: 1.725
Extra Active: 1.9
Step 3: Calorie Adjustment for Goals
Based on your chosen goal (Weight Loss, Maintenance, or Muscle Gain), your TDEE is adjusted:
Weight Loss: A deficit of approximately 20% (0.8 x TDEE) is applied.
Maintenance: Your TDEE remains the target.
Muscle Gain: A surplus of approximately 20% (1.2 x TDEE) is applied.
Step 4: Macronutrient Distribution
Once your target daily calorie intake is determined, we distribute it among the macronutrients using standard guidelines:
Protein: Generally set to 1.6 to 2.2 grams per kilogram of body weight. For simplicity and broad applicability, we often use a slightly higher range, especially for active individuals or those in a deficit/surplus. We'll use a common target that supports muscle protein synthesis, often around 25-30% of total calories or a specific g/kg target. For this calculator, we'll assign roughly 2.0g/kg as a starting point, then ensure it fits within a reasonable calorie percentage.
Fats: Typically set between 20% to 30% of total daily calories to support hormonal health. A common approach is to aim for around 25% of total calories.
Carbohydrates: The remaining calories are allocated to carbohydrates, which are the primary energy source.
Calorie per gram:
Protein: 4 calories per gram
Carbohydrates: 4 calories per gram
Fats: 9 calories per gram
How to Use This Calculator
1. Select your typical Activity Level.
2. Choose your Weight Management Goal (lose, maintain, or gain weight).
3. Enter your current Weight in Kilograms.
4. Enter your Height in Centimeters.
5. Input your Age in Years.
6. Select your Gender.
7. Click "Calculate Macros".
The results will provide your estimated daily protein, carbohydrate, and fat intake in grams and calories, along with your calculated BMR and TDEE. Remember, these are estimates. Adjust based on your individual progress and how you feel.
Disclaimer: This calculator provides an estimate for educational purposes. Consult with a registered dietitian, nutritionist, or healthcare provider for personalized dietary advice.
function calculateMacros() {
var weightKg = parseFloat(document.getElementById("weightKg").value);
var heightCm = parseFloat(document.getElementById("heightCm").value);
var age = parseInt(document.getElementById("age").value);
var gender = document.getElementById("gender").value;
var activityLevel = parseFloat(document.getElementById("activityLevel").value);
var goal = parseFloat(document.getElementById("goal").value);
var bmr = 0;
if (gender === "male") {
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) + 5;
} else { // female
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) – 161;
}
var tdee = bmr * activityLevel;
var targetCalories = tdee * (1 + goal); // goal is a factor: -0.2 for loss, 0 for maintenance, 0.2 for gain
var proteinGrams = 0;
var proteinCalories = 0;
var fatGrams = 0;
var fatCalories = 0;
var carbGrams = 0;
var carbCalories = 0;
// Basic validation for inputs
if (isNaN(weightKg) || isNaN(heightCm) || isNaN(age) || weightKg <= 0 || heightCm <= 0 || age <= 0) {
document.getElementById("result").style.display = "block";
document.getElementById("bmrResult").innerText = "Please enter valid numbers for weight, height, and age.";
document.getElementById("tdeeResult").innerText = "";
document.getElementById("proteinGrams").innerText = "";
document.getElementById("proteinCalories").innerText = "";
document.getElementById("carbsGrams").innerText = "";
document.getElementById("carbsCalories").innerText = "";
document.getElementById("fatsGrams").innerText = "";
document.getElementById("fatsCalories").innerText = "";
return;
}
// Determine macronutrient split based on common guidelines
// A common approach:
// Protein: ~2.0g/kg or a percentage of calories (e.g., 25-30%)
// Fats: ~25% of calories
// Carbs: Remaining calories
// Ensure a minimum protein intake based on weight
var minProteinGrams = weightKg * 1.8; // Minimum of 1.8g per kg
proteinGrams = Math.max(minProteinGrams, targetCalories * 0.25 / 4); // Ensure at least 25% of calories or min g/kg
proteinCalories = proteinGrams * 4;
// Set fats to ~25% of total calories
fatGrams = (targetCalories * 0.25) / 9;
fatCalories = fatGrams * 9;
// Carbs fill the remaining calories
carbCalories = targetCalories – proteinCalories – fatCalories;
carbGrams = carbCalories / 4;
// Adjust if calculation results in negative macros (unlikely with proper targetCalories but good practice)
if (proteinCalories < 0) proteinCalories = 0;
if (fatCalories < 0) fatCalories = 0;
if (carbCalories < 0) carbCalories = 0;
proteinGrams = proteinCalories / 4;
fatGrams = fatCalories / 9;
carbGrams = carbCalories / 4;
document.getElementById("result").style.display = "block";
document.getElementById("bmrResult").innerText = "Estimated BMR: " + bmr.toFixed(0) + " kcal";
document.getElementById("tdeeResult").innerText = "Estimated TDEE: " + tdee.toFixed(0) + " kcal";
document.getElementById("proteinGrams").innerText = proteinGrams.toFixed(0);
document.getElementById("proteinCalories").innerText = proteinCalories.toFixed(0);
document.getElementById("carbsGrams").innerText = carbGrams.toFixed(0);
document.getElementById("carbsCalories").innerText = carbCalories.toFixed(0);
document.getElementById("fatsGrams").innerText = fatGrams.toFixed(0);
document.getElementById("fatsCalories").innerText = fatCalories.toFixed(0);
}