Calculate your personalized ketogenic nutrition plan
Male
Female
Sedentary (Office job)
Lightly Active (1-3 days/week)
Moderately Active (3-5 days/week)
Very Active (6-7 days/week)
Weight Loss (-20%)
Maintenance
Muscle Gain (+10%)
Your Daily Targets
0 Calories / Day
Carbs
0g
(5% of calories)
Protein
0g
(25% of calories)
Fats
0g
(70% of calories)
How to Use the Keto Macro Calculator
The Ketogenic (Keto) diet relies on a metabolic state called ketosis, where your body burns fat for fuel instead of glucose. To achieve this, you must strictly monitor your macronutrient intake. This calculator uses the Mifflin-St Jeor equation to estimate your caloric needs and then applies standard keto ratios to help you reach your goals.
Why Macro Ratios Matter
On a standard keto diet, the most important rule is keeping your net carbohydrates low enough to deplete glycogen stores. Typically, this follows these guidelines:
Fats: 70-75% of your total calories. Fats are your primary energy source.
Protein: 20-25% of your total calories. Essential for muscle maintenance.
Carbohydrates: 5-10% of your total calories (usually under 25-50g net carbs).
Practical Keto Calculation Example
Imagine a 30-year-old male, weighing 80kg, 180cm tall, with a sedentary lifestyle, wanting to lose weight:
BMR Calculation: (10 x 80) + (6.25 x 180) – (5 x 30) + 5 = 1,780 calories.
TDEE Calculation: 1,780 x 1.2 (sedentary) = 2,136 calories.
Q: What are "Net Carbs"? A: Net carbs are total carbohydrates minus fiber and sugar alcohols. Fiber doesn't raise blood sugar levels, so it's excluded from the keto daily limit.
Q: Can I eat too much protein on Keto? A: While a process called gluconeogenesis can turn protein into glucose, it is generally demand-driven. Moderate protein (around 1.5g to 2g per kg of body weight) is safe and recommended.
Q: How long does it take to enter ketosis? A: Most people enter ketosis within 2 to 7 days of eating under 25-30 grams of net carbs daily.
function calculateKeto() {
var gender = document.getElementById('keto_gender').value;
var age = parseFloat(document.getElementById('keto_age').value);
var weight = parseFloat(document.getElementById('keto_weight').value);
var height = parseFloat(document.getElementById('keto_height').value);
var activity = parseFloat(document.getElementById('keto_activity').value);
var goalFactor = parseFloat(document.getElementById('keto_goal').value);
if (isNaN(age) || isNaN(weight) || isNaN(height)) {
alert("Please fill in all fields with valid numbers.");
return;
}
var bmr;
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 targetCalories = tdee * goalFactor;
// Standard Keto Ratios: Fat 70%, Protein 25%, Carbs 5%
var carbCalories = targetCalories * 0.05;
var proteinCalories = targetCalories * 0.25;
var fatCalories = targetCalories * 0.70;
// Convert calories to grams: Carbs=4/g, Protein=4/g, Fat=9/g
var carbGrams = Math.round(carbCalories / 4);
var proteinGrams = Math.round(proteinCalories / 4);
var fatGrams = Math.round(fatCalories / 9);
document.getElementById('res_calories').innerText = Math.round(targetCalories).toLocaleString();
document.getElementById('res_carbs').innerText = carbGrams + "g";
document.getElementById('res_protein').innerText = proteinGrams + "g";
document.getElementById('res_fats').innerText = fatGrams + "g";
document.getElementById('keto_results').style.display = 'block';
// Smooth scroll to results
document.getElementById('keto_results').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}