Calculate your daily macronutrient targets for a ketogenic diet.
Male
Female
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)
Weight Loss (-0.5 kg/week)
Maintain Weight
Weight Gain (+0.5 kg/week)
Your Keto Macros
Target Daily Intake:
Carbohydrates:
Protein:
Fat:
Understanding Ketogenic Diet Macros
The ketogenic (keto) diet is a very low-carbohydrate, high-fat eating pattern. The goal is to shift the body's primary energy source from glucose (from carbohydrates) to ketones (produced from fat). This metabolic state is known as ketosis. To achieve and maintain ketosis, precise macronutrient ratios are crucial.
What are Macronutrients?
Macronutrients, or "macros," are the nutrients your body needs in large amounts to provide energy. These include carbohydrates, protein, and fat.
Keto Macro Ratios
A typical ketogenic diet follows these macro guidelines:
Fat: 70-75% of daily calories
Protein: 20-25% of daily calories
Carbohydrates: 5-10% of daily calories (typically under 20-50 grams net carbs per day)
How This Calculator Works:
This calculator estimates your daily caloric needs and then breaks them down into keto-friendly macronutrient targets. It uses a common formula to estimate Basal Metabolic Rate (BMR) and then adjusts for activity level to find your Total Daily Energy Expenditure (TDEE).
1. Basal Metabolic Rate (BMR) Calculation:
We use the Mifflin-St Jeor Equation, considered one of the most accurate for estimating BMR:
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
2. Total Daily Energy Expenditure (TDEE) Calculation:
Your TDEE is your BMR multiplied by an activity factor:
TDEE = BMR × Activity Factor
The activity factors used are standard estimates:
Sedentary: 1.2
Lightly Active: 1.375
Moderately Active: 1.55
Very Active: 1.725
Extra Active: 1.9
3. Calorie Adjustment for Goals:
To achieve weight loss, gain, or maintenance, calories are adjusted:
Weight Loss: TDEE – 500 calories (approximately 0.5 kg loss per week)
Maintain Weight: TDEE
Weight Gain: TDEE + 500 calories (approximately 0.5 kg gain per week)
Note: Calorie adjustments are capped to prevent excessively low or high targets.
4. Macronutrient Breakdown:
Once the target daily calories are determined, they are distributed according to keto ratios:
Carbohydrates: 5% of target calories. (1 gram of carb = 4 calories)
Protein: 25% of target calories. (1 gram of protein = 4 calories)
Fat: 70% of target calories. (1 gram of fat = 9 calories)
Who Should Use a Keto Macro Calculator?
This calculator is beneficial for individuals:
Starting the ketogenic diet
Looking to optimize their keto results
Seeking to lose, maintain, or gain weight on keto
Wanting to ensure they are getting adequate protein and not too many carbs
Important Considerations:
This calculator provides estimates. Individual needs can vary based on metabolism, body composition, and specific health conditions. It's always recommended to consult with a healthcare professional or registered dietitian before making significant dietary changes.
function calculateMacros() {
var gender = document.getElementById("gender").value;
var age = parseFloat(document.getElementById("age").value);
var weight = parseFloat(document.getElementById("weight").value);
var heightFt = parseFloat(document.getElementById("heightFt").value);
var heightIn = parseFloat(document.getElementById("heightIn").value);
var activityLevel = parseFloat(document.getElementById("activityLevel").value);
var goal = parseFloat(document.getElementById("goal").value);
// Basic Input Validation
if (isNaN(age) || isNaN(weight) || isNaN(heightFt) || isNaN(heightIn) || age <= 0 || weight <= 0 || heightFt < 0 || heightIn < 0) {
alert("Please enter valid numbers for Age, Weight, and Height.");
return;
}
// Convert height to centimeters
var heightCm = (heightFt * 12 + heightIn) * 2.54;
var bmr;
// Mifflin-St Jeor Equation
if (gender === "male") {
bmr = (10 * weight) + (6.25 * heightCm) – (5 * age) + 5;
} else { // female
bmr = (10 * weight) + (6.25 * heightCm) – (5 * age) – 161;
}
var tdee = bmr * activityLevel;
// Adjust calories based on goal
var targetCalories = tdee + (goal * 475); // Approximately 500 calories difference for 0.5kg per week
// Ensure minimum calorie intake
if (targetCalories < 1200) {
targetCalories = 1200;
}
// Macronutrient Calculations (Keto Ratios: 70% Fat, 25% Protein, 5% Carbs)
var carbCalories = targetCalories * 0.05;
var proteinCalories = targetCalories * 0.25;
var fatCalories = targetCalories * 0.70;
var carbsGrams = carbCalories / 4;
var proteinGrams = proteinCalories / 4;
var fatGrams = fatCalories / 9;
// Display Results
document.getElementById("caloriesResult").textContent = Math.round(targetCalories) + " kcal";
document.getElementById("carbsResult").textContent = Math.round(carbsGrams) + "g";
document.getElementById("proteinResult").textContent = Math.round(proteinGrams) + "g";
document.getElementById("fatResult").textContent = Math.round(fatGrams) + "g";
document.getElementById("result").style.display = "block";
}