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 or 2x training)
Weight Loss (deficit of 500 calories)
Maintain Weight
Weight Gain (surplus of 500 calories)
Understanding Your Keto Calorie and Macro Needs
The ketogenic diet is a very low-carbohydrate, high-fat diet that has gained significant popularity for its potential benefits in weight management, blood sugar control, and more. To effectively follow a keto diet and achieve your goals, it's crucial to understand your daily calorie and macronutrient (fat, protein, carbohydrates) targets.
Calculating Your Basal Metabolic Rate (BMR)
The first step is to determine your Basal Metabolic Rate (BMR), which is the number of calories your body burns at rest to maintain basic functions. We use the Mifflin-St Jeor equation, which is considered one of the most accurate formulas:
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
Calculating Total Daily Energy Expenditure (TDEE)
Your BMR is then multiplied by an activity factor to estimate your Total Daily Energy Expenditure (TDEE) – the total number of calories you burn in a day, including physical activity. The activity factors used in this calculator are standard multipliers:
Sedentary: 1.2
Lightly Active: 1.375
Moderately Active: 1.55
Very Active: 1.725
Extra Active: 1.9
TDEE = BMR × Activity Factor
Determining Your Keto Calorie Target
To set your daily calorie intake for your specific goal (weight loss, maintenance, or gain), we adjust your TDEE by your desired caloric surplus or deficit.
Weight Loss: TDEE – 500 calories (aims for approximately 1 lb of fat loss per week)
Maintain Weight: TDEE
Weight Gain: TDEE + 500 calories
Setting Keto Macronutrient Ratios
The hallmark of a ketogenic diet is its macronutrient distribution. For most people, the general targets are:
Fat: 70-75% of daily calories
Protein: 20-25% of daily calories
Carbohydrates: 5-10% of daily calories (typically under 20-50g net carbs per day)
This calculator provides your total daily calorie target and then breaks down the macronutrient goals based on these typical keto ratios. Protein is usually calculated first as it's essential for muscle maintenance, and then fat is adjusted to meet the remaining calorie needs while keeping carbs very low.
How to Use This Calculator
Enter your age, weight, height, gender, and typical activity level. Select your primary goal (lose, maintain, or gain weight). The calculator will then provide an estimated daily calorie target and the corresponding macronutrient breakdown for a ketogenic diet. Remember, these are estimates, and individual needs may vary. Adjust as you monitor your progress.
function calculateKetoMacros() {
var age = document.getElementById("age").value;
var weight = document.getElementById("weight").value;
var height = document.getElementById("height").value;
var gender = document.getElementById("gender").value;
var activityLevel = document.getElementById("activityLevel").value;
var goal = document.getElementById("goal").value;
var errorMessage = "";
if (isNaN(age) || age <= 0) errorMessage += "Please enter a valid age.";
if (isNaN(weight) || weight <= 0) errorMessage += "Please enter a valid weight in kg.";
if (isNaN(height) || height <= 0) errorMessage += "Please enter a valid height in cm.";
if (errorMessage) {
document.getElementById("result").innerHTML = 'Error: ' + errorMessage + '';
return;
}
// Convert inputs to numbers
age = parseFloat(age);
weight = parseFloat(weight);
height = parseFloat(height);
activityLevel = parseFloat(activityLevel);
goal = parseFloat(goal);
var bmr;
// 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
var tdee = bmr * activityLevel;
// Calculate Target Calories
var targetCalories = tdee + goal;
// Ensure target calories don't go below a reasonable minimum for health
if (targetCalories < 1200) {
targetCalories = 1200;
// Optionally, inform user they've hit a minimum
}
// Calculate Macros for Keto (approximate ratios)
// Protein: ~25% of calories
// Fat: ~70% of calories
// Carbs: ~5% of calories (this is a general target, specific net carb limits are often more critical)
var proteinCalories = targetCalories * 0.25;
var fatCalories = targetCalories * 0.70;
var carbCalories = targetCalories * 0.05; // This is for total carbs. Net carbs are usually the focus.
var proteinGrams = proteinCalories / 4; // 4 calories per gram of protein
var fatGrams = fatCalories / 9; // 9 calories per gram of fat
var carbGrams = carbCalories / 4; // 4 calories per gram of carbs
// Display the result
var resultHtml = 'Your Estimated Daily Macros:';
resultHtml += 'Target Calories: ' + targetCalories.toFixed(0) + ' kcal';
resultHtml += 'Protein: ' + proteinGrams.toFixed(0) + 'g (approx. 25%)';
resultHtml += 'Fat: ' + fatGrams.toFixed(0) + 'g (approx. 70%)';
resultHtml += 'Carbohydrates: ' + carbGrams.toFixed(0) + 'g (approx. 5%)';
resultHtml += 'Note: Focus on net carbs (total carbs minus fiber) typically under 20-50g for ketosis.';
document.getElementById("result").innerHTML = resultHtml;
}