Advanced TDEE Calculator
/* Scope styles to avoid WordPress conflicts */
.tdee-calculator-wrapper {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: #f9f9f9;
border: 1px solid #e1e1e1;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.tdee-calc-header {
text-align: center;
margin-bottom: 25px;
}
.tdee-calc-header h2 {
margin: 0;
color: #2c3e50;
font-size: 24px;
}
.tdee-form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
@media (max-width: 600px) {
.tdee-form-grid {
grid-template-columns: 1fr;
}
}
.tdee-input-group {
margin-bottom: 15px;
}
.tdee-input-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #444;
font-size: 14px;
}
.tdee-input-group input, .tdee-input-group select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.tdee-input-group input:focus, .tdee-input-group select:focus {
border-color: #0073aa;
outline: none;
box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}
.height-group {
display: flex;
gap: 10px;
}
.height-group input {
width: 50%;
}
.tdee-btn {
grid-column: 1 / -1;
background-color: #0073aa;
color: white;
border: none;
padding: 15px 20px;
font-size: 18px;
font-weight: bold;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.2s;
width: 100%;
margin-top: 10px;
}
.tdee-btn:hover {
background-color: #005177;
}
.tdee-results {
display: none;
margin-top: 30px;
background: #fff;
padding: 20px;
border-radius: 8px;
border-left: 5px solid #0073aa;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.result-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid #eee;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
font-weight: 500;
color: #555;
}
.result-value {
font-weight: 800;
font-size: 18px;
color: #2c3e50;
}
.highlight-tdee {
background-color: #f0f7fb;
padding: 15px;
border-radius: 5px;
margin-bottom: 15px;
text-align: center;
}
.highlight-tdee .result-value {
font-size: 32px;
color: #0073aa;
display: block;
}
.tdee-content {
max-width: 800px;
margin: 40px auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
line-height: 1.6;
color: #333;
}
.tdee-content h2 {
color: #2c3e50;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
margin-top: 30px;
}
.tdee-content h3 {
color: #0073aa;
margin-top: 25px;
}
.tdee-content ul {
background: #fdfdfd;
padding: 20px 40px;
border-radius: 5px;
border: 1px solid #eee;
}
.tdee-content li {
margin-bottom: 10px;
}
Your Maintenance Calories:
0
Calories per day
Basal Metabolic Rate (BMR)
0
Mild Weight Loss (0.5 lb/week)
0
Standard Weight Loss (1 lb/week)
0
Mild Weight Gain (0.5 lb/week)
0
Standard Weight Gain (1 lb/week)
0
function calculateTDEE() {
// Get Input Values
var gender = document.getElementById("tdeeGender").value;
var age = parseFloat(document.getElementById("tdeeAge").value);
var weightLbs = parseFloat(document.getElementById("tdeeWeight").value);
var heightFt = parseFloat(document.getElementById("tdeeHeightFt").value);
var heightIn = parseFloat(document.getElementById("tdeeHeightIn").value);
var activityMultiplier = parseFloat(document.getElementById("tdeeActivity").value);
// Basic Validation
if (isNaN(age) || isNaN(weightLbs) || isNaN(heightFt)) {
alert("Please enter valid numbers for Age, Weight, and Height.");
return;
}
// Default inches to 0 if empty
if (isNaN(heightIn)) {
heightIn = 0;
}
// Convert Imperial to Metric for Formula (Mifflin-St Jeor)
var weightKg = weightLbs / 2.20462;
var totalHeightInches = (heightFt * 12) + heightIn;
var heightCm = totalHeightInches * 2.54;
// Calculate BMR
var bmr = 0;
if (gender === "male") {
// (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) + 5
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) + 5;
} else {
// (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) – 161
bmr = (10 * weightKg) + (6.25 * heightCm) – (5 * age) – 161;
}
// Calculate TDEE
var tdee = bmr * activityMultiplier;
// Display Logic
var resultDiv = document.getElementById("tdeeResult");
resultDiv.style.display = "block";
// Set Text Content
document.getElementById("mainResult").innerText = Math.round(tdee).toLocaleString() + " kcal";
document.getElementById("bmrResult").innerText = Math.round(bmr).toLocaleString() + " kcal";
// Weight Loss/Gain calcs
document.getElementById("lossMild").innerText = Math.round(tdee * 0.90).toLocaleString() + " kcal"; // Approx -10% or -250
document.getElementById("lossStandard").innerText = Math.round(tdee * 0.80).toLocaleString() + " kcal"; // Approx -20% or -500
document.getElementById("gainMild").innerText = Math.round(tdee * 1.10).toLocaleString() + " kcal";
document.getElementById("gainStandard").innerText = Math.round(tdee * 1.20).toLocaleString() + " kcal";
}
What is TDEE and Why Does It Matter?
Your Total Daily Energy Expenditure (TDEE) is an estimation of how many calories you burn each day when exercise is taken into account. It is calculated by first determining your Basal Metabolic Rate (BMR), then multiplying that value by an activity multiplier.
Understanding your TDEE is the fundamental first step in any fitness journey, whether your goal is to lose fat, build muscle, or maintain your current physique.
The Difference Between BMR and TDEE
- BMR (Basal Metabolic Rate): This represents the number of calories your body needs just to perform basic life-sustaining functions like breathing, circulation, and cell production while at complete rest.
- TDEE (Total Daily Energy Expenditure): This is your BMR plus the calories burned through physical activity, digestion (Thermic Effect of Food), and non-exercise movement.
How to Use Your TDEE Number
Once you have calculated your TDEE using the calculator above, you can use this number to structure your diet plan:
1. For Weight Maintenance
Simply eat the amount of calories equal to your TDEE. This is your "maintenance calories" level. Your weight should remain relatively stable.
2. For Weight Loss (Cutting)
To lose weight, you must be in a caloric deficit. A safe and sustainable deficit is typically 15-20% below your TDEE. For most people, this equates to roughly 500 calories less than their maintenance level per day, which theoretically results in 1lb of fat loss per week.
3. For Muscle Gain (Bulking)
To build muscle optimally, you need a caloric surplus. Eating 250-500 calories above your TDEE provides the energy required for hypertrophy (muscle growth) without gaining excessive body fat.
Activity Level Definitions
Choosing the correct activity level is crucial for an accurate calculation. Be honest with yourself!
- Sedentary: Desk job, little to no intentional exercise.
- Lightly Active: Light exercise or sports 1-3 days a week.
- Moderately Active: Moderate intensity exercise or sports 3-5 days a week.
- Very Active: Hard exercise or sports 6-7 days a week.
- Super Active: Very hard daily exercise/sports and a physical job, or 2x daily training.
Factors Affecting Your TDEE
While this calculator uses the Mifflin-St Jeor equation (considered the most accurate standard formula), individual TDEE can vary based on:
- Muscle Mass: Muscle tissue burns more calories at rest than fat tissue.
- Age: Metabolism generally slows as we age.
- Hormones: Thyroid issues and other hormonal balances can impact metabolic rate.
- Genetics: Some individuals naturally have a higher "non-exercise activity thermogenesis" (NEAT), meaning they fidget and move more subconsciously.
Disclaimer: This calculator provides an estimate. For best results, track your weight and calorie intake for 2-3 weeks and adjust based on real-world results.