Kalori Hesaplayıcı
Yaş, ağırlık, boy ve aktiviteye göre günlük kalori ihtiyacını hesaplayın.
Bunlar Mifflin-St Jeor denklemine dayalı tahminlerdir. Kişiselleştirilmiş beslenme önerileri için bir sağlık uzmanına veya diyetisyene başvurun.
Sıkça Sorulan Sorular
Kod Uygulaması
def bmr_mifflin(weight_kg, height_cm, age, sex):
"""
Mifflin-St Jeor BMR formula.
Parameters:
weight_kg - body weight in kilograms
height_cm - height in centimetres
age - age in years
sex - 'male' or 'female'
Returns Basal Metabolic Rate in kcal/day.
"""
bmr = 10 * weight_kg + 6.25 * height_cm - 5 * age
return bmr + 5 if sex == "male" else bmr - 161
ACTIVITY_MULTIPLIERS = {
"sedentary": 1.2, # little or no exercise
"light": 1.375, # 1-3 days/week
"moderate": 1.55, # 3-5 days/week
"active": 1.725, # 6-7 days/week
"very_active": 1.9, # twice/day or physical job
}
def tdee(weight_kg, height_cm, age, sex, activity_level="moderate"):
"""Total Daily Energy Expenditure = BMR × activity multiplier."""
b = bmr_mifflin(weight_kg, height_cm, age, sex)
return b * ACTIVITY_MULTIPLIERS[activity_level]
def macros(calories, protein_pct=0.30, carb_pct=0.40, fat_pct=0.30):
"""
Split calories into macronutrient grams.
Default split: 30% protein / 40% carbs / 30% fat.
protein & carbs = 4 kcal/g; fat = 9 kcal/g.
"""
return {
"protein_g": calories * protein_pct / 4,
"carbs_g": calories * carb_pct / 4,
"fat_g": calories * fat_pct / 9,
}
# Example: 30-year-old male, 80 kg, 175 cm, moderately active
b = bmr_mifflin(80, 175, 30, "male")
t = tdee(80, 175, 30, "male", "moderate")
m = macros(t)
print(f"BMR: {b:.0f} kcal/day")
print(f"TDEE (moderate): {t:.0f} kcal/day")
print(f"Protein: {m['protein_g']:.0f} g")
print(f"Carbs: {m['carbs_g']:.0f} g")
print(f"Fat: {m['fat_g']:.0f} g")
# Weight-loss / gain targets
print(f"\nWeight loss (-500 kcal): {t - 500:.0f} kcal/day")
print(f"Weight gain (+500 kcal): {t + 500:.0f} kcal/day")
Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.