# Macro Calculator

- **URL:** https://codeasystem.com/calculators/health/macro-calculator/
- **Category:** health
- **Description:** Split your daily calories into carbohydrate, protein and fat gram targets using adjustable percentages and standard energy densities.
- **Primary output:** Daily macro targets: Carbs 200 g · Protein 150 g · Fat 67 g

## Inputs
- Daily calories (name: `calories`, type: number, example: 2000)
- Carbohydrates (name: `carbs`, type: select)
- Protein (name: `protein`, type: select)
- Fat (name: `fat`, type: select)

## Outputs
- Daily macro targets: Carbs 200 g · Protein 150 g · Fat 67 g
- Carbohydrates (40%): 200 g
- Protein (30%): 150 g
- Fat (30%): 67 g

## Formula / methodology
```
Carbs g = kcal × % ÷ 4     Protein g = kcal × % ÷ 4     Fat g = kcal × % ÷ 9
```

Each macro’s calorie share divides by its energy density; 4 kcal per gram for carbohydrate and protein, 9 kcal per gram for fat; converting your percentage split into concrete daily gram targets you can log against food labels.

The default 40/30/30 split is a balanced starting point popular in sports nutrition; endurance athletes often push carbohydrates toward 50%, while higher-protein cuts favour 35% protein.

## Assumptions & limitations
- Gram targets use Atwater factors (4/4/9); fibre and alcohol calories are not modeled.
- Percentages must sum to exactly 100%.
- Targets are daily averages; hitting them precisely every single day is unnecessary.

## How to use
1. **Enter your calorie target**; Use your TDEE to maintain, or the deficit calculator’s target to lose.
2. **Pick your percentages**; Adjust each macro’s share; they must total 100% or the calculator will ask you to rebalance.
3. **Log against grams**; Track foods by gram targets rather than obsessing over daily percentages; labels list grams.

## Example
On a 2,000 kcal diet at the classic 40/30/30 split you would aim for about 200 g of carbs, 150 g of protein and 67 g of fat each day.

Result for these inputs:

```
Daily macro targets: Carbs 200 g · Protein 150 g · Fat 67 g
```

## About this calculator
### Protein first, then split the rest

Most evidence supports setting protein relative to body weight (1.2–2.2 g/kg depending on goals), letting fat fall no lower than ~20% for hormone health, and filling remaining calories with carbohydrate. Percent-based splits are a convenient approximation of that logic.

### What 40/30/30 looks like on a plate

At 2,000 kcal that is roughly oatmeal and fruit at breakfast, a palm-sized protein portion at each meal, rice or potatoes around training, olive oil or nuts for fats; ordinary food arranged consistently, nothing exotic.

### Common splits by goal

- Balanced maintenance: 40% carb / 30% protein / 30% fat.
- Endurance training blocks: up to 50–60% carbohydrate.
- Higher-protein fat-loss phases: 30–35% protein with reduced carbs.

## FAQs
### Do I have to hit macros exactly?

No. Within ±5–10 g per macro daily is fine; weekly averages drive outcomes, not individual days.

### Why does fat have 9 kcal per gram?

Fat is chemically more reduced than carbohydrate or protein, so oxidation releases more energy per gram; the Atwater convention quantifies this.

### Are low-carb or low-fat better?

Head-to-head trials show similar fat loss at equal protein and calories. Adherence, not macro philosophy, predicts success.

> **Disclaimer:** This calculator is for general educational purposes only and does not constitute professional advice.

## Related calculators
- [Calorie Deficit Calculator](https://codeasystem.com/calculators/health/calorie-deficit-calculator/)
- [TDEE Calculator](https://codeasystem.com/calculators/health/tdee-calculator/)
- [Protein Intake Calculator](https://codeasystem.com/calculators/health/protein-intake-calculator/)
- [BMR Calculator](https://codeasystem.com/calculators/health/bmr-calculator/)

---
Last updated: 2026-08-23 · Version: 1.0.0 · [HTML version](https://codeasystem.com/calculators/health/macro-calculator/)
