---
title: "Macro Calculator"
method: POST
path: "/api/v1/tools/macro-calculator"
tags: ["tools"]
---

# Macro Calculator

`POST /api/v1/tools/macro-calculator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/macro-calculator`
- Auth: HTTP bearer

Daily protein, carbohydrate and fat grams for a calorie target and a goal. Calories come from the Mifflin-St Jeor basal rate times an activity factor, shifted by 500 kcal down to lose or 300 kcal up to gain and never below 1200, and are then split three ways: balanced 30/40/30, low carb 40/20/40 and high protein 40/30/30. This is an indication, not medical advice.

## Request body

- object
  - `age` integer
  - `sex` string
  - `heightCm` integer
  - `weightKg` integer
  - `activity` string
  - `goal` string

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `bmr` integer
    - `tdee` integer
    - `calories` integer
    - `goal` string
    - `activity` string
    - `activityFactor` number
    - `formula` string
    - `splits` object[]
      - `id` string
      - `label` string
      - `protein` integer
      - `carbs` integer
      - `fat` integer
      - `proteinG` integer
      - `carbsG` integer
      - `fatG` integer
    - `note` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
