---
title: "Macronutrient split (protein / carbs / fat)"
method: GET
path: "/calculate/macros"
tags: ["Energy & macros"]
---

# Macronutrient split (protein / carbs / fat)

`GET /calculate/macros`

## Request

- Base URL: `https://myplate.food/api/v1`
- URL: `https://myplate.food/api/v1/calculate/macros`
- Auth: none declared

Split a calorie budget into protein, carbohydrate and fat grams across three common presets (balanced, higher-protein, lower-carb). Pass a calorie total directly, or a full profile to derive TDEE first. With a profile: Adult equations: ages 18 to 120. A younger age returns 400; for a child or teenager use myplate-plan or dri, whose energy equations have child forms.

Cites its source in every response: `source` (the formula + published reference) and `canonical_url` (https://myplate.food/macro-calculator), plus a `disclaimer`.

## Query parameters

- `calories` number
- `age` integer
- `sex` 'male' | 'female'
- `activity` 'sedentary' | 'moderately-active' | 'active' | 'very-active'
- `height_cm` number
- `height_ft` number
- `height_in` number
- `weight_kg` number
- `weight_lb` number

## Response `200`

Calculation result with citation envelope.

- CitedResult: Calculation result. Shape varies by endpoint, but every result carries the citation envelope fields below alongside the calculator's own numbers.
  - `calculator` string, required: The endpoint name.
  - `inputs` object: The parsed, normalized inputs the result was computed from.
  - `source` string, required: The formula and published reference behind the number.
  - `canonical_url` string, uri, required: The matching myplate.food page.
  - `disclaimer` string: Present on health calculators.

## Other responses

- `400`: Invalid or missing parameters.

---

[API](https://skmtc.dev/myplate/apis/myplate-food-nutrition-api.md) · [All operations](https://skmtc.dev/myplate/apis/myplate-food-nutrition-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myplate/apis/myplate-food-nutrition-api/revisions/cb7ba731c59b?raw)
