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)
Your Daily Nutritional Needs
Basal Metabolic Rate (BMR): — kcal
Total Daily Energy Expenditure (TDEE): — kcal
Protein: — g
Carbohydrates: — g
Fat: — g
Understanding Your Calorie and Macro Needs
Calculating your daily calorie and macronutrient needs is a fundamental step towards achieving your health and fitness goals, whether it's weight loss, muscle gain, or simply maintaining a healthy lifestyle. This calculator uses established formulas to estimate your Basal Metabolic Rate (BMR) and Total Daily Energy Expenditure (TDEE), and then breaks down your TDEE into recommended protein, carbohydrate, and fat intake.
Basal Metabolic Rate (BMR)
Your BMR is the number of calories your body burns at rest to maintain basic life functions like breathing, circulation, and cell production. It's the minimum energy your body requires to function. We use the Mifflin-St Jeor equation, which is widely considered one of the most accurate formulas for estimating BMR:
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
This calculator takes your age, gender, weight, and height to compute your BMR.
Total Daily Energy Expenditure (TDEE)
Your TDEE accounts for your BMR plus the calories you burn through physical activity. It represents the total number of calories you need to consume daily to maintain your current weight. TDEE is calculated by multiplying your BMR by an activity factor:
TDEE = BMR × Activity Factor
The activity factors used in the calculator are standard estimates:
Sedentary: 1.2
Lightly Active: 1.375
Moderately Active: 1.55
Very Active: 1.725
Extra Active: 1.9
Choosing the correct activity level is crucial for an accurate TDEE estimate.
Macronutrient Breakdown
Macronutrients (macros) are the nutrients your body needs in large amounts: protein, carbohydrates, and fats. They provide energy and are essential for bodily functions. The recommended distribution of these macros can vary based on individual goals, but a common starting point for general health and fitness is:
Protein: 4 calories per gram. Recommended intake is often around 1.6-2.2 grams per kg of body weight for active individuals.
Carbohydrates: 4 calories per gram. These are the body's primary energy source.
Fat: 9 calories per gram. Essential for hormone production and nutrient absorption.
This calculator provides a balanced macro split based on your TDEE, prioritizing adequate protein intake. A common approach is to allocate a percentage of your TDEE to each macro:
Protein: Typically 20-30% of TDEE
Fat: Typically 20-30% of TDEE
Carbohydrates: The remaining percentage
For example, if your TDEE is 2000 kcal:
If aiming for 30% protein: (2000 * 0.30) / 4 = 150g protein
If aiming for 25% fat: (2000 * 0.25) / 9 = ~56g fat
This calculator simplifies this by using standard percentages to provide a starting point for your macro targets. Remember, these are estimates, and individual needs may vary. Consulting with a healthcare professional or registered dietitian is recommended for personalized advice.
function calculateMacros() {
var age = parseFloat(document.getElementById("age").value);
var weight = parseFloat(document.getElementById("weight").value);
var height = parseFloat(document.getElementById("height").value);
var activityLevel = parseFloat(document.getElementById("activityLevel").value);
var gender = document.getElementById("gender").value;
var bmr = 0;
var tdee = 0;
var protein = 0;
var carbs = 0;
var fat = 0;
// Validate inputs
if (isNaN(age) || isNaN(weight) || isNaN(height) || isNaN(activityLevel) || age <= 0 || weight <= 0 || height <= 0) {
alert("Please enter valid positive numbers for age, weight, and height.");
return;
}
// Calculate BMR using Mifflin-St Jeor Equation
if (gender === "male") {
bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5;
} else { // female
bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161;
}
// Calculate TDEE
tdee = bmr * activityLevel;
// Calculate Macros (example percentages: 30% Protein, 40% Carbs, 30% Fat)
// These percentages can be adjusted based on goals
var proteinPercentage = 0.30;
var carbPercentage = 0.40;
var fatPercentage = 0.30;
protein = (tdee * proteinPercentage) / 4; // 4 calories per gram of protein
carbs = (tdee * carbPercentage) / 4; // 4 calories per gram of carbs
fat = (tdee * fatPercentage) / 9; // 9 calories per gram of fat
// Display results
document.getElementById("bmrResult").textContent = bmr.toFixed(2);
document.getElementById("tdeeResult").textContent = tdee.toFixed(2);
document.getElementById("proteinResult").textContent = protein.toFixed(2);
document.getElementById("carbsResult").textContent = carbs.toFixed(2);
document.getElementById("fatResult").textContent = fat.toFixed(2);
}