Macro & TDEE
Fuel Your Performance.
Your Total Daily Energy Expenditure (TDEE) is the exact number of calories you burn per day. Whether your goal is to shed stubborn fat or build lean muscle, calculating your baseline is step one. Enter your metrics to get your personalized macronutrient breakdown.
Macro & TDEE Calculator
If provided, protein is set to 1.2g per lb (2.6g per kg) of lean mass instead of a flat 1g per lb (2.2g per kg) of total bodyweight — more accurate at higher body-fat levels.
Disclaimer: This tool is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment.
Your Results
Daily Target: 0 Calories
0g
0g
0g
let currentUnit = 'imperial';
function setUnit(unit) { currentUnit = unit; const btns = document.querySelectorAll('.toggle-btn'); btns.forEach(btn => btn.classList.remove('active'));
if (unit === 'imperial') { btns[0].classList.add('active'); document.getElementById('weightLabel').innerText = 'Weight (lbs)'; document.getElementById('heightLabel').innerText = 'Height (inches)'; document.getElementById('weight').placeholder = 'e.g. 180'; document.getElementById('height').placeholder = 'e.g. 70'; } else { btns[1].classList.add('active'); document.getElementById('weightLabel').innerText = 'Weight (kg)'; document.getElementById('heightLabel').innerText = 'Height (cm)'; document.getElementById('weight').placeholder = 'e.g. 80'; document.getElementById('height').placeholder = 'e.g. 175'; } }
function calculateTDEE() { const gender = document.getElementById('gender').value; const age = parseFloat(document.getElementById('age').value); let weight = parseFloat(document.getElementById('weight').value); let height = parseFloat(document.getElementById('height').value); const activity = parseFloat(document.getElementById('activity').value); const goal = document.getElementById('goal').value; const bodyfat = parseFloat(document.getElementById('bodyfat').value);
if (!age || !weight || !height) { alert('Please fill in all fields.'); return; }
const weightLbsOriginal = currentUnit === 'imperial' ? weight : weight * 2.20462;
// Convert to metric for Mifflin-St Jeor formula if (currentUnit === 'imperial') { weight = weight * 0.453592; // lbs to kg height = height * 2.54; // inches to cm }
// Mifflin-St Jeor Equation let bmr = (10 * weight) + (6.25 * height) - (5 * age); bmr = gender === 'male' ? bmr + 5 : bmr - 161;
let tdee = bmr * activity;
if (goal === 'cut') tdee -= 500; if (goal === 'bulk') tdee += 300;
tdee = Math.round(tdee);
// Protein calculation let protein; const noteEl = document.getElementById('proteinNote'); if (bodyfat && bodyfat > 0 && bodyfat < 60) { const leanMassLbs = weightLbsOriginal * (1 - bodyfat / 100); protein = Math.round(leanMassLbs * 1.2); // 1.2g per lb lean mass noteEl.style.display = 'block'; noteEl.innerText = 'Protein target based on ' + Math.round(leanMassLbs) + ' lbs of estimated lean mass (1.2g/lb).'; } else { protein = Math.round(weightLbsOriginal * 1); // fallback: 1g per lb total bodyweight noteEl.style.display = 'none'; } // Fat: 25% of total calories let fatCalories = tdee * 0.25; let fat = Math.round(fatCalories / 9); // Carbs: the rest let carbCalories = tdee - (protein * 4) - fatCalories; let carbs = Math.round(carbCalories / 4); document.getElementById('tdeeResult').innerText = tdee; document.getElementById('proteinResult').innerText = protein + 'g'; document.getElementById('fatResult').innerText = fat + 'g'; document.getElementById('carbResult').innerText = carbs + 'g'; document.getElementById('results').style.display = 'block'; }
let currentUnit = 'imperial';
function setUnit(unit) { currentUnit = unit; const btns = document.querySelectorAll('.toggle-btn'); btns.forEach(btn => btn.classList.remove('active'));
if (unit === 'imperial') { btns[0].classList.add('active'); document.getElementById('weightLabel').innerText = 'Weight (lbs)'; document.getElementById('heightLabel').innerText = 'Height (inches)'; document.getElementById('weight').placeholder = 'e.g. 180'; document.getElementById('height').placeholder = 'e.g. 70'; } else { btns[1].classList.add('active'); document.getElementById('weightLabel').innerText = 'Weight (kg)'; document.getElementById('heightLabel').innerText = 'Height (cm)'; document.getElementById('weight').placeholder = 'e.g. 80'; document.getElementById('height').placeholder = 'e.g. 175'; } }
function calculateTDEE() { const gender = document.getElementById('gender').value; const age = parseFloat(document.getElementById('age').value); let weight = parseFloat(document.getElementById('weight').value); let height = parseFloat(document.getElementById('height').value); const activity = parseFloat(document.getElementById('activity').value); const goal = document.getElementById('goal').value; const bodyfat = parseFloat(document.getElementById('bodyfat').value);
if (!age || !weight || !height) { alert('Please fill in all fields.'); return; }
const weightLbsOriginal = currentUnit === 'imperial' ? weight : weight * 2.20462;
// Convert to metric for Mifflin-St Jeor formula if (currentUnit === 'imperial') { weight = weight * 0.453592; // lbs to kg height = height * 2.54; // inches to cm }
// Mifflin-St Jeor Equation let bmr = (10 * weight) + (6.25 * height) - (5 * age); bmr = gender === 'male' ? bmr + 5 : bmr - 161;
let tdee = bmr * activity;
if (goal === 'cut') tdee -= 500; if (goal === 'bulk') tdee += 300;
tdee = Math.round(tdee);
// Protein calculation
let protein;
const noteEl = document.getElementById('proteinNote');
if (bodyfat && bodyfat > 0 && bodyfat < 60) {
const leanMassLbs = weightLbsOriginal * (1 - bodyfat / 100);
protein = Math.round(leanMassLbs * 1.2); // 1.2g per lb lean mass
noteEl.style.display = 'block';
noteEl.innerText = 'Protein target based on ' + Math.round(leanMassLbs) + ' lbs of estimated lean mass (1.2g/lb).';
} else {
protein = Math.round(weightLbsOriginal * 1); // fallback: 1g per lb total bodyweight
noteEl.style.display = 'none';
}
// Fat: 25% of total calories
let fatCalories = tdee * 0.25;
let fat = Math.round(fatCalories / 9);
// Carbs: the rest
let carbCalories = tdee - (protein * 4) - fatCalories;
let carbs = Math.round(carbCalories / 4);
document.getElementById('tdeeResult').innerText = tdee;
document.getElementById('proteinResult').innerText = protein + 'g';
document.getElementById('fatResult').innerText = fat + 'g';
document.getElementById('carbResult').innerText = carbs + 'g';
document.getElementById('results').style.display = 'block';
}