Keto Diet Calculator Macros

Keto Macro Calculator

Calculate your personalized Ketogenic macros for optimal ketosis

Male Female
Sedentary (Office job) Lightly Active (1-3 days/week) Moderately Active (3-5 days/week) Very Active (6-7 days/week) Professional Athlete
Lose Weight (20% Deficit) Lose Weight (10% Deficit) Maintain Weight Gain Weight (10% Surplus)

Your Daily Keto Targets

Calories
0
kcal / day
Net Carbs
0
grams
Protein
0
grams
Fat
0
grams

Macro Percentage Breakdown

Carbs (%) Protein (%) Fat (%)

Understanding Your Keto Macros

A ketogenic diet is a high-fat, moderate-protein, and very low-carb nutritional approach. By limiting carbohydrates, your body enters a metabolic state called ketosis, where it burns fat for fuel instead of glucose.

How the Calculation Works

This calculator uses the Mifflin-St Jeor equation to determine your Basal Metabolic Rate (BMR) and adjusts it based on your activity level and goals. To maintain ketosis, the calculator prioritizes a low carbohydrate intake (usually 20g-30g net carbs) and sets protein based on your body weight to prevent muscle loss.

Example Macro Distribution:

  • Weight: 85kg Male
  • Goal: Weight Loss
  • Calories: ~1,850 kcal
  • Fat: 145g (70%)
  • Protein: 116g (25%)
  • Net Carbs: 23g (5%)

The Three Pillars of Keto Macros

  1. Net Carbs: These are a strict limit. Subtract fiber from total carbs to get your net carbs. Keeping these low is what triggers ketosis.
  2. Protein: This is a goal. You need enough to maintain your lean muscle mass, especially while losing weight. We recommend 1.6g to 2.2g per kg of body weight.
  3. Fat: This is a lever. Use fat to reach your calorie goal and to feel satiated. If you are trying to lose weight, you don't necessarily have to "hit" your fat macro if you aren't hungry.

Tips for Success

  • Stay Hydrated: Keto has a diuretic effect. Drink plenty of water and replenish electrolytes (sodium, potassium, magnesium).
  • Focus on Whole Foods: Prioritize avocados, olive oil, grass-fed meats, and leafy greens over "keto-labeled" processed snacks.
  • Track Your Progress: Use an app to log your meals for the first few weeks until you get a feel for the portion sizes.
function calculateKetoMacros() { 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); var carbLimit = parseFloat(document.getElementById("keto_carbs").value); var proteinRatio = parseFloat(document.getElementById("keto_protein_ratio").value); if (isNaN(age) || isNaN(weight) || isNaN(height) || isNaN(carbLimit) || isNaN(proteinRatio)) { alert("Please enter valid numerical values."); return; } // BMR Calculation (Mifflin-St Jeor) 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; } // TDEE and Goal Calories var tdee = bmr * activity; var targetCalories = Math.round(tdee * goalFactor); // Protein Calculation (4 kcal per gram) var proteinGrams = Math.round(weight * proteinRatio); var proteinCalories = proteinGrams * 4; // Carb Calculation (4 kcal per gram) var carbGrams = carbLimit; var carbCalories = carbGrams * 4; // Fat Calculation (9 kcal per gram) var fatCalories = targetCalories – proteinCalories – carbCalories; if (fatCalories < 0) { fatCalories = 0; // Edge case safety } var fatGrams = Math.round(fatCalories / 9); // Recalculate total to be precise based on gram rounding var finalTotalCal = (carbGrams * 4) + (proteinGrams * 4) + (fatGrams * 9); // Percentages var pCarb = Math.round((carbGrams * 4 / finalTotalCal) * 100); var pProtein = Math.round((proteinGrams * 4 / finalTotalCal) * 100); var pFat = 100 – pCarb – pProtein; // Display Results document.getElementById("res_calories").innerText = finalTotalCal.toLocaleString(); document.getElementById("res_carbs").innerText = carbGrams; document.getElementById("res_protein").innerText = proteinGrams; document.getElementById("res_fat").innerText = fatGrams; document.getElementById("perc_carbs").innerText = pCarb; document.getElementById("perc_protein").innerText = pProtein; document.getElementById("perc_fat").innerText = pFat; document.getElementById("bar_carbs").style.width = pCarb + "%"; document.getElementById("bar_protein").style.width = pProtein + "%"; document.getElementById("bar_fat").style.width = pFat + "%"; document.getElementById("keto_results").style.display = "block"; // Smooth scroll to results document.getElementById("keto_results").scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }

Leave a Comment