A worked conversion, not a recommended plan
Use a fictional 2,000 kcal amount with shares you supply: 30% protein, 40% carbohydrate and 30% fat. These numbers illustrate the calculation; they are not a recommended intake or split.
- Protein: 2,000 × 0.30 ÷ 4 = 150 g.
- Carbohydrate: 2,000 × 0.40 ÷ 4 = 200 g.
- Fat: 2,000 × 0.30 ÷ 9 = 66.67 g displayed; the unrounded value is 66.666… g.
In the other direction, 10 g protein, 20 g carbohydrate and 5 g fat contribute 40 + 80 + 45 = 165 kcal under the same general factors. Their derived energy shares are 24.24%, 48.48% and 27.27% when rounded. Displayed shares can total 99.99% or 100.01%; the tool does not adjust them to disguise rounding.
A zero-gram example gives zero kcal. Its energy shares are unavailable, because 0 ÷ 0 is undefined. This is an arithmetic edge case, not advice to eat nothing.
What the calculation does
The USDA National Agricultural Library describes the general factors: protein 4, carbohydrate 4 and fat 9 kcal per gram. Percentage mode multiplies the energy you supply by each percentage and divides by its factor. Gram mode multiplies each supplied gram amount by its factor, adds the results and calculates energy shares only when the total is positive.
All numbers start blank. There is no diet preset or calculated calorie target. Choose a mode and enter complete numbers with one decimal point or comma, up to two decimal places, without grouping separators, signs or exponents. Percentage inputs must total exactly 100.00%; they are never normalized.
The mechanical ceilings are 100,000 supplied kcal, 100% for each share and 10,000 g for each gram input. They bound the arithmetic and are not recommended or clinically assessed ranges. Display values round to two decimal places; unrounded values drive the calculation. Feeding rounded displayed grams into another conversion can produce a slightly different energy total.
A package label can use a different calculation
US food-label rules, 21 CFR 101.9(c)(1)(i) permit more than one method and distinguish some carbohydrate components. Specific food factors, fiber, sugar alcohols and rounding can make a simple 4/4/9 result differ from the label. This tool has no alcohol input and does not calculate every possible energy contributor.
Use the product's Nutrition Facts information and the portion actually consumed when logging packaged food. The macro-tracking guide explains how supplied targets and recorded totals appear in FuelForm. This converter does not set or transfer an app target.
Privacy and interpretation
Inputs and results remain in this page's memory. FuelForm does not place these calculator values in URLs or browser storage, send them to its server, or include them in calculator analytics. Session recording is disabled here. Reset clears entries and results; changing any entry or mode clears the old result immediately. Your browser or device may separately retain autofill, memory or screenshots. See the privacy policy for the wider website.
This is product education by FuelForm's founder and product owner. Source and arithmetic checks on 25 October 2026 are technical checks, not clinical review. If a care plan supplies your numbers, follow that plan rather than treating this arithmetic as a replacement.