Keto Diet Calculator

.keto-calc-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e1e4e8; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); color: #333; } .keto-calc-header { text-align: center; margin-bottom: 30px; } .keto-calc-header h2 { color: #2c3e50; margin-bottom: 10px; } .keto-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 600px) { .keto-calc-grid { grid-template-columns: 1fr; } } .keto-input-group { margin-bottom: 15px; } .keto-input-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; color: #4a5568; } .keto-input-group input, .keto-input-group select { width: 100%; padding: 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 16px; box-sizing: border-box; } .keto-calc-btn { grid-column: 1 / -1; background-color: #27ae60; color: white; padding: 15px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background 0.3s; margin-top: 10px; } .keto-calc-btn:hover { background-color: #219150; } .keto-results { margin-top: 30px; padding: 20px; background-color: #f8fafc; border-radius: 8px; display: none; } .keto-results h3 { margin-top: 0; text-align: center; color: #2c3e50; } .macro-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 20px; } .macro-card { background: white; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid #e2e8f0; } .macro-card span { display: block; font-size: 24px; font-weight: bold; color: #27ae60; } .macro-card label { font-size: 12px; text-transform: uppercase; color: #718096; letter-spacing: 1px; } .keto-article { margin-top: 40px; line-height: 1.6; color: #4a5568; } .keto-article h3 { color: #2d3748; margin-top: 25px; }

Keto Diet Macro Calculator

Calculate your daily calories and macronutrients to reach ketosis.

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

Your Personal Keto Blueprint

0

kcal/day

20

grams (5%)

0

grams (25%)

0

grams (70%)

How to Use This Keto Calculator

The Ketogenic diet is a high-fat, moderate-protein, and very low-carbohydrate nutritional plan. To achieve a state of "ketosis"—where your body burns fat for fuel instead of glucose—you must strictly monitor your macronutrient intake. This calculator uses the Mifflin-St Jeor equation to estimate your Basal Metabolic Rate (BMR) and then applies Keto-specific ratios (70% Fat, 25% Protein, 5% Carbs) to your Total Daily Energy Expenditure (TDEE).

Understanding Your Results

  • Net Carbs: We set this at a strict 5% of your calories. Most people need to stay under 20-30g of net carbs daily to remain in ketosis.
  • Protein: Essential for maintaining muscle mass. We've calculated this at 25% of your intake, which is the "goldilocks" zone for keto.
  • Fats: This will be your primary energy source. At 70% of your daily intake, fat provides the satiety and fuel needed on this plan.

Realistic Example

Consider a 35-year-old male weighing 90kg at 180cm tall with a sedentary lifestyle. His maintenance calories are approximately 2,200. To lose weight (20% deficit), he would aim for 1,760 calories. His keto macros would look like this: 22g of Carbs, 110g of Protein, and 137g of Fat.

Tips for Success

Remember that "Net Carbs" are total carbs minus fiber and sugar alcohols. Always stay hydrated and ensure you are getting enough electrolytes (Sodium, Potassium, and Magnesium), as the keto diet causes the body to shed water rapidly in the first few weeks.

function calculateKeto() { var gender = document.getElementById("ketoGender").value; var weight = parseFloat(document.getElementById("ketoWeight").value); var height = parseFloat(document.getElementById("ketoHeight").value); var age = parseFloat(document.getElementById("ketoAge").value); var activity = parseFloat(document.getElementById("ketoActivity").value); var goal = parseFloat(document.getElementById("ketoGoal").value); if (!weight || !height || !age) { alert("Please enter all physical metrics."); return; } // Mifflin-St Jeor Equation 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 = Math.round(tdee * goal); // Keto Standard Ratios: 70% Fat, 25% Protein, 5% Carbs // Carbs: 4 cal/g | Protein: 4 cal/g | Fat: 9 cal/g var carbGrams = Math.round((targetCalories * 0.05) / 4); var proteinGrams = Math.round((targetCalories * 0.25) / 4); var fatGrams = Math.round((targetCalories * 0.70) / 9); document.getElementById("resCalories").innerText = targetCalories.toLocaleString(); document.getElementById("resCarbs").innerText = carbGrams; document.getElementById("resProtein").innerText = proteinGrams; document.getElementById("resFat").innerText = fatGrams; document.getElementById("ketoResults").style.display = "block"; document.getElementById("ketoResults").scrollIntoView({ behavior: 'smooth' }); }

Leave a Comment