{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://askcalculators.com/calculator/macro-calculator/schema.json",
  "title": "Macro Calculator inputs",
  "description": "Estimate a goal-adjusted calorie target and translate a balanced, high-protein, lower-carb, very-low-carb, or custom split into daily grams.",
  "type": "object",
  "properties": {
    "unitSystem": {
      "title": "Units",
      "type": "string",
      "default": "metric",
      "enum": [
        "metric",
        "imperial"
      ],
      "x-optionLabels": {
        "metric": "Metric",
        "imperial": "Imperial"
      }
    },
    "sex": {
      "title": "Sex used by equation",
      "type": "string",
      "default": "male",
      "enum": [
        "male",
        "female"
      ],
      "x-optionLabels": {
        "male": "Male",
        "female": "Female"
      }
    },
    "age": {
      "title": "Age",
      "type": "number",
      "default": 30,
      "minimum": 18,
      "maximum": 100,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "years"
    },
    "formula": {
      "title": "BMR equation",
      "type": "string",
      "default": "mifflin",
      "enum": [
        "mifflin",
        "harris",
        "katch"
      ],
      "x-optionLabels": {
        "mifflin": "Mifflin–St Jeor",
        "harris": "Revised Harris–Benedict",
        "katch": "Katch–McArdle"
      }
    },
    "bodyFatPercent": {
      "title": "Body fat",
      "type": "number",
      "default": 20,
      "minimum": 1,
      "maximum": 79,
      "x-step": 0.1,
      "x-suffix": "%",
      "x-unit": "percent",
      "x-showWhen": {
        "field": "formula",
        "equals": "katch"
      }
    },
    "weightKg": {
      "title": "Weight",
      "type": "number",
      "default": 70,
      "minimum": 1,
      "maximum": 500,
      "x-step": 0.1,
      "x-suffix": "kg",
      "x-showWhen": {
        "field": "unitSystem",
        "equals": "metric"
      }
    },
    "heightCm": {
      "title": "Height",
      "type": "number",
      "default": 175,
      "minimum": 50,
      "maximum": 300,
      "x-step": 0.1,
      "x-suffix": "cm",
      "x-showWhen": {
        "field": "unitSystem",
        "equals": "metric"
      }
    },
    "weightLb": {
      "title": "Weight",
      "type": "number",
      "default": 154,
      "minimum": 2,
      "maximum": 1100,
      "x-step": 0.1,
      "x-suffix": "lb",
      "x-showWhen": {
        "field": "unitSystem",
        "equals": "imperial"
      }
    },
    "feet": {
      "title": "Height feet",
      "type": "number",
      "default": 5,
      "minimum": 1,
      "maximum": 9,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "ft",
      "x-showWhen": {
        "field": "unitSystem",
        "equals": "imperial"
      }
    },
    "inches": {
      "title": "Height inches",
      "type": "number",
      "default": 9,
      "minimum": 0,
      "maximum": 11.9,
      "x-step": 0.1,
      "x-suffix": "in",
      "x-showWhen": {
        "field": "unitSystem",
        "equals": "imperial"
      }
    },
    "activity": {
      "title": "Activity level",
      "type": "string",
      "default": "moderate",
      "enum": [
        "sedentary",
        "light",
        "moderate",
        "active",
        "veryActive",
        "extraActive"
      ],
      "x-optionLabels": {
        "sedentary": "Sedentary",
        "light": "Light activity",
        "moderate": "Moderate activity",
        "active": "Active",
        "veryActive": "Very active",
        "extraActive": "Extra active"
      }
    },
    "goal": {
      "title": "Calorie goal",
      "type": "string",
      "default": "maintain",
      "enum": [
        "maintain",
        "mildLoss",
        "loss",
        "mildGain",
        "gain"
      ],
      "x-optionLabels": {
        "maintain": "Maintain",
        "mildLoss": "Mild loss",
        "loss": "Weight loss",
        "mildGain": "Mild gain",
        "gain": "Weight gain"
      }
    },
    "macroPlan": {
      "title": "Macro split",
      "type": "string",
      "default": "balanced",
      "enum": [
        "balanced",
        "highProtein",
        "lowerCarb",
        "veryLowCarb",
        "custom"
      ],
      "x-optionLabels": {
        "balanced": "Balanced: 50% carbs / 20% protein / 30% fat",
        "highProtein": "Higher protein: 40 / 30 / 30",
        "lowerCarb": "Lower carb: 30 / 30 / 40",
        "veryLowCarb": "Very low carb: 10 / 25 / 65",
        "custom": "Custom percentages"
      }
    },
    "carbPercent": {
      "title": "Custom carbohydrate share",
      "type": "number",
      "default": 45,
      "minimum": 0,
      "maximum": 100,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "%",
      "x-unit": "percent",
      "x-showWhen": {
        "field": "macroPlan",
        "equals": "custom"
      }
    },
    "proteinPercent": {
      "title": "Custom protein share",
      "type": "number",
      "default": 25,
      "minimum": 0,
      "maximum": 100,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "%",
      "x-unit": "percent",
      "x-showWhen": {
        "field": "macroPlan",
        "equals": "custom"
      }
    },
    "fatPercent": {
      "title": "Custom fat share",
      "type": "number",
      "default": 30,
      "minimum": 0,
      "maximum": 100,
      "x-step": 1,
      "multipleOf": 1,
      "x-suffix": "%",
      "x-unit": "percent",
      "x-showWhen": {
        "field": "macroPlan",
        "equals": "custom"
      }
    }
  },
  "required": [
    "unitSystem",
    "sex",
    "age",
    "formula",
    "activity",
    "goal",
    "macroPlan"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "formula": {
            "const": "katch"
          }
        },
        "required": [
          "formula"
        ]
      },
      "then": {
        "required": [
          "bodyFatPercent"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "unitSystem": {
            "const": "metric"
          }
        },
        "required": [
          "unitSystem"
        ]
      },
      "then": {
        "required": [
          "weightKg"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "unitSystem": {
            "const": "metric"
          }
        },
        "required": [
          "unitSystem"
        ]
      },
      "then": {
        "required": [
          "heightCm"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "unitSystem": {
            "const": "imperial"
          }
        },
        "required": [
          "unitSystem"
        ]
      },
      "then": {
        "required": [
          "weightLb"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "unitSystem": {
            "const": "imperial"
          }
        },
        "required": [
          "unitSystem"
        ]
      },
      "then": {
        "required": [
          "feet"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "unitSystem": {
            "const": "imperial"
          }
        },
        "required": [
          "unitSystem"
        ]
      },
      "then": {
        "required": [
          "inches"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "macroPlan": {
            "const": "custom"
          }
        },
        "required": [
          "macroPlan"
        ]
      },
      "then": {
        "required": [
          "carbPercent"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "macroPlan": {
            "const": "custom"
          }
        },
        "required": [
          "macroPlan"
        ]
      },
      "then": {
        "required": [
          "proteinPercent"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "macroPlan": {
            "const": "custom"
          }
        },
        "required": [
          "macroPlan"
        ]
      },
      "then": {
        "required": [
          "fatPercent"
        ]
      }
    }
  ],
  "additionalProperties": false,
  "x-askcalculators": {
    "version": "2.0.0",
    "calculatorUrl": "https://askcalculators.com/calculator/macro-calculator/",
    "queryExample": "https://askcalculators.com/calculator/macro-calculator/?unitSystem=metric&sex=male&age=30&formula=mifflin&weightKg=70&heightCm=175&activity=moderate&goal=maintain&macroPlan=balanced",
    "migrationStatus": "migrated",
    "reviewStatus": "pending",
    "pageStatus": "live",
    "workStatus": "pending",
    "migratedDate": "2026-08-25",
    "formula": {
      "expression": "Calories come from BMR × activity with a goal adjustment; carbohydrate and protein use 4 kcal/g and fat uses 9 kcal/g."
    },
    "quality": {
      "availability": "live",
      "technicalReviewRecord": "/reviews/macro-calculator.json",
      "qualifiedReview": "pending",
      "qualifiedReviewer": null,
      "qualifiedReviewDate": null,
      "formulaVersion": "2.0.0",
      "referenceCoverage": "references-listed",
      "releaseTestScope": "Catalog and regression checks are not a professional formula audit; consult release evidence.",
      "historicalMetadataDate": "2026-08-25",
      "historicalMetadataNotice": "The imported date is not evidence of a completed human review."
    },
    "outputs": {
      "calories": {
        "title": "Daily calorie target",
        "type": "number",
        "x-format": "number",
        "x-suffix": " kcal",
        "x-digits": 0,
        "x-primary": true
      },
      "carbs": {
        "title": "Carbohydrate",
        "type": "number",
        "x-format": "number",
        "x-suffix": " g/day",
        "x-digits": 0
      },
      "protein": {
        "title": "Protein",
        "type": "number",
        "x-format": "number",
        "x-suffix": " g/day",
        "x-digits": 0
      },
      "fat": {
        "title": "Fat",
        "type": "number",
        "x-format": "number",
        "x-suffix": " g/day",
        "x-digits": 0
      },
      "tdee": {
        "title": "Maintenance estimate",
        "type": "number",
        "x-format": "number",
        "x-suffix": " kcal/day",
        "x-digits": 0
      },
      "split": {
        "title": "Macro split",
        "type": "string",
        "x-format": "text"
      }
    }
  }
}
