Food Calories Calculator

.cal-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e1e1e1; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); color: #333; } .cal-header { text-align: center; margin-bottom: 30px; } .cal-header h2 { color: #2c3e50; font-size: 28px; margin-bottom: 10px; } .cal-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px; } .cal-group { flex: 1; min-width: 200px; } .cal-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; } .cal-group input, .cal-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; font-size: 16px; } .cal-btn { background-color: #27ae60; color: white; padding: 15px 30px; border: none; border-radius: 6px; cursor: pointer; font-size: 18px; font-weight: bold; width: 100%; margin-top: 10px; transition: background 0.3s; } .cal-btn:hover { background-color: #219150; } .cal-result-box { margin-top: 30px; padding: 20px; background-color: #f9f9f9; border-radius: 8px; border-left: 5px solid #27ae60; display: none; } .cal-result-title { font-size: 20px; font-weight: bold; margin-bottom: 15px; color: #2c3e50; border-bottom: 1px solid #ddd; padding-bottom: 10px; } .cal-metric { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 16px; } .cal-val { font-weight: bold; color: #27ae60; font-size: 18px; } .cal-article { margin-top: 40px; line-height: 1.6; color: #444; } .cal-article h3 { color: #2c3e50; margin-top: 25px; } .cal-article p { margin-bottom: 15px; } .cal-table { width: 100%; border-collapse: collapse; margin: 20px 0; } .cal-table th, .cal-table td { border: 1px solid #ddd; padding: 12px; text-align: left; } .cal-table th { background-color: #f4f4f4; } @media (max-width: 600px) { .cal-row { flex-direction: column; } }

Daily Calorie & TDEE Calculator

Calculate your daily energy needs based on the Mifflin-St Jeor Equation.

Male Female
Sedentary (Little to no exercise) Lightly Active (1-3 days/week) Moderately Active (3-5 days/week) Very Active (6-7 days/week) Extra Active (Physical job or 2x training)
Your Personalized Results
Basal Metabolic Rate (BMR): 0
Maintenance Calories (TDEE): 0
To Lose 0.5kg / week: 0
To Gain 0.5kg / week: 0

Understanding Your Calorie Requirements

Food calories are the energy stored in the chemical bonds of the food we consume. This calculator uses the Mifflin-St Jeor Equation, widely considered the most accurate formula for predicting Basal Metabolic Rate (BMR) and Total Daily Energy Expenditure (TDEE) in clinical settings.

BMR vs. TDEE: What's the Difference?

Basal Metabolic Rate (BMR) is the number of calories your body burns at complete rest just to keep your organs functioning (heart beating, lungs breathing, etc.). It does not include the energy used for walking, talking, or even digesting food.

Total Daily Energy Expenditure (TDEE) is an estimation of how many calories you burn per day when exercise and physical activity are taken into account. This is your "maintenance level"—the amount of food calories you should consume to stay at your current weight.

The Science of Weight Management

The fundamental principle of weight management is the energy balance equation:

  • Weight Loss: Consuming fewer calories than your TDEE (Caloric Deficit).
  • Weight Gain: Consuming more calories than your TDEE (Caloric Surplus).
  • Maintenance: Consuming calories equal to your TDEE.

Macro-nutrients and Caloric Density

Nutrient Calories per Gram Function
Protein 4 kcal Muscle repair and enzyme production
Carbohydrates 4 kcal Primary energy source for the brain and muscles
Fats 9 kcal Hormone production and vitamin absorption

Example Calculation

Consider a 30-year-old male, 180cm tall, weighing 85kg with a "Moderately Active" lifestyle:

1. BMR = (10 × 85) + (6.25 × 180) – (5 × 30) + 5 = 1,830 calories.

2. TDEE = 1,830 × 1.55 = 2,836 calories.

To lose weight safely, he might target 2,336 calories (a 500-calorie deficit).

function calculateCalories() { var gender = document.getElementById("gender").value; var age = parseFloat(document.getElementById("age").value); var weight = parseFloat(document.getElementById("weight").value); var height = parseFloat(document.getElementById("height").value); var activity = parseFloat(document.getElementById("activity").value); var resultBox = document.getElementById("calorieResult"); if (isNaN(age) || isNaN(weight) || isNaN(height)) { alert("Please enter valid numbers for age, weight, and height."); return; } var bmr = 0; if (gender === "male") { bmr = (10 * weight) + (6.25 * height) – (5 * age) + 5; } else { bmr = (10 * weight) + (6.25 * height) – (5 * age) – 161; } var tdee = bmr * activity; var lose = tdee – 500; var gain = tdee + 500; document.getElementById("bmrVal").innerHTML = Math.round(bmr) + " kcal/day"; document.getElementById("tdeeVal").innerHTML = Math.round(tdee) + " kcal/day"; document.getElementById("loseVal").innerHTML = Math.max(1200, Math.round(lose)) + " kcal/day"; document.getElementById("gainVal").innerHTML = Math.round(gain) + " kcal/day"; resultBox.style.display = "block"; resultBox.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }

Leave a Comment