πŸ› οΈToolsShed

Body Fat Calculator

Estimate body fat percentage using the U.S. Navy method.

Body Fat Calculator estimates your body fat percentage using validated measurement methods that don't require expensive equipment. The most common approach used here is the U.S. Navy Method, which uses neck, waist, and hip circumference measurements along with height to estimate fat mass. Unlike BMI, body fat percentage gives a more direct indication of your actual composition of fat versus lean mass.

Enter your gender, height, and the required circumference measurements in either centimeters or inches. The tool calculates your estimated body fat percentage and compares it to healthy ranges by age and gender established by the American Council on Exercise (ACE).

Body fat percentage is considered a better fitness indicator than BMI alone, but it too has margin of error β€” the gold standards are DEXA scan and hydrostatic weighing, available at medical facilities. Consistent measurements over time (always taken the same way) are more valuable than any single reading.

Frequently Asked Questions

Code Implementation

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.