Back to methodology
Onboarding calculation
Body Fat and Lean Mass Methodology
How onboarding resolves body fat percentage, lean mass, fat mass, and body surface area.
Status: Used by calorie, protein, hydration, fiber, and activity target calculations.
Last updated: June 15, 2026
Inputs and outputs
Inputs
- Age
- Gender selected in onboarding
- Weight in kilograms
- Height in centimeters
- Optional body-fat estimate or skinfold measurements
Outputs
- Body fat percentage
- Lean mass in kilograms
- Fat mass in kilograms
- Body surface area
Formula
fallback_body_fat = age_gender_average_table(age, gender)
visual_body_fat = male ? 5 + slider_pct * (40 - 5) : 12 + slider_pct * (50 - 12)
skinfold_sum = biceps + triceps + subscapular + suprailiac
L = log10(skinfold_sum)
body_density = Durnin_Womersley_coefficient(age, gender, L)
skinfold_body_fat = (495 / body_density) - 450
resolved_body_fat = clamp(chosen_or_fallback_body_fat, 3, 60)
lean_mass_kg = weight_kg * (1 - resolved_body_fat / 100)
fat_mass_kg = weight_kg - lean_mass_kg
body_surface_area = 0.007184 * height_cm^0.725 * weight_kg^0.425
Calculation steps
- Use the user-provided or scan-estimated body fat percentage when present.
- If no body-fat estimate is available, use the app demographic fallback table by age and gender.
- For manual caliper mode, use the four-site Durnin-Womersley skinfold density table and convert density to body-fat percentage with the Siri equation.
- Clamp impossible values, then compute lean mass and fat mass from body weight.
- Compute body surface area with the Du Bois formula for context.
Guardrails
- Body-fat estimates are planning estimates, not a diagnostic body-composition test.
- The demographic fallback is intentionally treated as lower confidence than a direct measurement.
- The visual slider is a rough estimate and should not be treated as a medical measurement.
Sources
These formulas describe how Unflame estimates onboarding targets. They are planning estimates and should be reviewed against real-world trends, user preference, symptoms, and professional guidance where relevant.