ForHosting KIT · Health & fitness

Gallagher body fat calculator

Estimate body fat from BMI, age and sex with the multi-term Gallagher equation: a 30-year-old man with a BMI of 25 comes out at 19.61%. Because age and sex interact with BMI, two people with the same BMI can get different results. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Bmi
25
Age
30
Sex
Male
You get
Sex code
1
Inv bmi
0.04
Body fat percent
19.61
Precision
4

The Gallagher body fat calculator estimates percent body fat from three everyday inputs: body mass index in kilograms per square metre, chronological age in years, and biological sex. It implements the multi-term Gallagher prediction that uses the reciprocal of BMI plus age and sex interaction terms, so two people with the same BMI can receive different estimates when age or sex differs.

What the Gallagher equation measures and how BMI becomes percent fat

Body mass index alone does not report body composition: two adults can share the same BMI yet carry very different amounts of fat and lean tissue. Gallagher and colleagues published prediction equations that map BMI onto estimated percent body fat while adjusting for age and sex, reflecting population patterns where fat mass tends to rise with age at a given BMI and where women, on average, carry a higher fat fraction than men at the same BMI.

This capability uses the multi-term form that treats the reciprocal of BMI as a primary predictor, then adds a linear age term, a main sex offset, a sex-by-age interaction, and a sex-by-reciprocal-BMI interaction. Sex is coded as one for male and zero for female inside the arithmetic so the same expression serves both groups.

Percent fat is returned as a single finite number rounded to a configurable precision, together with the echoed BMI, age, sex code, reciprocal BMI, a method tag equal to gallagher, and a formula string you can show next to the answer or pin in methods notes. The sequence is pure arithmetic—no lookup tables, no activity multipliers, and no ethnicity switch in this product surface—so every successful call is reproducible byte-for-byte across runtimes.

Treat the result as an educational and screening-style estimate: dual-energy X-ray absorptiometry, hydrostatic weighing, multi-compartment models, and skilled skinfold protocols remain reference options when clinical decisions require measured composition rather than a BMI-based prediction.

Wellness dashboards with height and weight on file

Convert stored BMI, age, and sex into a deterministic Gallagher body-fat percent for charts and longitudinal wellness logs without caliper hardware.

What inputs does the Gallagher body fat calculator need?

BMI in kg/m², age in years, and sex (male or female). Optional precision sets decimal places (default 4).

What happens if BMI or age is missing or not a number?

Required fields must be present and finite; non-positive or out-of-range BMI and age are also rejected and not billed.

Is this the same as the US Navy or Jackson-Pollock body fat calculators?

No. Those methods use circumferences or skinfolds. This capability implements only the Gallagher BMI-age-sex prediction and has its own SEO landing and type.

Which formula does the Gallagher calculator use?

Body fat percent equals 64.5 minus 848 times one over BMI, plus 0.079 times age, minus 16.4 times sex, plus 0.05 times sex times age, plus 39.0 times sex over BMI. Sex counts as 1 for men and 0 for women.

Why do a woman and a man with the same BMI get different estimates?

Because the equation reflects population patterns in which women, on average, carry a higher fat fraction than men at the same BMI. The sex terms shift the result, and the age terms add to it as years pass.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/health/bodyfat-gallagher

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/health/bodyfat-gallagher \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bmi":25,"age":30,"sex":"male"}'
{
  "bmi": 25,
  "age": 30,
  "sex": "male"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "health.bodyfat_gallagher",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The path is fully offline and deterministic: no network, no random seed, and no clock, so homework checkers, coaching apps, and prepaid API clients receive identical JSON for the same inputs every time. Missing fields, non-numeric values, non-positive BMI or age, and out-of-range values fail with invalid_input and are not billed. Use the free browser tool for quick checks and demos, or call the API at $0.002 per successful item when pipelines need a stable Gallagher contract without re-implementing coefficients by hand.

What the Gallagher equation measures and how BMI becomes percent fat

Do not confuse this endpoint with US Navy circumference formulas or Jackson-Pollock skinfold polynomials; those use different measurements and live under separate product pages and SEO landings.

Input contract, validation rules, and reading the response fields

BMI must fall inside a documented practical band so extreme reciprocals cannot drive non-physical estimates; age must stay within a documented maximum year range. Compute BMI yourself before calling if you only have mass and height: mass in kilograms divided by height in metres squared. POST a JSON object with required bmi, age, and sex. BMI is a positive finite body mass index in kilograms per square metre; aliases body_mass_index and bmi_kg_m2 are accepted so forms and spreadsheets can reuse familiar labels. Age is a positive finite number of years, with aliases age_years and years. Sex accepts male or female and common short forms such as m, f, man, and woman after case folding; aliases gender and sex_at_birth are also recognized. Optional precision, with aliases decimals and dp, chooses zero through twelve decimal places for rounded outputs and defaults to four. Missing fields, empty strings, non-finite numbers, zero or negative BMI or age, unsupported sex strings, and out-of-range values raise invalid_input naming the offending rule; those failures do not consume prepaid balance. On success you receive sex and sex_code, rounded age and bmi, inv_bmi with at least six decimal places of reported precision so reciprocal changes remain visible, body_fat_percent for display and logging, method always set to gallagher so downstream code can branch without sniffing shapes, formula restating the multi-term identity, and the precision used.

Where a Gallagher body fat API earns its keep and how pricing works

Coaches and population-health programs use a Gallagher body fat calculator when height and weight are already on file and they need a sex- and age-aware fat estimate without calipers or scanners. Exercise-physiology and nutrition courses assign BMI-to-percent-fat labs and need an oracle that rejects non-numeric or non-positive inputs instead of inventing a silent zero-percent result. Keep clinical expectations honest—this is not a diagnostic medical device—and pair the number with context about muscle mass, hydration, and measurement quality so a high BMI from dense muscle is not mistaken for high fat by formula alone. If you only need BMI classification bands without percent fat, use a BMI calculator instead of re-deriving composition here. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, validation failures are not charged, and nothing is stored after the response returns. That split matches the rest of the KIT tier-A catalog: free interactive exploration and a priced, identical automation path. If your workflow already stores skinfolds or circumferences, use the dedicated Jackson-Pollock or US Navy endpoints rather than forcing those measurements into a BMI-only equation.

Classroom BMI-to-percent-fat checks

Students verify Gallagher multi-term arithmetic against homework keys with stable JSON suitable for grading scripts and LMS auto-checks.

Fitness apps and CI fixtures

Apps and test suites call a pure prepaid endpoint so client UIs and server goldens share the same BMI-age-sex contract.

How is body fat percent calculated from BMI?

The Gallagher multi-term equation uses 1/BMI, age, sex (male=1, female=0), and sex×age and sex×(1/BMI) interactions: %BF = 64.5 − 848·(1/BMI) + 0.079·age − 16.4·sex + 0.05·sex·age + 39.0·sex·(1/BMI).

What does the Gallagher body fat calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →