본문으로 건너뛰기
🛠️ToolsShed

다량영양소 계산기

칼로리 목표에 따라 단백질, 탄수화물, 지방 섭취량을 계산합니다. 균형식, 케토, 저탄수화물, 사용자 정의 비율 지원.

단백질 30%탄수화물 40%지방 30%

이 도구 소개

다량영양소 계산기는 하루 칼로리 목표를 단백질, 탄수화물, 지방 각각의 구체적인 그램 목표로 바꿔 줍니다. 칼로리를 각 영양소에 어떻게 나눠야 할지 추측하는 대신, 바로 장을 보고 요리할 수 있는 명확한 목표를 얻을 수 있습니다.

하루 칼로리 목표를 입력하고 균형형, 저탄수화물, 고단백 같은 매크로 비율을 선택하세요. 해당 비율에 따른 단백질, 탄수화물, 지방의 그램 수가 즉시 표시되어 식단 계획, 감량이나 증량, 식단 관리 앱 기록에 유용합니다.

다량영양소 필요량은 체격, 활동량, 목표에 따라 사람마다 다르므로 이 수치는 의료나 영양 상담 조언이 아닌 출발점으로 활용하세요. 모든 계산은 브라우저에서 로컬로 실행되므로 칼로리 목표와 결과가 기기를 벗어나지 않습니다.

자주 묻는 질문

코드 구현

def calculate_macros(calories, protein_pct, carbs_pct, fat_pct, meals=3):
    """
    Calculate macronutrient grams from daily calorie goal.
    Protein & carbs: 4 kcal/g, Fat: 9 kcal/g
    """
    if abs(protein_pct + carbs_pct + fat_pct - 100) > 0.5:
        raise ValueError("Percentages must add up to 100")

    protein_kcal = calories * protein_pct / 100
    carbs_kcal   = calories * carbs_pct   / 100
    fat_kcal     = calories * fat_pct     / 100

    protein_g = protein_kcal / 4
    carbs_g   = carbs_kcal   / 4
    fat_g     = fat_kcal     / 9

    return {
        "daily":    {"protein": round(protein_g, 1), "carbs": round(carbs_g, 1), "fat": round(fat_g, 1)},
        "per_meal": {"protein": round(protein_g / meals, 1),
                     "carbs":   round(carbs_g   / meals, 1),
                     "fat":     round(fat_g      / meals, 1)},
        "calories": {"protein": round(protein_kcal), "carbs": round(carbs_kcal), "fat": round(fat_kcal)},
    }

PRESETS = {
    "balanced":    (30, 40, 30),
    "low_carb":    (40, 20, 40),
    "keto":        (35,  5, 60),
    "high_protein":(45, 35, 20),
}

# Example: 2000 kcal keto diet, 3 meals
result = calculate_macros(2000, *PRESETS["keto"], meals=3)
print("Daily macros:", result["daily"])
print("Per meal:    ", result["per_meal"])

Comments & Feedback

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