Developers

Embed our calculator. Call our API. Free.

Integrate evidence-based TDEE, BMR, and macro calculations into your site, app, or tool. No API key. No usage limits at sane volumes. Attribution required.

Embed the calculator

Drop the iframe below into any page. The calculator runs entirely client-side; no backend integration required. Responsive width, sensible default height of 1200px (adjust if your layout is shorter).

<iframe
  src="https://www.calculatemytdee.org/embed/tdee"
  width="100%"
  height="1200"
  loading="lazy"
  style="border:0; max-width:900px; display:block; margin:0 auto"
  title="TDEE Calculator by calculatemytdee.org"
></iframe>
Attribution: the embed includes a link back to calculatemytdee.org in the header and footer. Please don't remove or hide them — that's the only thing we ask in exchange for the free widget.

Auto-resize the iframe

For sites that prefer dynamic height instead of a fixed 1200px, install iframe-resizer on your page and the embed plays nicely with it.

Public JSON API

Server-side or client-side: hit any endpoint below and get JSON back. CORS is open (Access-Control-Allow-Origin: *). No authentication. Cache the responses on your end if you call them at scale.

GET/api/v1/tdee

Compute TDEE, BMR, macros, and goal targets.

Query parameters
weight, height, age, gender, activity, goal, body_fat, unit
Example
curl 'https://www.calculatemytdee.org/api/v1/tdee?weight=180&height=72&age=30&gender=male&activity=moderate&goal=cut&unit=imperial'
GET/api/v1/bmr

Compute BMR across Mifflin-St Jeor, Harris-Benedict, and Katch-McArdle (when body_fat provided).

Query parameters
weight, height, age, gender, body_fat, unit
Example
curl 'https://www.calculatemytdee.org/api/v1/bmr?weight=70&height=175&age=30&gender=male&unit=metric'
GET/api/v1/macros

Compute macro targets given calories, weight, and goal.

Query parameters
calories, weight, goal, unit
Example
curl 'https://www.calculatemytdee.org/api/v1/macros?calories=2400&weight=180&goal=cut&unit=imperial'

Rate limits

Soft limit: 100 requests / minute / IP. The endpoints are designed to be called once per user calculation; aggressive scraping will be throttled at the edge. Cache responses if you call repeatedly with the same parameters.

Versioning

All endpoints are under /api/v1/. Breaking changes will move to /v2/;/v1/ stays stable for at least 12 months after any new version ships.

Background reading