🛠️ToolsShed

Macro Calculator

Calculate daily carbohydrate, protein, and fat targets based on your calorie goal.

Der Makro-Rechner berechnet die empfohlene tägliche Aufnahme der drei Makronährstoffe — Protein, Kohlenhydrate und Fett — basierend auf Ihrem Kalorienziel und Fitnessziel. Makronährstoffe liefern Energie: Protein 4 kcal/g, Kohlenhydrate 4 kcal/g, Fett 9 kcal/g.

Geben Sie Ihr tägliches Kalorienziel, Körpergewicht und primäres Fitnessziel ein. Das Tool wendet evidenzbasierte Makro-Verhältnisse an: Für Muskelaufbau wird ein höheres Proteinziel (ca. 1,6-2,2g pro kg Körpergewicht) mit ausreichend Kohlenhydraten und mäßiger Fettzufuhr empfohlen.

Makro-Ziele sind Richtlinien, keine absoluten Regeln. Die individuelle Reaktion variiert. Viele Menschen stellen fest, dass das Tracking von Makros für einige Wochen ausreichendes Ernährungsbewusstsein entwickelt, um intuitiv gut zu essen.

Häufig gestellte Fragen

Code-Implementierung

def calculate_macros(weight_kg: float, height_cm: float, age: int,
                     sex: str, activity: float, goal: str) -> dict:
    """
    Calculate TDEE and macronutrient targets using Mifflin-St Jeor BMR.
    sex: 'male' or 'female'
    activity: 1.2=sedentary, 1.375=light, 1.55=moderate, 1.725=active, 1.9=very active
    goal: 'lose' (-500 kcal), 'maintain', 'gain' (+300 kcal)
    """
    if sex == "male":
        bmr = 10 * weight_kg + 6.25 * height_cm - 5 * age + 5
    else:
        bmr = 10 * weight_kg + 6.25 * height_cm - 5 * age - 161

    tdee = bmr * activity
    adjustment = {"lose": -500, "maintain": 0, "gain": 300}.get(goal, 0)
    target_calories = tdee + adjustment

    # Macro splits (lose: 40/35/25, maintain: 35/40/25, gain: 30/45/25)
    splits = {"lose": (0.40, 0.35, 0.25), "maintain": (0.35, 0.40, 0.25), "gain": (0.30, 0.45, 0.25)}
    p_ratio, c_ratio, f_ratio = splits.get(goal, (0.35, 0.40, 0.25))

    protein_g = target_calories * p_ratio / 4
    carbs_g   = target_calories * c_ratio / 4
    fat_g     = target_calories * f_ratio / 9

    return {
        "bmr": round(bmr), "tdee": round(tdee),
        "target_calories": round(target_calories),
        "protein_g": round(protein_g), "carbs_g": round(carbs_g), "fat_g": round(fat_g),
    }

r = calculate_macros(70, 175, 30, "male", 1.55, "lose")
print(f"BMR             : {r['bmr']} kcal")
print(f"TDEE            : {r['tdee']} kcal")
print(f"Target Calories : {r['target_calories']} kcal")
print(f"Protein         : {r['protein_g']} g")
print(f"Carbs           : {r['carbs_g']} g")
print(f"Fat             : {r['fat_g']} g")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.