Back to calculator
Food & MealGenerated accuracy model review: 2026-05-06

Macro Meal Builder Calculator accuracy and testing

This page documents how Calwarden builds trust for this calculator: source notes, regression-style default tests, limitations, assumptions, unit handling, rounding, and visible change history.

Formula source

  • Protein and carbs use 4 calories per gram. Fat uses 9 calories per gram. Percentages are based on calories, not grams.

Test cases

Default input regression check

Generated from the checked-in default inputs and calculate function.

Inputs

  • Protein: 40 g
  • Carbs: 55 g
  • Fat: 18 g
  • Servings: 1

Expected outputs

  • Calories per Serving: 542 cal
  • Total Calories: 542 cal
  • Protein Calories: 29.52%
  • Carb Calories: 40.59%
  • Fat Calories: 29.89%

Known limitations

  • This page documents the checked-in calculator logic and does not certify results for every real-world edge case.
  • Use the result as a planning estimate unless the calculator page states a stricter purpose.

Assumptions

  • All prices, rates, package sizes, and recipe values are user-entered unless clearly labeled as a general planning default.
  • Calculations run locally in your browser and do not store food, nutrition, household, or budget details.
  • This is planning math, not nutrition, medical, allergen, or food-safety advice.

Unit handling

  • Protein accepts values in g.
  • Carbs accepts values in g.
  • Fat accepts values in g.
  • Servings accepts numeric values.
  • Calories per Serving is displayed in cal.
  • Total Calories is displayed in cal.
  • Protein Calories is displayed as a percentage.
  • Carb Calories is displayed as a percentage.
  • Fat Calories is displayed as a percentage.

Rounding rules

  • Number displays use up to 2 decimal places in the calculator UI.
  • Percent outputs are displayed with two decimal places.
  • Input precision follows configured step values where provided.

Version history

1.0.0 - 2026-05-06

Generated accuracy and testing page from the current macro-meal-builder-calculator calculator definition.

Change log

2026-05-06

Published default regression test documentation and metadata fallbacks for Macro Meal Builder Calculator.

Calculator transparency

Accuracy pages are generated from checked-in calculator definitions and can be upgraded with curated review metadata over time.

Use calculator