🛠️ToolsShed

体脂率计算器

使用 U.S. Navy 方法估算体脂率。

体脂率计算器使用无需昂贵设备的验证测量方法来估算您的体脂率。这里使用的最常见方法是美国海军方法,它使用颈部、腰部和臀部围度测量值以及身高来估算脂肪质量。与 BMI 不同,体脂率更直接地反映您的实际脂肪与瘦体重的组成。

输入您的性别、身高以及所需的围度测量值(厘米或英寸)。该工具计算您的估算体脂率,并将其与美国运动委员会 (ACE) 按年龄和性别建立的健康范围进行比较。

体脂率被认为比单独的 BMI 更好的健身指标,但它也有误差——黄金标准是 DEXA 扫描和静水称重,可在医疗机构获得。随时间推移的一致测量(始终以相同方式进行)比任何单次读数更有价值。

常见问题

代码实现

import math

def navy_body_fat_male(waist_cm: float, neck_cm: float, height_cm: float) -> float:
    """
    US Navy body fat formula for males.
    %BF = 86.010 * log10(waist - neck) - 70.041 * log10(height) + 36.76
    """
    return 86.010 * math.log10(waist_cm - neck_cm) - 70.041 * math.log10(height_cm) + 36.76

def navy_body_fat_female(waist_cm: float, hip_cm: float, neck_cm: float, height_cm: float) -> float:
    """
    US Navy body fat formula for females.
    %BF = 163.205 * log10(waist + hip - neck) - 97.684 * log10(height) - 78.387
    """
    return 163.205 * math.log10(waist_cm + hip_cm - neck_cm) - 97.684 * math.log10(height_cm) - 78.387

def classify_body_fat_male(bf_percent: float) -> str:
    if bf_percent < 6:   return "Essential fat"
    if bf_percent < 14:  return "Athletes"
    if bf_percent < 18:  return "Fitness"
    if bf_percent < 25:  return "Acceptable"
    return "Obese"

def classify_body_fat_female(bf_percent: float) -> str:
    if bf_percent < 14:  return "Essential fat"
    if bf_percent < 21:  return "Athletes"
    if bf_percent < 25:  return "Fitness"
    if bf_percent < 32:  return "Acceptable"
    return "Obese"

# Male example
waist, neck, height = 85.0, 37.5, 178.0
bf_male = navy_body_fat_male(waist, neck, height)
print(f"Male example: waist={waist}cm, neck={neck}cm, height={height}cm")
print(f"  Body fat: {bf_male:.1f}% ({classify_body_fat_male(bf_male)})")

# Female example
waist_f, hip_f, neck_f, height_f = 72.0, 95.0, 33.5, 165.0
bf_female = navy_body_fat_female(waist_f, hip_f, neck_f, height_f)
print(f"\nFemale example: waist={waist_f}cm, hip={hip_f}cm, neck={neck_f}cm, height={height_f}cm")
print(f"  Body fat: {bf_female:.1f}% ({classify_body_fat_female(bf_female)})")

Comments & Feedback

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