---
title: "Macro Calculator"
method: GET
path: "/api/calc/macro-calculator"
tags: ["Health"]
---

# Macro Calculator

`GET /api/calc/macro-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/macro-calculator`
- Auth: none declared

Protein and carbs have 4 kcal per gram, fat 9. Turn your Mifflin–St Jeor calorie target into daily grams for fat loss, maintenance or gain in three splits.

## Query parameters

- `units` 'metric' | 'imperial': Units
- `sex` 'male' | 'female': Sex
- `age` number: Age (years)
- `cm` number: Height (cm)
- `ft` number: Height (ft)
- `inch` number: (in)
- `kg` number: Weight (kg)
- `lb` number: Weight (lb)
- `activity` 'sedentary' | 'light' | 'moderate' | 'active' | 'very': Activity level
- `goal` 'lose' | 'maintain' | 'gain': Goal
- `diet` 'balanced' | 'lowcarb' | 'highprotein': Diet style

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

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