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/physical job/training twice a day)
Maintain Weight
Mild Weight Loss (0.25 kg/week)
Moderate Weight Loss (0.5 kg/week)
Extreme Weight Loss (1 kg/week – use with caution)
Mild Weight Gain (0.25 kg/week)
Moderate Weight Gain (0.5 kg/week)
Custom Macronutrient Ratios (Optional)
Enter percentages for Protein, Fat, and Carbs. If left blank, default ratios will be used.
Your Personalized Calorie & Macro Plan
Basal Metabolic Rate (BMR): calories/day
Total Daily Energy Expenditure (TDEE): calories/day
Your Daily Calorie Goal: calories/day
Protein
g
( kcal)
(%)
Fats
g
( kcal)
(%)
Carbohydrates
g
( kcal)
(%)
*Note: Macronutrient percentages may slightly vary due to rounding.
Disclaimer: This calculator provides estimates based on common formulas. It is not a substitute for professional medical or nutritional advice. Consult with a healthcare provider or registered dietitian for personalized guidance.
function calculateMacros() {
var gender = document.querySelector('input[name="gender"]:checked').value;
var age = parseFloat(document.getElementById('age').value);
var weight = parseFloat(document.getElementById('weight').value); // kg
var height = parseFloat(document.getElementById('height').value); // cm
var activityMultiplier = parseFloat(document.getElementById('activityLevel').value);
var goal = document.getElementById('goal').value;
var customProteinPercent = parseFloat(document.getElementById('customProteinPercent').value);
var customFatPercent = parseFloat(document.getElementById('customFatPercent').value);
var customCarbPercent = parseFloat(document.getElementById('customCarbPercent').value);
// Input validation
if (isNaN(age) || age <= 0 || isNaN(weight) || weight <= 0 || isNaN(height) || height <= 0) {
alert('Please enter valid positive numbers for Age, Weight, and Height.');
return;
}
// 1. Calculate BMR (Basal Metabolic Rate) using Mifflin-St Jeor Equation
var bmr;
if (gender === 'male') {
bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5;
} else { // female
bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161;
}
// 2. Calculate TDEE (Total Daily Energy Expenditure)
var tdee = bmr * activityMultiplier;
// 3. Adjust TDEE for Goal
var calorieGoal = tdee;
switch (goal) {
case 'mildDeficit':
calorieGoal -= 250; // ~0.25 kg/week loss
break;
case 'moderateDeficit':
calorieGoal -= 500; // ~0.5 kg/week loss
break;
case 'extremeDeficit':
calorieGoal -= 1000; // ~1 kg/week loss (caution advised)
break;
case 'mildSurplus':
calorieGoal += 250; // ~0.25 kg/week gain
break;
case 'moderateSurplus':
calorieGoal += 500; // ~0.5 kg/week gain
break;
case 'maintain':
default:
// calorieGoal remains tdee
break;
}
// Ensure calorie goal doesn't go too low (e.g., below 1200 for women, 1500 for men)
if (gender === 'female' && calorieGoal < 1200) calorieGoal = 1200;
if (gender === 'male' && calorieGoal = 0 &&
!isNaN(customFatPercent) && customFatPercent >= 0) {
// If custom protein and fat are provided, calculate carbs to make 100%
if (isNaN(customCarbPercent) || customCarbPercent < 0) {
customCarbPercent = 100 – customProteinPercent – customFatPercent;
if (customCarbPercent 100
}
var totalCustomPercent = customProteinPercent + customFatPercent + customCarbPercent;
if (totalCustomPercent > 99 && totalCustomPercent < 101) { // Allow for slight rounding
useCustomMacros = true;
} else {
alert('Custom macro percentages should sum up to approximately 100%. Using default ratios instead.');
}
}
if (useCustomMacros) {
proteinCalories = calorieGoal * (customProteinPercent / 100);
fatCalories = calorieGoal * (customFatPercent / 100);
carbCalories = calorieGoal * (customCarbPercent / 100);
proteinGrams = proteinCalories / 4;
fatGrams = fatCalories / 9;
carbGrams = carbCalories / 4;
finalProteinPercent = customProteinPercent;
finalFatPercent = customFatPercent;
finalCarbPercent = customCarbPercent;
} else {
// Default macro calculation based on body weight and remaining calories
// Protein: 1.6-2.2g/kg for active individuals. Let's use 1.8g/kg as a general default.
// Fat: 0.8-1.2g/kg. Let's use 1.0g/kg as a general default.
proteinGrams = weight * 1.8; // g/kg
fatGrams = weight * 1.0; // g/kg
proteinCalories = proteinGrams * 4;
fatCalories = fatGrams * 9;
var remainingCalories = calorieGoal – proteinCalories – fatCalories;
if (remainingCalories < 0) remainingCalories = 0; // Prevent negative carb calories
carbCalories = remainingCalories;
carbGrams = carbCalories / 4;
// Calculate percentages for display
finalProteinPercent = (proteinCalories / calorieGoal) * 100;
finalFatPercent = (fatCalories / calorieGoal) * 100;
finalCarbPercent = (carbCalories / calorieGoal) * 100;
}
// Display Results
document.getElementById('bmrResult').innerText = Math.round(bmr);
document.getElementById('tdeeResult').innerText = Math.round(tdee);
document.getElementById('calorieGoalResult').innerText = Math.round(calorieGoal);
document.getElementById('proteinGrams').innerText = Math.round(proteinGrams);
document.getElementById('proteinCalories').innerText = Math.round(proteinCalories);
document.getElementById('proteinPercent').innerText = Math.round(finalProteinPercent);
document.getElementById('fatGrams').innerText = Math.round(fatGrams);
document.getElementById('fatCalories').innerText = Math.round(fatCalories);
document.getElementById('fatPercent').innerText = Math.round(finalFatPercent);
document.getElementById('carbGrams').innerText = Math.round(carbGrams);
document.getElementById('carbCalories').innerText = Math.round(carbCalories);
document.getElementById('carbPercent').innerText = Math.round(finalCarbPercent);
document.getElementById('results').style.display = 'block';
}
Understanding Your Calorie & Macronutrient Needs
Whether your goal is weight loss, muscle gain, or simply maintaining a healthy lifestyle, understanding your daily calorie and macronutrient (macro) requirements is a fundamental step. This calculator helps you estimate these crucial numbers based on your individual characteristics and activity level.
What are Calories?
Calories are units of energy. Your body needs calories to perform all its functions, from breathing and thinking to exercising and digesting food. The number of calories you consume relative to the number you burn determines whether you gain, lose, or maintain weight.
Basal Metabolic Rate (BMR)
Your Basal Metabolic Rate (BMR) is the number of calories your body burns at rest to maintain basic life-sustaining functions like circulation, breathing, and cell production. It's the minimum energy required to keep your body functioning if you were to do nothing but lie in bed all day. Our calculator uses the widely accepted Mifflin-St Jeor equation for accuracy.
Total Daily Energy Expenditure (TDEE)
Your Total Daily Energy Expenditure (TDEE) is the total number of calories your body burns in a 24-hour period, including your BMR and the calories expended through physical activity, digestion, and other daily movements. It's a more realistic estimate of your daily energy needs.
What are Macronutrients (Macros)?
Macronutrients are the nutrients your body needs in large amounts to provide energy and support bodily functions. There are three primary macronutrients:
Protein: Essential for building and repairing tissues, making enzymes and hormones, and supporting immune function. It provides 4 calories per gram.
Fats: Crucial for hormone production, nutrient absorption, and providing a concentrated source of energy. It provides 9 calories per gram.
Carbohydrates: The body's primary source of energy, fueling your brain and muscles. It provides 4 calories per gram.
The right balance of these macros is vital for achieving specific fitness and health goals. For instance, higher protein intake is often recommended for muscle gain or weight loss to preserve lean mass and promote satiety.
How to Use This Calculator
Enter Your Details: Provide your gender, age, weight (in kilograms), and height (in centimeters).
Select Activity Level: Choose the option that best describes your typical weekly exercise routine. Be honest for the most accurate results.
Choose Your Goal: Select whether you want to maintain your current weight, lose weight (mild, moderate, or extreme deficit), or gain weight (mild or moderate surplus).
Custom Macros (Optional): If you have specific dietary preferences or have been advised by a professional, you can input custom percentages for protein, fat, and carbohydrates. If left blank, the calculator will use general recommendations.
Calculate: Click the "Calculate My Macros" button to get your personalized calorie and macronutrient breakdown.
Interpreting Your Results
The calculator will provide your estimated BMR, TDEE, and a daily calorie goal tailored to your chosen objective. More importantly, it will break down these calories into recommended grams and percentages of protein, fats, and carbohydrates. Use these numbers as a starting point for planning your meals and tracking your intake.
Example Scenario:
Let's say a 30-year-old male, weighing 70 kg and 175 cm tall, is moderately active and aims for moderate weight loss. The calculator might suggest:
This individual would then aim to consume around 2060 calories daily, with a focus on hitting those protein, fat, and carb targets to support their weight loss journey effectively.
Important Considerations
Individual Variation: These calculations are estimates. Metabolism, genetics, and other factors can cause individual needs to vary.
Listen to Your Body: Pay attention to how you feel. If you're constantly hungry or excessively fatigued, you might need to adjust your intake.
Nutrient Density: Focus on consuming whole, unprocessed foods to meet your macro targets, ensuring you also get essential micronutrients (vitamins and minerals).
Consistency is Key: Adhering to your plan consistently over time will yield the best results.
Professional Advice: For specific health conditions, extreme goals, or if you're unsure, always consult with a doctor or a registered dietitian.